hashicorp / hashicorp/consul

special characters in service id,can not deregister

Open
#20,122 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
30.1k
Forks
4.6k
Avg merge
2d 6h
Merged PRs (30d)
43

Description

consul version: v1.14.5

#### Overview of the Issue

I accidentally registered a service with special characters in consul, now can not be deleted, an error is reported `400 Bad Request`. How to resolved?

![7182f850cd65f0f71e441df8c484f965](https://github.com/hashicorp/consul/assets/45453883/e79cf383-a85b-4c0a-8f69-943148e89483)

`curl -X PUT -H 'X-Consul-Token: cd76a0f7-xxxx-xxxx-xxxx-073462acc6c7' 'http://192.168.120.57:8500/v1/agent/service/deregister/202.xxx.xxx.12:9062%E2%80%A8name=ymgjexporter' -v`
```
...
400 Bad Request
...
```

#### Overview of the Issue

---

#### Reproduction Steps

### Consul info for both Client and Server

Client info

```
Output from client 'consul info' command here
```

```
Client agent HCL config
```

Server info

```
Output from server 'consul info' command here
```

```
Server agent HCL config
```

### Operating system and Environment details

### Log Fragments

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.