[
http://jira.amdatu.org/jira/browse/AMDATU-188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=10332#comment-10332
]
Ivo Ladage - van Doorn edited comment on AMDATU-188 at 11/23/10 9:23 AM:
-------------------------------------------------------------------------
This test reproduces the issue (RawHttpServiceTest.java is attached). If you do
disable the line that provisions the amdatu log handler, no error appears. Same
when you disable the line that provisions the amdatu test bundle. Enabling both
however causes the error, so I'm still not sure if reading from config admin is
the actual problem although it seems related.
was (Author: ivol):
This test reproduces the issue. If you do disable the line that provisions
the amdatu log handler, no error appears. Same when you disable the line that
provisions the amdatu test bundle. Enabling both however causes the error, so
I'm still not sure if reading from config admin is the actual problem although
it seems related.
> Felix HttpService bundle throws "Unable to establish loopback connection"
> error upon startup
> --------------------------------------------------------------------------------------------
>
> Key: AMDATU-188
> URL: http://jira.amdatu.org/jira/browse/AMDATU-188
> Project: Amdatu
> Issue Type: Bug
> Components: Testing
> Affects Versions: 0.0.6
> Reporter: Ivo Ladage - van Doorn
> Assignee: Marcel Offermans
> Attachments: amdatu-test.zip, RawHttpServiceTest.java
>
>
> While running the integration tests, sometimes this error appears while
> starting Pax Exam:
> INFO: ServiceEvent REGISTERED [org.apache.felix.http.jetty]
> WARNING: failed org.mortbay.jetty.nio.SelectChannelConnector$1 at 4eeaaf:
> java.io.IOException: Unable to establish loopback connection
> [org.apache.felix.http.jetty]
> WARNING: failed SelectChannelConnector at 0.0.0.0:8080: java.io.IOException:
> Unable to establish loopback connection [org.apache.felix.http.jetty]
> WARNING: failed Server at 111bfbc: java.io.IOException: Unable to establish
> loopback connection [org.apache.felix.http.jetty]
> org.apache.felix.log.LogException: java.io.IOException: Unable to establish
> loopback connection
> ERROR: Exception while initializing Jetty. [org.apache.felix.http.jetty]
> at sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:106)
> java.io.IOException: Unable to establish loopback connection
> at java.security.AccessController.doPrivileged(Native Method)
> at sun.nio.ch.PipeImpl.<init>(PipeImpl.java:122)
> at
> sun.nio.ch.SelectorProviderImpl.openPipe(SelectorProviderImpl.java:27)
> at java.nio.channels.Pipe.open(Pipe.java:133)
> at sun.nio.ch.WindowsSelectorImpl.<init>(WindowsSelectorImpl.java:104)
> at
> sun.nio.ch.WindowsSelectorProvider.openSelector(WindowsSelectorProvider.java:26)
> at java.nio.channels.Selector.open(Selector.java:209)
> at
> org.mortbay.io.nio.SelectorManager$SelectSet.<init>(SelectorManager.java:302)
> at
> org.mortbay.io.nio.SelectorManager.doStart(SelectorManager.java:224)
> at
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
> at
> org.mortbay.jetty.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:314)
> INFO: ServiceEvent UNREGISTERING [org.amdatu.web.jsp]
> 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)
> INFO: HTTP Context destroyed for bundle 9 ('jspservlet') [org.amdatu.web.jsp]
> at
> org.apache.felix.http.jetty.internal.JettyService.initializeJetty(JettyService.java:145)
> INFO: ServiceEvent UNREGISTERING [org.amdatu.web.rest.wink]
> at
> org.apache.felix.http.jetty.internal.JettyService.startJetty(JettyService.java:112)
> INFO: HTTP Context destroyed for bundle 11 ('rest/services')
> [org.amdatu.web.rest.wink]
> INFO: ServiceEvent UNREGISTERING [org.amdatu.web.rest.wink]
> INFO: org.amdatu.web.rest.wink.service.WinkRegistrationServiceImpl service
> destroyed [org.amdatu.web.rest.wink]
> at
> org.apache.felix.http.jetty.internal.JettyService.run(JettyService.java:203)
> at java.lang.Thread.run(Thread.java:619)
> Caused by: java.nio.channels.ClosedByInterruptException
> INFO: ServiceEvent UNREGISTERING [org.amdatu.web.jsp]
> at
> java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:184)
> at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:518)
> at java.nio.channels.SocketChannel.open(SocketChannel.java:146)
> INFO: ServiceEvent UNREGISTERING [org.amdatu.web.httpcontext]
> at sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:78)
> ... 18 more
> As a consequence Shindig seems to fail proper startup. After investigation it
> seems that the issue is caused when a bundle retrieves the Felix http
> configuration entry before the Felix http bundle itself is started. Attached
> is the source of the bundle with which I can reproduce the issue, by
> providing this bundle to Pax Exam first, followed by the Felix http service
> bundle.
> The error appears when this code is executed in the start() method:
> m_configAdmin.getConfiguration("org.apache.felix.http", null); -> error is
> thrown
> However, without the location parameter the error does not appear:
> m_configAdmin.getConfiguration("org.apache.felix.http"); -> no error
> Also when reading other configuration entries, the error does not appear.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira