hashicorp / consul

Consul is a distributed, highly available, and data center aware solution to connect and configure applications across dynamic, distributed infrastructure.
https://www.consul.io
Other
28.32k stars 4.42k forks source link

how to reregister service into Consul when the Consul is down and up again(Consul is restarted again) #8758

Closed northerndeveloper closed 4 years ago

northerndeveloper commented 4 years ago

You can see the how to reregister service into Consul

Overview of the Issue

I'm using HashiCorp Consul for my Spring Cloud Gateway application.(I am using Hoxton SR7 version). Consul is very good for service discovery and it shows my services which are connected to them successfully. But the problem is when consul is down and up again, I am not able to reregister my service to Consul again. Do you think it's possible to reregister my service to Consul back again by the configurations of HashiCorp Consul ?

Reproduction Steps

Steps to reproduce this issue, eg:

  1. Display the consul if the services(Microservices are registered to consul.
  2. Shut down the consul.
  3. Restart the consul.
  4. Display the consul again and I see that my services are not registered to consul even they are working properly when I poll my services.

Operating system and Environment details

Unix OS, Spring Cloud Gateway Hoxton SR7, HashiCorp Consul

wangyushuai commented 4 years ago

Spring Cloud Consul will only register once at app startup?

jsosulska commented 4 years ago

Hello @northerndeveloper ,

I saw that you also posted on Discuss.

I responded there and will close as this is not an issue we can replicate at this time.

Himshablp commented 1 year ago

I have the same issue, Initially, All the services up and running and consul's Discovery Server discover and registered all the services. But If I am trying to re-start my consul's_Discovery_Server. I am facing issue that's my services not getting registered with consul's_Discovery_Server when consul's_Discovery_Server get re-started....... Can any one suggest me what should I do for getting my sevices(clients) getting re-registered when consul getting restarted again.?