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.34k stars 4.42k forks source link

The unregistered service instance is still displayed on the UI #19820

Open hsy-go opened 10 months ago

hsy-go commented 10 months ago

Overview of the Issue

Hello, I use the /v1/agent/service/deregister/id interface to delete the registered service instance, but the instance is still there on the ui . This problem has been bothering me for several days. I hope you can help me.

Reproduction Steps

1,Consul with 3 service nodes enabled 2,Registered service instance using /v1/agent/service/register interface 3,Registered services can be seen using the /v1/agent/services interface and ui. 4,Deleted an instance of the service using the /v1/agent/service/deregister/id interface 5,You cannot see the deleted instance using the /v1/agent/services interface, but you can still see it on the UI.

Consul Version

1.17.0

huikang commented 10 months ago

@hsy-go , somehow I failed to reproduce this behavior in my test environment, could you provide more details to help reproduce the issue?

Consul with 3 service nodes enabled

Do you mean 3 consul server agents or something else?

How many service instances are registered? Are service instances registered at client agent or server agent?

If possible, could you provide some cli input?

vijayraghav-io commented 10 months ago

Ya, was not able to reproduce this issue, had tried from both cli and api, may be more details will help to investigate further.

deepinsideDrury commented 8 months ago
image image image image image

deregister

image

still exists

image image

can not deregister again

image
jjq-spirit commented 7 months ago

My version is 1.18.0, and I have the same problem。 By calling the API /v1/agent/service/register to register, and access /v1/agent/service/deregister/ to deregister, web UI interface is never been deleted The service still exists when viewed with catalog However, deregistering again prompts that the Service ID does not exist.

AiJiangnan commented 7 months ago

I have the same problem, and I fixed, service need a agent token to regiester and deregister. https://developer.hashicorp.com/consul/docs/security/acl/tokens/create/create-an-agent-token