consul icon indicating copy to clipboard operation
consul copied to clipboard

Consul service name include '@' , Consul agent can't resolve right record by DNS Query.

Open xinyu7git opened this issue 8 years ago • 1 comments

My Service Name: cn-bj2@mysql@usre-service-admin-public , because of some reasons , I cannot modify service name.

dig @127.0.0.1 -p 8600 cn-bj2@[email protected]

but the command is invaild.

xinyu7git avatar Nov 27 '18 10:11 xinyu7git

Thanks for reporting. Your service name contains characters that are not allowed in DNS. Documented here: https://www.consul.io/docs/agent/services.html#service-and-tag-names-with-dns. I think you servicename is valid without the @.

Also depending on your shell you might want to escape your service name:

dig @127.0.0.1 -p 8600 'cn-bj2@[email protected]'

hanshasselberg avatar Nov 27 '18 10:11 hanshasselberg