1 Reply Latest reply on Aug 23, 2010 10:06 PM by Freeman(Yue) Fang

    BindException while configuring High Availability

    Mohit Handa Newbie

      Hi All,

       

      I am using Apache ServiceMix (4.2.0-fuse-02-00).

       

      I followed the following url

       

      http://servicemix.apache.org/clustering.html

       

      But when I start my slave node, I get the following exception

       

      Exception in thread "SpringOsgiExtenderThread-46" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.activemq.xbean.XBeanBrokerService#0': Invocation of init method failed; nested exception is java.io.IOException: Transport Connector could not be registered in JMX: Failed to bind to server socket: tcp://0.0.0.0:61616 due to: java.net.BindException: Address already in use

          at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:147)

          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:350)

          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1331)

          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)

          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)

          at java.security.AccessController.doPrivileged(Native Method)

          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)

          at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)

          at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

          at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)

          at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)

          at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)

          at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)

          at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)

          at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:69)

          at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:355)

          at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)

          at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)

          at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:136)

          at java.lang.Thread.run(Thread.java:619)

      Caused by: java.io.IOException: Transport Connector could not be registered in JMX: Failed to bind to server socket: tcp://0.0.0.0:61616 due to: java.net.BindException: Address already in use

          at org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:27)

          at org.apache.activemq.broker.BrokerService.registerConnectorMBean(BrokerService.java:1591)

          at org.apache.activemq.broker.BrokerService.startTransportConnector(BrokerService.java:2012)

          at org.apache.activemq.broker.BrokerService.startAllConnectors(BrokerService.java:1965)

          at org.apache.activemq.broker.BrokerService.start(BrokerService.java:495)

          at org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:85)

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

          at java.lang.reflect.Method.invoke(Method.java:597)

          at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:297)

          at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:250)

          at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:144)

          ... 19 more

      Caused by: java.io.IOException: Failed to bind to server socket: tcp://0.0.0.0:61616 due to: java.net.BindException: Address already in use

          at org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:33)

          at org.apache.activemq.transport.tcp.TcpTransportServer.bind(TcpTransportServer.java:139)

          at org.apache.activemq.transport.tcp.TcpTransportFactory.doBind(TcpTransportFactory.java:60)

          at org.apache.activemq.transport.TransportFactory.bind(TransportFactory.java:131)

          at org.apache.activemq.broker.TransportConnector.createTransportServer(TransportConnector.java:305)

          at org.apache.activemq.broker.TransportConnector.getServer(TransportConnector.java:137)

          at org.apache.activemq.broker.TransportConnector.asManagedConnector(TransportConnector.java:100)

          at org.apache.activemq.broker.BrokerService.registerConnectorMBean(BrokerService.java:1586)

          ... 30 more

      Caused by: java.net.BindException: Address already in use

          at java.net.PlainSocketImpl.socketBind(Native Method)

          at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:365)

          at java.net.ServerSocket.bind(ServerSocket.java:319)

          at java.net.ServerSocket.(ServerSocket.java:185)

          at javax.net.DefaultServerSocketFactory.createServerSocket(ServerSocketFactory.java:170)

          at org.apache.activemq.transport.tcp.TcpTransportServer.bind(TcpTransportServer.java:135)

          ... 36 more

       

       

       

       

      Any ideas?

       

      Thanks,

      Mohit