Skip to content

Can not connect to RabbitMQ  #2

@andreykirson

Description

@andreykirson

I did the final docker-compose.yml file and when I start it I got the following error

Here is my docker-file:
https://github.com/andreykirson/docker_mental_arithmetic

Perhaps it needs to change the settings somewhere else?

logs_1 |
logs_1 | . ____ _ __ _ _
logs_1 | /\ / ' __ _ () __ __ _ \ \ \
logs_1 | ( ( )_
_ | '_ | '| | ' / ` | \ \ \
logs_1 | \/ )| |)| | | | | || (| | ) ) ) )
logs_1 | ' |
| .__|| ||| |_, | / / / /
logs_1 | =========|
|==============|/=////
logs_1 | :: Spring Boot :: (v2.5.4)
logs_1 |
logs_1 | [ ] [,] INFO HV000001: Hibernate Validator 6.2.0.Final
logs_1 | [ ] [,] INFO Starting LogCenralizationApplication v0.0.1-SNAPSHOT using Java 16.0.2 on 0b35fc6a05c3 with PID 1 (/workspace/BOOT-INF/classes started by cnb in /workspace)
logs_1 | [ ] [,] INFO The following profiles are active: docker
logs_1 | [ ] [,] INFO BeanFactory id=688ff25e-fb79-3dc8-af85-a379b9ede61f
logs_1 | [ ] [,] INFO Bean 'org.springframework.retry.annotation.RetryConfiguration' of type [org.springframework.retry.annotation.RetryConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
logs_1 | [ ] [,] INFO Tomcat initialized with port(s): 8580 (http)
logs_1 | [ ] [,] INFO Initializing ProtocolHandler ["http-nio-8580"]
logs_1 | [ ] [,] INFO Starting service [Tomcat]
logs_1 | [ ] [,] INFO Starting Servlet engine: [Apache Tomcat/9.0.52]
logs_1 | [ ] [,] INFO Initializing Spring embedded WebApplicationContext
logs_1 | [ ] [,] INFO Root WebApplicationContext: initialization completed in 3024 ms
logs_1 | [ ] [,] INFO Exposing 1 endpoint(s) beneath base path '/actuator'
logs_1 | [ ] [,] INFO Starting ProtocolHandler ["http-nio-8580"]
logs_1 | [ ] [,] INFO Tomcat started on port(s): 8580 (http) with context path ''
logs_1 | [ ] [,] INFO Attempting to connect to: [localhost:5672]
logs_1 | [ ] [,] INFO Broker not available; cannot force queue declarations during start: java.net.ConnectException: Connection refused
logs_1 | [ ] [,] INFO Attempting to connect to: [localhost:5672]
logs_1 | [ ] [,] ERROR Failed to check/redeclare auto-delete queue(s).
logs_1 | org.springframework.amqp.AmqpConnectException: java.net.ConnectException: Connection refused
logs_1 | at org.springframework.amqp.rabbit.support.RabbitExceptionTranslator.convertRabbitAccessException(RabbitExceptionTranslator.java:61)
logs_1 | at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.createBareConnection(AbstractConnectionFactory.java:602)
logs_1 | at org.springframework.amqp.rabbit.connection.CachingConnectionFactory.createConnection(CachingConnectionFactory.java:724)
logs_1 | at org.springframework.amqp.rabbit.connection.ConnectionFactoryUtils.createConnection(ConnectionFactoryUtils.java:252)
logs_1 | at org.springframework.amqp.rabbit.core.RabbitTemplate.doExecute(RabbitTemplate.java:2163)
logs_1 | at org.springframework.amqp.rabbit.core.RabbitTemplate.execute(RabbitTemplate.java:2136)
logs_1 | at org.springframework.amqp.rabbit.core.RabbitTemplate.execute(RabbitTemplate.java:2116)
logs_1 | at org.springframework.amqp.rabbit.core.RabbitAdmin.getQueueInfo(RabbitAdmin.java:407)
logs_1 | at org.springframework.amqp.rabbit.core.RabbitAdmin.getQueueProperties(RabbitAdmin.java:391)
logs_1 | at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.attemptDeclarations(AbstractMessageListenerContainer.java:1914)
logs_1 | at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.redeclareElementsIfNecessary(AbstractMessageListenerContainer.java:1895)
logs_1 | at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.initialize(SimpleMessageListenerContainer.java:1347)
logs_1 | at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.run(SimpleMessageListenerContainer.java:1193)
logs_1 | at java.base/java.lang.Thread.run(Unknown Source)
logs_1 | Caused by: java.net.ConnectException: Connection refused
logs_1 | at java.base/sun.nio.ch.Net.pollConnect(Native Method)
logs_1 | at java.base/sun.nio.ch.Net.pollConnectNow(Unknown Source)
logs_1 | at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(Unknown Source)
logs_1 | at java.base/sun.nio.ch.NioSocketImpl.connect(Unknown Source)
logs_1 | at java.base/java.net.SocksSocketImpl.connect(Unknown Source)
logs_1 | at java.base/java.net.Socket.connect(Unknown Source)
logs_1 | at com.rabbitmq.client.impl.SocketFrameHandlerFactory.create(SocketFrameHandlerFactory.java:60)
logs_1 | at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1220)
logs_1 | at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1170)
logs_1 | at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.connectAddresses(AbstractConnectionFactory.java:640)
logs_1 | at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.connect(AbstractConnectionFactory.java:615)
logs_1 | at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.createBareConnection(AbstractConnectionFactory.java:565)
logs_1 | ... 12 common frames omitted
logs_1 | [ ] [,] INFO Attempting to connect to: [localhost:5672]
logs_1 | [ ] [,] INFO Started LogCenralizationApplication in 40.558 seconds (JVM running for 41.286)
logs_1 | [ ] [,] WARN Consumer raised exception, processing can restart if the connection factory supports it. Exception summary: org.springframework.amqp.AmqpConnectException: java.net.ConnectException: Connection refused
logs_1 | [ ] [,] INFO Restarting Consumer@22368ddc: tags=[[]], channel=null, acknowledgeMode=AUTO local queue size=0
logs_1 | [ ] [,] INFO Attempting to connect to: [localhost:5672]
logs_1 | [ ] [,] ERROR Failed to check/redeclare auto-delete queue(s).
logs_1 | org.springframework.amqp.AmqpConnectException: java.net.ConnectException: Connection refused
logs_1 | at org.springframework.amqp.rabbit.support.RabbitExceptionTranslator.convertRabbitAccessException(RabbitExceptionTranslator.java:61)
logs_1 | at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.createBareConnection(AbstractConnectionFactory.java:602)
logs_1 | at org.springframework.amqp.rabbit.connection.CachingConnectionFactory.createConnection(CachingConnectionFactory.java:724)
logs_1 | at org.springframework.amqp.rabbit.connection.ConnectionFactoryUtils.createConnection(ConnectionFactoryUtils.java:252)
logs_1 | at org.springframework.amqp.rabbit.core.RabbitTemplate.doExecute(RabbitTemplate.java:2163)
logs_1 | at org.springframework.amqp.rabbit.core.RabbitTemplate.execute(RabbitTemplate.java:2136)
logs_1 | at org.springframework.amqp.rabbit.core.RabbitTemplate.execute(RabbitTemplate.java:2116)
logs_1 | at org.springframework.amqp.rabbit.core.RabbitAdmin.getQueueInfo(RabbitAdmin.java:407)
logs_1 | at org.springframework.amqp.rabbit.core.RabbitAdmin.getQueueProperties(RabbitAdmin.java:391)
logs_1 | at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.attemptDeclarations(AbstractMessageListenerContainer.java:1914)
logs_1 | at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.redeclareElementsIfNecessary(AbstractMessageListenerContainer.java:1895)
logs_1 | at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.initialize(SimpleMessageListenerContainer.java:1347)
logs_1 | at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.run(SimpleMessageListenerContainer.java:1193)
logs_1 | at java.base/java.lang.Thread.run(Unknown Source)
logs_1 | Caused by: java.net.ConnectException: Connection refused
logs_1 | at java.base/sun.nio.ch.Net.pollConnect(Native Method)
logs_1 | at java.base/sun.nio.ch.Net.pollConnectNow(Unknown Source)
logs_1 | at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(Unknown Source)
logs_1 | at java.base/sun.nio.ch.NioSocketImpl.connect(Unknown Source)
logs_1 | at java.base/java.net.SocksSocketImpl.connect(Unknown Source)
logs_1 | at java.base/java.net.Socket.connect(Unknown Source)
logs_1 | at com.rabbitmq.client.impl.SocketFrameHandlerFactory.create(SocketFrameHandlerFactory.java:60)
logs_1 | at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1220)
logs_1 | at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1170)
logs_1 | at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.connectAddresses(AbstractConnectionFactory.java:640)
logs_1 | at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.connect(AbstractConnectionFactory.java:615)
logs_1 | at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.createBareConnection(AbstractConnectionFactory.java:565)

Metadata

Metadata

Assignees

Labels

questionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions