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

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,

Make sure your server started correctly and is listening correctly on the correct port.

,
Expert tip

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

Solutions on the web

via Stack Overflow by Harmony888
, 1 year ago
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
via GitHub by tdiesler
, 2 years ago
Could not create Transport. Reason: java.lang.IllegalStateException: Shutdown in progress: javax.jms.JMSException: Error while attempting to retrieve a connection from the pool
via Stack Overflow by Daniel
, 2 years ago
via Stack Overflow by Yasmeen
, 1 year ago
Error while attempting to add new Connection to the pool
via Stack Overflow by Dante
, 1 year ago
Error while attempting to add new Connection to the pool
via Stack Overflow by Nir
, 7 months ago
Error while attempting to add new Connection to the pool
java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at org.apache.activemq.transport.tcp.TcpTransport.connect(TcpTransport.java:504)
at org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:58)
at org.apache.activemq.transport.AbstractInactivityMonitor.start(AbstractInactivityMonitor.java:132)
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.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:273)
at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:238)
at org.apache.activemq.jms.pool.PooledConnectionFactory.createConnection(PooledConnectionFactory.java:259)
at org.apache.activemq.jms.pool.PooledConnectionFactory$1.makeObject(PooledConnectionFactory.java:104)
at org.apache.activemq.jms.pool.PooledConnectionFactory.createConnection(PooledConnectionFactory.java:206)
at org.springframework.jms.support.JmsAccessor.createConnection(JmsAccessor.java:180)
at org.springframework.jms.listener.AbstractJmsListeningContainer.createSharedConnection(AbstractJmsListeningContainer.java:413)
at org.springframework.jms.listener.AbstractJmsListeningContainer.refreshSharedConnection(AbstractJmsListeningContainer.java:398)
at org.springframework.jms.listener.DefaultMessageListenerContainer.refreshConnectionUntilSuccessful(DefaultMessageListenerContainer.java:909)
at org.springframework.jms.listener.DefaultMessageListenerContainer.recoverAfterListenerSetupFailure(DefaultMessageListenerContainer.java:884)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)

Users with the same issue

935 times, 1 day ago
Once, 4 days ago
Once, 1 week ago
39 times, 1 week ago
14 times, 1 week ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.