Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-4038

org.apache.felix.http.host ignored

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • http-2.2.0
    • http-2.2.2
    • HTTP Service
    • None

    Description

      It looks like the org.apache.felix.http.host property is ignored, both when passed as system property and using config admin.

      For example the following configuration should set both the host and the port. The exception shows the port being set correctly, but the host trying to bind to 0.0.0.0.

      I can't really explain why this happens when looking at the code (the property should be picked up as far as I can see), so it might be something broken in Jetty itself for example.

      java -Dorg.osgi.service.http.port=8082 -Dorg.apache.felix.http.host=127.4.144.129 -jar example.jar
      
      013.04.26 17:32:36 WARNING - Bundle: org.apache.felix.http.jetty - failed Server@1c0d32e: java.net.SocketException: Permission denied
      2013.04.26 17:32:36 WARNING - Bundle: org.apache.felix.http.jetty - failed SelectChannelConnector@0.0.0.0:8082: java.net.SocketException: Permission denied
      2013.04.26 17:32:36 INFO - Bundle: org.apache.felix.http.whiteboard - Detected extended HttpService. Filters enabled.
      2013.04.26 17:32:36 INFO - Bundle: org.apache.felix.http.jetty - [org.osgi.service.http.HttpService, org.apache.felix.http.api.ExtHttpService] - ServiceEvent REGISTERED
      2013.04.26 17:32:36 INFO - Bundle: org.apache.felix.http.jetty - [org.osgi.service.http.HttpService, org.apache.felix.http.api.ExtHttpService] - ServiceEvent UNREGISTERING
      2013.04.26 17:32:34 ERROR - Bundle: org.apache.felix.http.jetty - Exception while initializing Jetty. - java.net.SocketException: Permission denied
      	at sun.nio.ch.Net.bind0(Native Method)
      	at sun.nio.ch.Net.bind(Net.java:344)
      	at sun.nio.ch.Net.bind(Net.java:336)
      	at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:199)
      	at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
      	at org.mortbay.jetty.nio.SelectChannelConnector.open(SelectChannelConnector.java:216)
      	at org.mortbay.jetty.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:315)
      	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
      	at org.mortbay.jetty.Server.doStart(Server.java:235)
      	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
      	at org.apache.felix.http.jetty.internal.JettyService.initializeJetty(JettyService.java:164)
      	at org.apache.felix.http.jetty.internal.JettyService.startJetty(JettyService.java:115)
      	at org.apache.felix.http.jetty.internal.JettyService.run(JettyService.java:290)
      	at java.lang.Thread.run(Thread.java:722)
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            paulbakker Paul Bakker
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: