consul icon indicating copy to clipboard operation
consul copied to clipboard

The unregistered service instance is still displayed on the UI

Open hsy-go opened this issue 2 years ago • 5 comments

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

hsy-go avatar Dec 05 '23 02:12 hsy-go

@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?

huikang avatar Dec 05 '23 21:12 huikang

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

vijayraghav-io avatar Dec 06 '23 06:12 vijayraghav-io

image image image image image

deregister image

still exists image image

can not deregister again image

deepinsideDrury avatar Feb 29 '24 08:02 deepinsideDrury

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.

jjq-spirit avatar Mar 12 '24 10:03 jjq-spirit

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

AiJiangnan avatar Mar 22 '24 02:03 AiJiangnan