Closed rhonan closed 8 years ago
Actually I think it is still wating for an account-service to register. By default this takes up to 30s. It may also be because the code until today did not support multiple instances on the same host - Eureka only remembers the last one registered - so when you kill one, it has forgotten the other. This worked when I originally wrote the blog, but changed soon after. As of release-train Brixton, this is fixed again!
I have updated my blog to cover these issues: https://spring.io/blog/2015/07/14/microservices-with-spring#configuration-options.
I did the same test again with the current project and had the same result. :( My second account-service is opened inside a Virtual Machine.
1 registration, 1 web and 1 account opened on my machine... 1 account inside a Virtual Machine. Did a few requests at http://localhost:3333/accounts/123456789 with no problems then closed the account service that was running on my machine. Next request:
In order to the account service that was running inside the Virtual Machine connect on the registration service (running on my Machine) I updated the eureka.client.serviceUrl.DefaultZone to my local IP.
After a few tries it goes back to normal.
Sorry, I don't understand this sentence:
In order to the account service that was running inside the Virtual Machine connect on the registration service (running on my Machine) I updated the eureka.client.serviceUrl.DefaultZone to my local IP.
Both account services should be defining the same eureka.client.serviceUrl.DefaultZone
property. Is that what you mean?
My apologies. Yes, the difference is that one was using "localhost" (because it was running in the same host of the registration service) and the other was using the ip address from the machine that was running the registration service.
hiii... can u please tell me how to run this project... and environmet required to run this demo microservice its urgent.... please help me.......................
@piyush25890 You can follow the the instructions at https://github.com/paulc4/microservices-demo#command-line
@rhonan Thanks Rhonan.
thanku so much @rhonan @paulc4
Hi,
I'm running 1 registration, 1 web and 2 accounts, but when I close one of the accounts microservice sometimes I get the following error when I try a /accounts/123456789 :
I think it tries to send a request to the closed microservice, but it's already unregistered, it doesn't even show in the eureka's dashboard.
Thank you.