activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From annubiss100 <william.si...@ilegra.com>
Subject ActiveMQ Slave - Failed to start network bridge
Date Thu, 27 Dec 2012 19:22:31 GMT
Firstly, sorry about my bad English :)

I would like some help to fix an exception that I'm getting when an ActiveMQ
Slave tries to become the Master.

I've two servers (example):

First one: *10.255.2.25* (started as Master)
Second one: *10.255.2.26* (started as Slave)

My activeMQ is using the storage and not Database, so I'm using kahadb.

When I shutdown my ActiveMQ at 10.255.2.25, the ActiveMQ will be the master
at 10.255.2.26, or should be the active service. By some reason, it is
failing and I'm getting the following exception:

*------------------------------------------------------------------------------------------------*

/2012-12-27 13:41:20,527 | INFO  | Starting a slave connection between
vm://Slave#0 and tcp://10.225.9.25:61616 |
org.apache.activemq.broker.ft.MasterConnector | main
2012-12-27 13:41:20,532 | ERROR | Failed to start network bridge:
java.net.ConnectException: Connection refused |
org.apache.activemq.broker.ft.MasterConnector | main
java.net.ConnectException: Connection refused
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
	at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
	at java.net.Socket.connect(Socket.java:529)
	at
org.apache.activemq.transport.tcp.TcpTransport.connect(TcpTransport.java:484)
	at
org.apache.activemq.transport.tcp.TcpTransport.doStart(TcpTransport.java:447)
	at org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:53)
	at
org.apache.activemq.transport.InactivityMonitor.start(InactivityMonitor.java:126)
	at
org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
	at
org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNegotiator.java:72)
	at
org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
	at
org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
	at
org.apache.activemq.broker.ft.MasterConnector.start(MasterConnector.java:179)
	at org.apache.activemq.broker.BrokerService.start(BrokerService.java:515)
	at
org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:60)
	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.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1536)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1409)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
	at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
	at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
	at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
	at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
	at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:574)
	at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
	at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
	at
org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:64)
	at
org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(ResourceXmlApplicationContext.java:52)
	at
org.apache.activemq.xbean.XBeanBrokerFactory$1.<init>(XBeanBrokerFactory.java:114)
	at
org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext(XBeanBrokerFactory.java:114)
	at
org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBrokerFactory.java:70)
	at
org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:71)
	at
org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:54)
	at
org.apache.activemq.console.command.StartCommand.startBroker(StartCommand.java:115)
	at
org.apache.activemq.console.command.StartCommand.runTask(StartCommand.java:74)
	at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
	at
org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand.java:143)
	at
org.apache.activemq.console.command.AbstractCommand.execute(AbstractCommand.java:57)
	at
org.apache.activemq.console.command.ShellCommand.main(ShellCommand.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.apache.activemq.console.Main.runTaskClass(Main.java:251)
	at org.apache.activemq.console.Main.main(Main.java:107)/


I did a new installation just to avoid some corrupted file, also, I tried to
change the master to 10.255.2.26 and slave to 10.255.2.25, but I'm still
seeing the error. It was performed just change the broker.

Please look some part of my activemq.xml file:

*Master:
*
/<broker xmlns="http://activemq.apache.org/schema/core"
dataDirectory="/store/data" destroyApplicationContextOnStop="true"
useJmx="true" waitForSlave="false" brokerName="Master" >

  <transportConnectors>
			<transportConnector name="openwire" uri="tcp://0.0.0.0:61616"/>
        </transportConnectors>

  <persistenceAdapter>
                        <kahaDB directory="/store/data/kahadb"/>
			
        </persistenceAdapter>
        
        <managementContext>
            <managementContext createConnector=&quot;&lt;b>true*"/>
        </managementContext>/



*Slave:
*
/<broker xmlns="http://activemq.apache.org/schema/core"
dataDirectory="/store/data" destroyApplicationContextOnStop="true"
useJmx="true" brokerName="Slave" shutdownOnMasterFailure="false"
masterConnectorURI="tcp://10.225.9.23:61616" >

  <transportConnectors>
			<transportConnector name="openwire" uri="tcp://0.0.0.0:61616"/>
        </transportConnectors> 


  <persistenceAdapter>
                        <kahaDB directory="/store/data/kahadb"/>
			
        </persistenceAdapter>
        
        <managementContext>
            <managementContext createConnector=&quot;&lt;b>false*"/>
        </managementContext>/



Is it related to a restriction between two servers, maybe ? 

Please help me.


Thanks in advance,

William



--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-Slave-Failed-to-start-network-bridge-tp4661142.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message