Uploaded image for project: 'Geronimo'
  1. Geronimo
  2. GERONIMO-5331

Connection refused excpetion in ActiveMQ Pure Master/Slave

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.2.1, 2.2.2
    • Fix Version/s: 2.2.2
    • Component/s: ActiveMQ
    • Security Level: public (Regular issues)
    • Labels:
      None
    • Environment:

      Windows 2003 Sp2
      JDk: sun jdk 1.5.22

      Description

      1. Refer to http://activemq.apache.org/pure-master-slave.html setup pure master/slave, and sample master/slave configuration file from activemq source : http://svn.apache.org/repos/asf/activemq/trunk/activemq-core/src/test/resources/org/apache/activemq/broker/ft/slave.xml, master.xml
      2. Setup master activemq, change var/activemq/conf/activemq.xml as attachement master.xml under geronimo install directory
      3.Setup slave activemq in the same box as master. change var/activemq/conf/activemq.xml as attachement slave.xml under anohter geronimo install directory.change var/config/config-substitutions.properties portoffset attribute to 1 as attached config-substitutions_slave.properties
      4. Startup master/slave geronimo, but connection refused when starting activemq module as below:

      2010-05-21 15:39:45,593 ERROR [RecoveryController] Recovery error
      javax.transaction.SystemException: Could not obtain recovery XAResource for managedConnectionFactory org.apache.activemq.ra.ActiveMQManagedConnectionFactory@450c8891
      at org.apache.geronimo.connector.outbound.AbstractConnectionManager.doRecovery(AbstractConnectionManager.java:74)
      at org.apache.geronimo.connector.outbound.ManagedConnectionFactoryWrapper.doStart(ManagedConnectionFactoryWrapper.java:164)
      at org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:953)
      at org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:269)
      at org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:103)
      at org.apache.geronimo.gbean.runtime.GBeanInstance.start(GBeanInstance.java:525)
      at org.apache.geronimo.gbean.runtime.GBeanDependency.attemptFullStart(GBeanDependency.java:110)
      at org.apache.geronimo.gbean.runtime.GBeanDependency.addTarget(GBeanDependency.java:145)
      at org.apache.geronimo.gbean.runtime.GBeanDependency$1.running(GBeanDependency.java:119)
      at org.apache.geronimo.kernel.basic.BasicLifecycleMonitor.fireRunningEvent(BasicLifecycleMonitor.java:175)
      at org.apache.geronimo.kernel.basic.BasicLifecycleMonitor.access$300(BasicLifecycleMonitor.java:44)
      at org.apache.geronimo.kernel.basic.BasicLifecycleMonitor$RawLifecycleBroadcaster.fireRunningEvent(BasicLifecycleMonitor.java:253)
      at org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:295)
      at org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:103)
      at org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:125)
      at org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:539)
      at org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(BasicKernel.java:377)
      at org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:456)
      at org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:190)
      at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:546)
      at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:592)
      at org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
      at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:130)
      at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:816)
      at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
      at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
      at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
      at org.apache.geronimo.kernel.config.EditableConfigurationManager$$EnhancerByCGLIB$$3f4c8f1.startConfiguration(<generated>)
      at org.apache.geronimo.system.main.EmbeddedDaemon.doStartup(EmbeddedDaemon.java:204)
      at org.apache.geronimo.system.main.EmbeddedDaemon.execute(EmbeddedDaemon.java:87)
      at org.apache.geronimo.kernel.util.MainConfigurationBootstrapper.main(MainConfigurationBootstrapper.java:45)
      at org.apache.geronimo.cli.AbstractCLI.executeMain(AbstractCLI.java:65)
      at org.apache.geronimo.cli.daemon.DaemonCLI.main(DaemonCLI.java:30)
      Caused by: javax.resource.ResourceException: Could not create connection.
      at org.apache.activemq.ra.ActiveMQManagedConnectionFactory.createManagedConnection(ActiveMQManagedConnectionFactory.java:171)
      at org.apache.geronimo.connector.outbound.MCFConnectionInterceptor.getConnection(MCFConnectionInterceptor.java:49)
      at org.apache.geronimo.connector.outbound.XAResourceInsertionInterceptor.getConnection(XAResourceInsertionInterceptor.java:41)
      at org.apache.geronimo.connector.outbound.SinglePoolConnectionInterceptor.internalGetConnection(SinglePoolConnectionInterceptor.java:69)
      at org.apache.geronimo.connector.outbound.AbstractSinglePoolConnectionInterceptor.getConnection(AbstractSinglePoolConnectionInterceptor.java:80)
      at org.apache.geronimo.connector.outbound.TransactionEnlistingInterceptor.getConnection(TransactionEnlistingInterceptor.java:46)
      at org.apache.geronimo.connector.outbound.TransactionCachingInterceptor.getConnection(TransactionCachingInterceptor.java:103)
      at org.apache.geronimo.connector.outbound.TCCLInterceptor.getConnection(TCCLInterceptor.java:39)
      at org.apache.geronimo.connector.outbound.AbstractConnectionManager.doRecovery(AbstractConnectionManager.java:65)
      ... 34 more
      Caused by: javax.jms.JMSException: Could not connect to broker URL: tcp://0.0.0.0:61617. Reason: java.net.ConnectException: Connection refused: connect
      at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:35)
      at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:286)
      at org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:185)
      at org.apache.activemq.ra.ActiveMQConnectionSupport.makeConnection(ActiveMQConnectionSupport.java:79)
      at org.apache.activemq.ra.ActiveMQConnectionSupport.makeConnection(ActiveMQConnectionSupport.java:61)
      at org.apache.activemq.ra.ActiveMQManagedConnectionFactory.createManagedConnection(ActiveMQManagedConnectionFactory.java:169)
      ... 42 more
      Caused by: java.net.ConnectException: Connection refused: connect
      at java.net.PlainSocketImpl.socketConnect(Native Method)
      at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
      at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:193)
      at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
      at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:367)
      at java.net.Socket.connect(Socket.java:524)
      at org.apache.activemq.transport.tcp.TcpTransport.connect(TcpTransport.java:436)
      at org.apache.activemq.transport.tcp.TcpTransport.doStart(TcpTransport.java:402)
      at org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:53)
      at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:57)
      at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:57)
      at org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNegotiator.java:72)
      at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:57)
      at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:57)
      at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:266)
      ... 46 more

      Reference doc:
      https://issues.apache.org/activemq/browse/AMQ-1585
      http://activemq.apache.org/pure-master-slave.html

        Attachments

        1. ActiveMQ.JPG
          283 kB
          viola.lu
        2. PureMasterSlave.zip
          23 kB
          viola.lu

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              viola.lu viola.lu
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: