You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, congratulations for this great book. You touch in all most every challenge that we face when adopting a microservice architecture. And you do it on a very pragmatic way. Your language is simple and easy to follow. At the same time you introduce several nice tools. A big thank you for writing this book to us.
I am almost finishing the book. I am no chapter 8 on Docker Compose sub chapter but I am with difficulties to bring up all application. Via docker composer i was able to bring up successfully Consul, Rabbitmq, frontend and gateway. multiplication and gamification are throwing exceptions because they cannot connect to Rabbitmq
Status of containers
root@mpssantos-Lenovo-Yoga-S740-14IIL:/home/mpssantos/Development/workspace/springbootmicroservices/docker-config# docker-compose ps
Name Command State Ports
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
consul docker-entrypoint.sh agent ... Up 8300/tcp, 8301/tcp, 8301/udp, 8302/tcp, 8302/udp, 0.0.0.0:8500->8500/tcp,:::8500->8500/tcp, 8600/tcp, 0.0.0.0:8600->8600/udp,:::8600->8600/udp
docker-config_consul-importer_1 /bin/sh -c until consul kv ... Exit 0
docker-config_frontend_1 /docker-entrypoint.sh ngin ... Up 0.0.0.0:3000->80/tcp,:::3000->80/tcp
docker-config_gamification_1 java -jar gamification-0.0 ... Up 8081/tcp
docker-config_gateway_1 /cnb/process/web Up 0.0.0.0:8000->8000/tcp,:::8000->8000/tcp
docker-config_multiplication_1 /cnb/process/web Up
rabbitmq docker-entrypoint.sh rabbi ... Up 15671/tcp, 0.0.0.0:15672->15672/tcp,:::15672->15672/tcp, 15691/tcp, 15692/tcp, 25672/tcp, 4369/tcp, 5671/tcp, 0.0.0.0:5672->5672/tcp,:::5672->5672/tcp
022-01-28 23:52:06.396 INFO 1 --- [nio-8080-exec-5] o.s.a.r.c.CachingConnectionFactory : Attempting to connect to: [localhost:5672]
multiplication_1 | 2022-01-28 23:52:06.397 WARN 1 --- [nio-8080-exec-5] o.s.b.a.amqp.RabbitHealthIndicator : Rabbit health check failed
multiplication_1 |
multiplication_1 | org.springframework.amqp.AmqpConnectException: java.net.ConnectException: Connection refused
multiplication_1 | at org.springframework.amqp.rabbit.support.RabbitExceptionTranslator.convertRabbitAccessException(RabbitExceptionTranslator.java:61) ~[spring-rabbit-2.4.1.jar:2.4.1]
multiplication_1 | at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.createBareConnection(AbstractConnectionFactory.java:602) ~[spring-rabbit-2.4.1.jar:2.4.1]
multiplication_1 | at org.springframework.amqp.rabbit.connection.CachingConnectionFactory.createConnection(CachingConnectionFactory.java:724) ~[spring-rabbit-2.4.1.jar:2.4.1]
multiplication_1 | at org.springframework.amqp.rabbit.connection.ConnectionFactoryUtils.createConnection(ConnectionFactoryUtils.java:252) ~[spring-rabbit-2.4.1.jar:2.4.1]
multiplication_1 | at org.springframework.amqp.rabbit.core.RabbitTemplate.doExecute(RabbitTemplate.java:2165) ~[spring-rabbit-2.4.1.jar:2.4.1]
multiplication_1 | at org.springframework.amqp.rabbit.core.RabbitTemplate.execute(RabbitTemplate.java:2138) ~[spring-rabbit-2.4.1.jar:2.4.1]
multiplication_1 | at org.springframework.amqp.rabbit.core.RabbitTemplate.execute(RabbitTemplate.java:2118) ~[spring-rabbit-2.4.1.jar:2.4.1]
multiplication_1 | at org.springframework.boot.actuate.amqp.RabbitHealthIndicator.getVersion(RabbitHealthIndicator.java:49) ~[spring-boot-actuator-2.6.2.jar:2.6.2]
multiplication_1 | at org.springframework.boot.actuate.amqp.RabbitHealthIndicator.doHealthCheck(RabbitHealthIndicator.java:44) ~[spring-boot-actuator-2.6.2.jar:2.6.2]
multiplication_1 | at org.springframework.boot.actuate.health.AbstractHealthIndicator.health(AbstractHealthIndicator.java:82) ~[spring-boot-actuator-2.6.2.jar:2.6.2]
multiplication_1 | at org.springframework.boot.actuate.health.HealthIndicator.getHealth(HealthIndicator.java:37) ~[spring-boot-actuator-2.6.2.jar:2.6.2]
multiplication_1 | at org.springframework.boot.actuate.health.HealthEndpointWebExtension.getHealth(HealthEndpointWebExtension.java:87) ~[spring-boot-actuator-2.6.2.jar:2.6.2]
multiplication_1 | at org.springframework.boot.actuate.health.HealthEndpointWebExtension.getHealth(HealthEndpointWebExtension.java:45) ~[spring-boot-actuator-2.6.2.jar:2.6.2]
multiplication_1 | at org.springframework.boot.actuate.health.HealthEndpointSupport.getContribution(HealthEndpointSupport.java:130) ~[spring-boot-actuator-2.6.2.jar:2.6.2]
multiplication_1 | at org.springframework.boot.actuate.health.HealthEndpointSupport.getAggregateContribution(HealthEndpointSupport.java:141) ~[spring-boot-actuator-2.6.2.jar:2.6.2]
multiplication_1 | at org.springframework.boot.actuate.health.HealthEndpointSupport.getContribution(HealthEndpointSupport.java:126) ~[spring-boot-actuator-2.6.2.jar:2.6.2]
multiplication_1 | at org.springframework.boot.actuate.health.HealthEndpointSupport.getHealth(HealthEndpointSupport.java:95) ~[spring-boot-actuator-2.6.2.jar:2.6.2]
multiplication_1 | at org.springframework.boot.actuate.health.HealthEndpointSupport.getHealth(HealthEndpointSupport.java:66) ~[spring-boot-actuator-2.6.2.jar:2.6.2]
multiplication_1 | at org.springframework.boot.actuate.health.HealthEndpointWebExtension.health(HealthEndpointWebExtension.java:73) ~[spring-boot-actuator-2.6.2.jar:2.6.2]
multiplication_1 | at org.springframework.boot.actuate.health.HealthEndpointWebExtension.health(HealthEndpointWebExtension.java:62) ~[spring-boot-actuator-2.6.2.jar:2.6.2]
MORE STACK STRACE
multiplication_1 | Caused by: java.net.ConnectException: Connection refused
multiplication_1 | at java.base/sun.nio.ch.Net.pollConnect(Native Method) ~[na:na]
multiplication_1 | at java.base/sun.nio.ch.Net.pollConnectNow(Unknown Source) ~[na:na]
multiplication_1 | at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(Unknown Source) ~[na:na]
multiplication_1 | at java.base/sun.nio.ch.NioSocketImpl.connect(Unknown Source) ~[na:na]
multiplication_1 | at java.base/java.net.SocksSocketImpl.connect(Unknown Source) ~[na:na]
multiplication_1 | at java.base/java.net.Socket.connect(Unknown Source) ~[na:na]
multiplication_1 | at com.rabbitmq.client.impl.SocketFrameHandlerFactory.create(SocketFrameHandlerFactory.java:60) ~[amqp-client-5.13.1.jar:5.13.1]
multiplication_1 | at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1223) ~[amqp-client-5.13.1.jar:5.13.1]
multiplication_1 | at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:1173) ~[amqp-client-5.13.1.jar:5.13.1]
multiplication_1 | at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.connectAddresses(AbstractConnectionFactory.java:640) ~[spring-rabbit-2.4.1.jar:2.4.1]
multiplication_1 | at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.connect(AbstractConnectionFactory.java:615) ~[spring-rabbit-2.4.1.jar:2.4.1]
multiplication_1 | at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.createBareConnection(AbstractConnectionFactory.java:565) ~[spring-rabbit-2.4.1.jar:2.4.1]
multiplication_1 | ... 79 common frames omitted
multiplication_1 |
consul | 2022-01-28T23:52:06.403Z [WARN] agent: Check is now critical: check=service:multiplication-8080
The gamification exceptions are identical
Looks like the auto configuration for Rabbitmq fails, but i cannot understand why.
Can you spot anything strange? How can i debug? Do you need me to supply any other file config file.
Thank you so much for your help.
Once again congratulation for your book. 5*
The text was updated successfully, but these errors were encountered:
I already discovered the issue. it has something to do with an update to Spring Cloud Consul. Since version 3.1.0 (the one i am using in my source code) the bootstrap.properties file is deprecated. We should use application.properties file in conjunction with spring.config.import attribute.
This worked for me.
Thank you so much for this wonderful book. Congratulations.
It's really cool you found the solution as well, thanks for sharing! I think it might be related to the changes described in this blog post.
Let me know if that fix works for you (in case you try it). There are some other issues in that same blog post that could be applicable for you as well.
If you find the book useful, don't forget to leave a review on Goodreads / Amazon or your preferred platform, that helps a lot! 😄
Hi Moisés Garcia,
How are you? I hope you are doing fine.
First of all, congratulations for this great book. You touch in all most every challenge that we face when adopting a microservice architecture. And you do it on a very pragmatic way. Your language is simple and easy to follow. At the same time you introduce several nice tools. A big thank you for writing this book to us.
I am almost finishing the book. I am no chapter 8 on Docker Compose sub chapter but I am with difficulties to bring up all application. Via docker composer i was able to bring up successfully Consul, Rabbitmq, frontend and gateway. multiplication and gamification are throwing exceptions because they cannot connect to Rabbitmq
Status of containers
Docker Compose
consul-kv-docker.json
Exception
The gamification exceptions are identical
Looks like the auto configuration for Rabbitmq fails, but i cannot understand why.
Can you spot anything strange? How can i debug? Do you need me to supply any other file config file.
Thank you so much for your help.
Once again congratulation for your book. 5*
The text was updated successfully, but these errors were encountered: