When we close agent, service discovery is not working when consul agents are alive

when I apply the command “consul leave” and restart the consul or make the consul agents alive, I am not able to enable service discovery in consul. Do you think it’s possible ? IS there any configuration for that ?

Hello @northerndeveloper,

I saw you posted on GitHub as well. More information for others reading this can be found here.

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

Welcome to Consul! This is the best place to ask questions. I don’t have enough information to start to answer your question.

  • Can you post your configuration?
  • Can you post a sample app that is able to replicate this issue?

Unfortunately, I am not able to replicate what you described. Have you asked for support on SpringCloud’s repo?