L.S., Another way to end up with this exception is if you have several services binding to the same port, but with a conflicting hostname part. For example, if you have one service bound to http://0.0.0.0:8192/webservice1, you will get this exception if you try to bind the second service to http://127.0.0.1:8192/webservice1. The first one will bind to port 8192 on all network adapters, so you won't be able to bind to the same port on a single interface separately anymore.
Regards, Gert Vanthienen ------------------------ Open Source SOA: http://fusesource.com Blog: http://gertvanthienen.blogspot.com/ On 21 August 2010 03:43, Johan Edstrom <[email protected]> wrote: > What can happen is that if you get a spring context reload / crash the > "shutdown" isn't called. > So the Jetty server is still running. > > > On Aug 20, 2010, at 6:57 PM, ssheth wrote: > >> >> I have selected a port number which in not used by any other processes for my >> bundle. >> >> I am looking for a solution to following problem: >> Once in a while when I install latest version of a bundle I get following >> exception: >> >> Caused by: org.apache.cxf.interceptor.Fault: Could not start Jetty server: >> Address already in use >> at >> org.apache.cxf.transport.http_jetty.JettyHTTPServerEngine.addServant(JettyHTTPServerEngine.java:383) >> at >> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.activate(JettyHTTPDestination.java:167) >> at >> org.apache.cxf.transport.AbstractObservable.setMessageObserver(AbstractObservable.java:48) >> at >> org.apache.cxf.binding.AbstractBindingFactory.addListener(AbstractBindingFactory.java:164) >> at >> org.apache.cxf.binding.soap.SoapBindingFactory.addListener(SoapBindingFactory.java:805) >> at org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:122) >> at >> org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:120) >> at >> org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:167) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) >> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) >> at java.lang.reflect.Method.invoke(Unknown Source) >> at >> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1414) >> at >> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1375) >> at >> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335) >> ... 17 more >> Caused by: java.net.BindException: Address already in use >> at sun.nio.ch.Net.bind(Native Method) >> at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source) >> at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source) >> 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.cxf.transport.http_jetty.JettyHTTPServerEngine.addServant(JettyHTTPServerEngine.java:350) >> >> -- >> View this message in context: >> http://servicemix.396122.n5.nabble.com/java-net-BindException-Address-already-in-use-tp2642957p2642957.html >> Sent from the ServiceMix - User mailing list archive at Nabble.com. > > Johan Edstrom > > [email protected] > > They that can give up essential liberty to purchase a little temporary > safety, deserve neither liberty nor safety. > > Benjamin Franklin, Historical Review of Pennsylvania, 1759 > > > > > >
