org.springframework.amqp.AmqpConnectException: java.net.ConnectException: Connection refused: connect

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

,
Expert tip

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

,
Expert tip

Check if you have started your server, or if your server is set to listen to the port you're trying to connect and is waiting to accept connections and check if the firewall isn't blocking your connection.

Solutions on the web

via Stack Overflow by Saurabh Kumar
, 1 year ago
java.net.ConnectException: Connection refused: connect
via GitHub by juanwalker
, 11 months ago
java.net.ConnectException: Connection refused: connect
via Stack Overflow by stackoverflowuser2010
, 2 years ago
java.net.ConnectException: Connection refused
via Stack Overflow by jandres
, 2 years ago
java.net.ConnectException: Connection timed out: connect
via Google Groups by Julie kim, 5 months ago
via Stack Overflow by Karthik Palanivelu
, 1 year ago
java.net.ConnectException: Connection refused
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:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at com.rabbitmq.client.impl.FrameHandlerFactory.create(FrameHandlerFactory.java:32)
at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:811)
at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.createBareConnection(AbstractConnectionFactory.java:296)
at org.springframework.amqp.rabbit.connection.CachingConnectionFactory.createConnection(CachingConnectionFactory.java:547)
at org.springframework.amqp.rabbit.connection.ConnectionFactoryUtils$1.createConnection(ConnectionFactoryUtils.java:90)
at org.springframework.amqp.rabbit.connection.ConnectionFactoryUtils.doGetTransactionalResourceHolder(ConnectionFactoryUtils.java:140)
at org.springframework.amqp.rabbit.connection.ConnectionFactoryUtils.getTransactionalResourceHolder(ConnectionFactoryUtils.java:76)
at org.springframework.amqp.rabbit.core.RabbitTemplate.doExecute(RabbitTemplate.java:1374)
at org.springframework.amqp.rabbit.core.RabbitTemplate.execute(RabbitTemplate.java:1367)
at org.springframework.amqp.rabbit.core.RabbitTemplate.execute(RabbitTemplate.java:1343)
at org.springframework.cloud.stream.binder.rabbit.RabbitMessageChannelBinder.declareExchange(RabbitMessageChannelBinder.java:493)
at org.springframework.cloud.stream.binder.rabbit.RabbitMessageChannelBinder.doBindConsumer(RabbitMessageChannelBinder.java:227)
at org.springframework.cloud.stream.binder.rabbit.RabbitMessageChannelBinder.doBindConsumer(RabbitMessageChannelBinder.java:103)
at org.springframework.cloud.stream.binder.AbstractBinder.bindConsumer(AbstractBinder.java:179)
at org.springframework.cloud.stream.binding.ChannelBindingService.bindConsumer(ChannelBindingService.java:93)
at org.springframework.cloud.stream.binding.BindableProxyFactory.bindInputs(BindableProxyFactory.java:188)
at org.springframework.cloud.stream.binding.InputBindingLifecycle.start(InputBindingLifecycle.java:55)
at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:173)
at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:51)
at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:346)
at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:149)
at org.springframework.context.support.DefaultLifecycleProcessor.start(DefaultLifecycleProcessor.java:91)
at org.springframework.cloud.stream.binding.OutputBindingLifecycle.start(OutputBindingLifecycle.java:65)
at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:173)
at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:51)
at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:346)
at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:149)
at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:112)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:369)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:313)
at de.bingo.core.application.AbstractApplication.runApplicationInternal(AbstractApplication.java:60)
at de.bingo.generator.application.GeneratorAbstractApplication.runApplication(GeneratorAbstractApplication.java:57)
at de.bingo.monitoring.application.MonitoringApplication.main(MonitoringApplication.java:45)

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.