You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Paul Bakker (JIRA)" <ji...@apache.org> on 2013/04/26 23:50:15 UTC

[jira] [Created] (FELIX-4038) org.apache.felix.http.host ignored

Paul Bakker created FELIX-4038:
----------------------------------

             Summary: org.apache.felix.http.host ignored
                 Key: FELIX-4038
                 URL: https://issues.apache.org/jira/browse/FELIX-4038
             Project: Felix
          Issue Type: Bug
          Components: HTTP Service
    Affects Versions: http-2.2.0
            Reporter: Paul Bakker


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.

{code}
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)
{code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira