-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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 resolve error! #3210
Comments
please apply this patch: https://github.com/Kong/kong/pull/3177/files and then try again. It won't fix it, but will provide better insight in the error. |
thank you ,i did patch it, so i get error log : 2018/02/10 19:45:28 [error] 23237#0: *930 [lua] balancer.lua:703: execute(): [dns] 32776. Tried: (short)demo.service.consul:(na) - cache-miss I think Kong has been query and achieved the correct results: port 32776, service :demo.service.consul , but why do it report a mistake? dig info: ; <<>> DiG 9.9.4-RedHat-9.9.4-51.el7_4.2 <<>> @127.0.1 -p8600 demo.service.consul SRV ;; OPT PSEUDOSECTION: ;; ANSWER SECTION: ;; ADDITIONAL SECTION: ;; Query time: 1 msec |
I have to try and reproduce this. What strikes me as odd is this line from the log:
Which means it considered the record type TXT (int 16) as a cache hit, though it is not configured to even look for that type. Can you try to disabled the TXT entry returned by Consul? |
Found the issue. The problem was indeed caused by the TXT entry, which was not properly handled by the dns client. As a workaround you can try:
|
If the additional section would contain a TXT record, then that would be set as the success type, and `last` would try and look for that. The cache lookup would succeed, but since it doesn't have a `address` field, `toip()` would return `nil`. fixes Kong/kong#3210
If the additional section would contain a TXT record, then that would be set as the success type, and `last` would try and look for that. The cache lookup would succeed, but since it doesn't have a `address` field, `toip()` would return `nil`. fixes Kong/kong#3210
If the additional section would contain a TXT record, then that would be set as the success type, and `last` would try and look for that. The cache lookup would succeed, but since it doesn't have a `address` field, `toip()` would return `nil`. fixes Kong/kong#3210
Let's keep this open until the new dns-client has been released and the Kong dependency has been updated. |
thank you very much. I adopt your suggestion that this problem has been solved |
@gbhuoo which kong version did you use then to fix this issue? eagerly waiting for your reply |
@mayank-allen this issue was fixed 7 years ago. So unless you have an extremely old version (in which case we'll ask you to upgrade first), this is most likely not the same cause as your issue (assuming you have one). If you have an issue, then probably best to file a new issue with proper details of how to reproduce and what errors you get. |
@Tieske this is the recent thread of this year- #12568 |
Kong: 0.12.1
Consul v1.0.3
kong.conf
dns_resolver = 192.168.5.232:8600
but , kong Can not be resolve normally,error info below:
logs/error.log
2018/02/10 12:20:02 [error] 31047#0: *3997 [lua] responses.lua:121: after(): failed the initial dns/balancer resolve for 'auth_center.service.consul' with: 32844, client: 10.0.0.143, server: kong, request: "GET /auth_center/v3 HTTP/1.1", host: "192.168.5.232:8083"
but, i do consul query, consul is ok:
[root@docker4-test consul]# dig @192.168.5.232 -p8600 auth_center.service.consul
; <<>> DiG 9.9.4-RedHat-9.9.4-51.el7_4.2 <<>> @192.168.5.232 -p8600 auth_center.service.consul
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 51595
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; WARNING: recursion requested but not available
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;auth_center.service.consul. IN A
;; ANSWER SECTION:
auth_center.service.consul. 0 IN A 192.168.5.232
;; Query time: 2 msec
;; SERVER: 192.168.5.232#8600(192.168.5.232)
;; WHEN: 六 2月 10 12:40:39 CST 2018
;; MSG SIZE rcvd: 71
The text was updated successfully, but these errors were encountered: