You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run curl -X PUT --data @xxx.json http://xxx.xxx.xxx.xxx:8500/v1/agent/service/register register the service.
The UI interface can immediately see the registered service.
Run curl -X PUT http://xxx.xxx.xxx.xxx:8500/v1/agent/service/deregister/xxxx_xxx_https://xxx.xxx.com deregister the service failed.
Run curl -X PUT http://xxx.xxx.xxx.xxx:8500/v1/agent/service/deregister/xxxx_xxx_https%3A%2F%2Fxxx.xxx.com deregister the service failed.
Run curl -X PUT --data @xxx.json http://xxx.xxx.xxx.xxx:8500/v1/agent/service/deregister deregister the service failed.
Run consul services deregister -http-addr=http://xxx.xxx.xxx.xxx:8500 -id=xxxx_xxx_https://xxx.xxx.com deregister the service failed. Error: Error registering service "": Unexpected response code: 405 (method GET not allowed). I don't know why, but the official example is consul services deregister-id =web, consul services deregister web.json is also useless.
You can still see the registered service on the UI interface, and the information about this service through /v1/agent/services.
Prod Environment: v1.11.1 (k8s)
Test Environment: v1.15.4 (container), v1.18.0 (host)
Whether deployed in k8s mode, or container or host mode, the above three versions have no way to deregister the service through the service ID contains a URL string.
Overview of the Issue
I registered service to consul. When the service ID contains a URL string, I found it can't be deregistered.
Reproduction Steps
Steps to reproduce this issue:
curl -X PUT --data @xxx.json http://xxx.xxx.xxx.xxx:8500/v1/agent/service/register
register the service.curl -X PUT http://xxx.xxx.xxx.xxx:8500/v1/agent/service/deregister/xxxx_xxx_https://xxx.xxx.com
deregister the service failed.curl -X PUT http://xxx.xxx.xxx.xxx:8500/v1/agent/service/deregister/xxxx_xxx_https%3A%2F%2Fxxx.xxx.com
deregister the service failed.curl -X PUT --data @xxx.json http://xxx.xxx.xxx.xxx:8500/v1/agent/service/deregister
deregister the service failed.consul services deregister -http-addr=http://xxx.xxx.xxx.xxx:8500 -id=xxxx_xxx_https://xxx.xxx.com
deregister the service failed. Error:Error registering service "": Unexpected response code: 405 (method GET not allowed)
. I don't know why, but the official example isconsul services deregister-id =web
,consul services deregister web.json
is also useless./v1/agent/services
.Consul info for both Client and Server
Client info
Consul Version
Prod Environment: v1.11.1 (k8s)
Test Environment: v1.15.4 (container), v1.18.0 (host)
Whether deployed in k8s mode, or container or host mode, the above three versions have no way to deregister the service through the service ID contains a URL string.
https://github.com/hashicorp/consul/issues/13913
https://github.com/hashicorp/consul/pull/14031
There are many similar issues, and fixes, but it has not been resolved in the latest version.
Operating system and Environment details
OS:
CentOS Linux release 7.9.2009 (Core)
Kernel:
Linux 3.10.0-1160.45.1.el7.x86_64
Log Fragments
None.
The text was updated successfully, but these errors were encountered: