0 Replies Latest reply on Jul 22, 2011 5:14 PM by shamik

    How to configure multiple listener port ?

    shamik

      Hi,

       

        Just wondering if its possible to declara multiple ports in karaf ? I'm using an embedded jetty server and configured jetty.xml to have couple of connectors listening to 2 different ports. The idea is to use custom acceptor for each port to restrict the number of request.

       

      Here's my connector entry :

       

       

       

      As you can see, I've defined couple of ports 8011 and 8012.

       

      In system.properties, I've the following entry to listen to 8011 only. 

       

      org.osgi.service.http.port=8011

       

      I can only access my service through port 8011, but not using 8012. I tried declaring both ports comma separated (not sure if that's the right syntax), but didn't work out as jetty started throwing some null pointer exception at the startup.

       

      ERROR: Bundle org.ops4j.pax.web.pax-web-runtime EventDispatcher: Error during dispatch. (java.lang.NullPointerException)

      java.lang.NullPointerException

              at org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl$Stopped.start(ServerControllerImpl.java:361)

               at org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl.start(ServerControllerImpl.java:67)

       

      Any pointer will be appreciated.

       

      - Thanks

      Shamik