Hello,
I’ve stopped consul on one of our nodes; it shows as “left” on the members list, but it is still in the catalog. Found issues about this online, and it looks like “force-leave” or manually deregistering it should do the trick, but I’ve had no luck running those commands. Examples below:
[ec2-user@consul_server-qa-bol-0 ~]$ consul members | grep "backend-qa-bol-1"
backend-qa-bol-1 10.81.64.40:8301 left client 1.9.0 2 us-east-1 <default>
[ec2-user@consul_server-qa-bol-0 ~]$ consul catalog nodes | grep "backend-qa-bol-1"
backend-qa-bol-1 034e24fc 10.81.64.40 us-east-1
[ec2-user@consul_server-qa-bol-0 ~]$ curl --request PUT http://127.0.0.1:8500/v1/agent/force-leave/backend-qa-bol-1?prune
[ec2-user@consul_server-qa-bol-0 ~]$ consul catalog nodes | grep "backend-qa-bol-1"
backend-qa-bol-1 034e24fc 10.81.64.40 us-east-1
[ec2-user@consul_server-qa-bol-0 ~]$ consul members | grep "backend-qa-bol-1"
[ec2-user@consul_server-qa-bol-0 ~]$ curl --request PUT http://127.0.0.1:8500/v1/agent/deregister/backend-qa-bol-1
[ec2-user@consul_server-qa-bol-0 ~]$ consul catalog nodes | grep "backend-qa-bol-1"
backend-qa-bol-1 034e24fc 10.81.64.40 us-east-1
[ec2-user@consul_server-qa-bol-0 ~]$
Does anyone know how to force the removal of a node from the catalog?