Open mpssantos opened 2 years ago
I discovered that if i add the following line to docker-compose config file it works:
multiplication: image: multiplication:0.0.1-SNAPSHOT environment:
- SPRING_PROFILES_ACTIVE=docker
- SPRING_CLOUD_CONSUL_HOST=consul - SPRING_RABBITMQ_HOST=rabbitmq depends_on:
- rabbitmq-dev
- consul-importer networks:
- microservices gamification: image: gamification:0.0.1 environment:
- SPRING_PROFILES_ACTIVE=docker
- SPRING_CLOUD_CONSUL_HOST=consul - SPRING_RABBITMQ_HOST=rabbitmq depends_on:
- rabbitmq-dev
- consul-importer networks:
- microservices
This means that microservices are not being able to read the application.yml from consul K/V
Any ideas why?
Thank you very much.
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.
Take care mate.
Tudo de bom para ti. Desejo-te o melhor sucesso.
Thanks for the kind words! Obrigado.
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*