javax.jms.JMSException

Could not connect to broker URL: tcp://my-activemq-url.com:22861?keepAlive=true&trace=true. Reason: java.net.ConnectException: Connection refused: connect javax.jms.JMSException: Error while attempting to add new Connection to the pool

Samebug tips9

To restart the Selenium Webdriver mock browser in a testcase, first use 'driver.close()' and then reinstantiate the driver.

Firewall might be blocking your connection, or MySQL it's not running on your server machine.

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web1094

  • Could not connect to broker URL: tcp://my-activemq-url.com:22861?keepAlive=true&trace=true. Reason: java.net.ConnectException: Connection refused: connect javax.jms.JMSException: Error while attempting to add new Connection to the pool
  • Could not connect to broker URL: tcp://rpc1044.daytonoh.ncr.com:61616?trace=true. Reason: java.net.ConnectException: Connection refused: connect
  • Could not connect to broker URL: tcp://localhost:6161. Reason: java.net.ConnectException: Connection refused: connect
  • Stack trace

    • javax.jms.JMSException: Could not connect to broker URL: tcp://my-activemq-url.com:22861?keepAlive=true&trace=true. Reason: java.net.ConnectException: Connection refused: connect javax.jms.JMSException: Error while attempting to add new Connection to the pool at org.apache.activemq.jms.pool.PooledConnectionFactory.createJmsException(PooledConnectionFactory.java:251)[activemq-jms-pool-5.10.2.jar:5.10.2] at org.apache.activemq.jms.pool.PooledConnectionFactory.createConnection(PooledConnectionFactory.java:210)[activemq-jms-pool-5.10.2.jar:5.10.2] at org.apache.activemq.jms.pool.PooledConnectionFactory.createConnection(PooledConnectionFactory.java:189)[activemq-jms-pool-5.10.2.jar:5.10.2] at org.springframework.jms.support.JmsAccessor.createConnection(JmsAccessor.java:180)[spring-jms-4.1.7.RELEASE.jar:4.1.7.RELEASE] at org.springframework.jms.listener.AbstractJmsListeningContainer.createSharedConnection(AbstractJmsListeningContainer.java:413)[spring-jms-4.1.7.RELEASE.jar:4.1.7.RELEASE] at org.springframework.jms.listener.AbstractJmsListeningContainer.refreshSharedConnection(AbstractJmsListeningContainer.java:398)[spring-jms-4.1.7.RELEASE.jar:4.1.7.RELEASE] at org.springframework.jms.listener.DefaultMessageListenerContainer.refreshConnectionUntilSuccessful(DefaultMessageListenerContainer.java:909)[spring-jms-4.1.7.RELEASE.jar:4.1.7.RELEASE] at org.springframework.jms.listener.DefaultMessageListenerContainer.recoverAfterListenerSetupFailure(DefaultMessageListenerContainer.java:884)[spring-jms-4.1.7.RELEASE.jar:4.1.7.RELEASE] at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:1055)[spring-jms-4.1.7.RELEASE.jar:4.1.7.RELEASE] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[na:1.7.0_71] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[na:1.7.0_71] at java.lang.Thread.run(Thread.java:745)[na:1.7.0_71] Caused by: javax.jms.JMSException: Could not connect to broker URL: tcp://my-activemq-url.com:22861?keepAlive=true&trace=true. Reason: java.net.ConnectException: Connection refused: connect at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:35)[activemq-core-5.7.0.jar:5.7.0] at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:293)[activemq-core-5.7.0.jar:5.7.0] at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:238)[activemq-core-5.7.0.jar:5.7.0] at org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:184)[activemq-core-5.7.0.jar:5.7.0] at org.apache.activemq.jms.pool.PooledConnectionFactory.createConnection(PooledConnectionFactory.java:259)[activemq-jms-pool-5.10.2.jar:5.10.2] at org.apache.activemq.jms.pool.PooledConnectionFactory$1.makeObject(PooledConnectionFactory.java:104)[activemq-jms-pool-5.10.2.jar:5.10.2] at org.apache.activemq.jms.pool.PooledConnectionFactory$1.makeObject(PooledConnectionFactory.java:84)[activemq-jms-pool-5.10.2.jar:5.10.2] at org.apache.commons.pool.impl.GenericKeyedObjectPool.addObject(GenericKeyedObjectPool.java:1748)[commons-pool-1.6.jar:1.6] at org.apache.activemq.jms.pool.PooledConnectionFactory.createConnection(PooledConnectionFactory.java:206)[activemq-jms-pool-5.10.2.jar:5.10.2] ... 10 more Caused by: java.net.ConnectException: Connection refused: connect at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)[na:1.7.0_71] at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85)[na:1.7.0_71] at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)[na:1.7.0_71] at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)[na:1.7.0_71] at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)[na:1.7.0_71] at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)[na:1.7.0_71] at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)[na:1.7.0_71] at java.net.Socket.connect(Socket.java:579)[na:1.7.0_71] at org.apache.activemq.transport.tcp.TcpTransport.connect(TcpTransport.java:504)[activemq-core-5.7.0.jar:5.7.0] at org.apache.activemq.transport.tcp.TcpTransport.doStart(TcpTransport.java:467)[activemq-core-5.7.0.jar:5.7.0] at org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:55)[activemq-core-5.7.0.jar:5.7.0] at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)[activemq-core-5.7.0.jar:5.7.0] at org.apache.activemq.transport.AbstractInactivityMonitor.start(AbstractInactivityMonitor.java:132)[activemq-core-5.7.0.jar:5.7.0] at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)[activemq-core-5.7.0.jar:5.7.0] at org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNegotiator.java:72)[activemq-core-5.7.0.jar:5.7.0] at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)[activemq-core-5.7.0.jar:5.7.0] at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)[activemq-core-5.7.0.jar:5.7.0] at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:273)[activemq-core-5.7.0.jar:5.7.0] ... 17 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown user
    Once, 11 months ago
    Unknown user
    Once, 1 year ago
    Once, 8 months ago
    Once, 2 months ago
    Unknown user
    Once, 1 year ago
    400 more bugmates