Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DNS issues #1032

Closed
Kosta-Github opened this issue Jun 14, 2015 · 1 comment
Closed

DNS issues #1032

Kosta-Github opened this issue Jun 14, 2015 · 1 comment

Comments

@Kosta-Github
Copy link

When doing a SRV query with dig I get the expected results for a service registered with consul, e.g.:

$ dig elasticsearch.service.consul SRV

; <<>> DiG 9.9.5-3ubuntu0.2-Ubuntu <<>> elasticsearch.service.consul SRV
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 4673
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; QUESTION SECTION:
;elasticsearch.service.consul.  IN  SRV

;; ANSWER SECTION:
elasticsearch.service.consul. 0 IN  SRV 1 1 9200 ant-005.node.ecs-dev.consul.

;; ADDITIONAL SECTION:
ant-005.node.ecs-dev.consul. 0  IN  A   10.50.80.36

;; Query time: 5 msec
;; SERVER: 10.50.80.217#53(10.50.80.217)
;; WHEN: Sun Jun 14 11:28:42 PDT 2015
;; MSG SIZE  rcvd: 164

Note the IP address of 10.50.80.36. If I do the same query without SRV I always get the IP address of the current consul master (10.50.80.217) answering the DNS query, e.g.:

$ dig elasticsearch.service.consul

; <<>> DiG 9.9.5-3ubuntu0.2-Ubuntu <<>> elasticsearch.service.consul
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 37955
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;elasticsearch.service.consul.  IN  A

;; ANSWER SECTION:
elasticsearch.service.consul. 0 IN  A   10.50.80.217

;; Query time: 2 msec
;; SERVER: 10.50.80.217#53(10.50.80.217)
;; WHEN: Sun Jun 14 11:28:52 PDT 2015
;; MSG SIZE  rcvd: 62

And by the way, I also get the IP address of the consul master for all non-registered services as well:

$ dig i-do-not-exist.service.consul

; <<>> DiG 9.9.5-3ubuntu0.2-Ubuntu <<>> i-do-not-exist.service.consul
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 18972
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;i-do-not-exist.service.consul. IN  A

;; ANSWER SECTION:
i-do-not-exist.service.consul. 0 IN A   10.50.80.217

;; Query time: 2 msec
;; SERVER: 10.50.80.217#53(10.50.80.217)
;; WHEN: Sun Jun 14 11:34:23 PDT 2015
;; MSG SIZE  rcvd: 63

Is that a known issue or a mis-configuration somewhere? This happens inside of PanteraS using consul 0.5.2, if that matters...

@Kosta-Github
Copy link
Author

OK, closing this here, since it seems to be a PanteraS issue (or feature): eBayClassifiedsGroup/PanteraS#57 (comment)

duckhan pushed a commit to duckhan/consul that referenced this issue Oct 24, 2021
hashicorp#1032)

* update the wording for the consul sidecar to reflect current behaviour

Co-authored-by: Nitya Dhanushkodi <nitya@hashicorp.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant