{"action":"created","issue":{"url":"https://api.github.com/repos/Mashape/kong/issues/2574","repository_url":"https://api.github.com/repos/Mashape/kong","labels_url":"https://api.github.com/repos/Mashape/kong/issues/2574/labels{/name}","comments_url":"https://api.github.com/repos/Mashape/kong/issues/2574/comments","events_url":"https://api.github.com/repos/Mashape/kong/issues/2574/events","html_url":"https://github.com/Mashape/kong/issues/2574","id":232102018,"number":2574,"title":"Consul DNS cannot work with dns_resolve?","user":{"login":"iam-merlin","id":2074733,"avatar_url":"https://avatars2.githubusercontent.com/u/2074733?v=3","gravatar_id":"","url":"https://api.github.com/users/iam-merlin","html_url":"https://github.com/iam-merlin","followers_url":"https://api.github.com/users/iam-merlin/followers","following_url":"https://api.github.com/users/iam-merlin/following{/other_user}","gists_url":"https://api.github.com/users/iam-merlin/gists{/gist_id}","starred_url":"https://api.github.com/users/iam-merlin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iam-merlin/subscriptions","organizations_url":"https://api.github.com/users/iam-merlin/orgs","repos_url":"https://api.github.com/users/iam-merlin/repos","events_url":"https://api.github.com/users/iam-merlin/events{/privacy}","received_events_url":"https://api.github.com/users/iam-merlin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"Tieske","id":1077043,"avatar_url":"https://avatars2.githubusercontent.com/u/1077043?v=3","gravatar_id":"","url":"https://api.github.com/users/Tieske","html_url":"https://github.com/Tieske","followers_url":"https://api.github.com/users/Tieske/followers","following_url":"https://api.github.com/users/Tieske/following{/other_user}","gists_url":"https://api.github.com/users/Tieske/gists{/gist_id}","starred_url":"https://api.github.com/users/Tieske/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tieske/subscriptions","organizations_url":"https://api.github.com/users/Tieske/orgs","repos_url":"https://api.github.com/users/Tieske/repos","events_url":"https://api.github.com/users/Tieske/events{/privacy}","received_events_url":"https://api.github.com/users/Tieske/received_events","type":"User","site_admin":false},"assignees":[{"login":"Tieske","id":1077043,"avatar_url":"https://avatars2.githubusercontent.com/u/1077043?v=3","gravatar_id":"","url":"https://api.github.com/users/Tieske","html_url":"https://github.com/Tieske","followers_url":"https://api.github.com/users/Tieske/followers","following_url":"https://api.github.com/users/Tieske/following{/other_user}","gists_url":"https://api.github.com/users/Tieske/gists{/gist_id}","starred_url":"https://api.github.com/users/Tieske/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tieske/subscriptions","organizations_url":"https://api.github.com/users/Tieske/orgs","repos_url":"https://api.github.com/users/Tieske/repos","events_url":"https://api.github.com/users/Tieske/events{/privacy}","received_events_url":"https://api.github.com/users/Tieske/received_events","type":"User","site_admin":false}],"milestone":null,"comments":5,"created_at":"2017-05-29T21:38:47Z","updated_at":"2017-06-07T10:14:40Z","closed_at":null,"body":"### Summary\r\nWhen I set the kong configuration with a dns_resolve to consul DNS (8600 or 53), kong will not work and the following error is shown on (`HTTP 500`) `http://localhost:8001/status` (or other endpoint) : `{\"message\":\"An unexpected error occurred\"}`\r\n\r\nOn the other hand... the DNS server is reachable (I can ping it, dig it and resolv) :\r\n\r\n```\r\n[root@0d3b3d385a3b /]# dig @172.18.0.2 -p 53 another.service.consul\r\n\r\n; <<>> DiG 9.9.4-RedHat-9.9.4-38.el7_3.3 <<>> @172.18.0.2 -p 53 another.service.consul\r\n; (1 server found)\r\n;; global options: +cmd\r\n;; Got answer:\r\n;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 42931\r\n;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0\r\n;; WARNING: recursion requested but not available\r\n\r\n;; QUESTION SECTION:\r\n;another.service.consul.\t\tIN\tA\r\n\r\n;; ANSWER SECTION:\r\nanother.service.consul.\t0\tIN\tA\t172.18.0.7\r\n\r\n;; Query time: 1 msec\r\n;; SERVER: 172.18.0.2#53(172.18.0.2)\r\n;; WHEN: Mon May 29 21:35:03 UTC 2017\r\n;; MSG SIZE  rcvd: 56\r\n```\r\n\r\nIn the kong logs there is not a lot of informations but something wrong is happening :\r\n```\r\n2017/05/29 21:26:42 [error] 217#0: *1565 [lua] responses.lua:107: send_HTTP_INTERNAL_SERVER_ERROR(): [postgres error] [toip() name lookup failed]: dns server error; 2 server failure, client: 127.0.0.1, server: kong, request: \"GET / HTTP/1.1\", host: \"localhost:8000\"\r\n2017/05/29 21:26:42 [error] 217#0: *1568 [lua] responses.lua:107: [postgres error] [toip() name lookup failed]: dns server error; 2 server failure, client: 127.0.0.1, server: kong_admin, request: \"GET /status HTTP/1.1\", host: \"localhost:8001\"\r\n2017/05/29 21:26:42 [error] 217#0: *1572 [lua] certificate.lua:15: log(): [ssl] [postgres error] [toip() name lookup failed]: dns server error; 2 server failure, context: ssl_certificate_by_lua*, client: 127.0.0.1, server: 0.0.0.0:8443\r\n2017/05/29 21:26:42 [crit] 217#0: *1566 SSL_do_handshake() failed (SSL: error:1408A179:SSL routines:ssl3_get_client_hello:cert cb error) while SSL handshaking, client: 127.0.0.1, server: 0.0.0.0:8443\r\n```\r\n\r\n### Additional Details & Logs\r\n\r\n- Kong version : 0.10.3 (same with others version)\r\n- Latest Docker image\r\n- With --vv I can see that the address is set on the dns resolver is good : `2017/05/29 21:36:09 [debug] dns_resolver = {\"172.18.0.2\"}`\r\n- Docker consul used : `https://hub.docker.com/_/consul/` (latest/0.8.3)\r\n\r\nI previously tested `Progrium/Consul` and I've the same issue that's why I move to the official repository. Don't know why this error is happening again... if at least I can have more informations I'll be able to debug and fix kong or consul... now, I'm stucked\r\n"},"comment":{"url":"https://api.github.com/repos/Mashape/kong/issues/comments/306752485","html_url":"https://github.com/Mashape/kong/issues/2574#issuecomment-306752485","issue_url":"https://api.github.com/repos/Mashape/kong/issues/2574","id":306752485,"user":{"login":"iam-merlin","id":2074733,"avatar_url":"https://avatars2.githubusercontent.com/u/2074733?v=3","gravatar_id":"","url":"https://api.github.com/users/iam-merlin","html_url":"https://github.com/iam-merlin","followers_url":"https://api.github.com/users/iam-merlin/followers","following_url":"https://api.github.com/users/iam-merlin/following{/other_user}","gists_url":"https://api.github.com/users/iam-merlin/gists{/gist_id}","starred_url":"https://api.github.com/users/iam-merlin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iam-merlin/subscriptions","organizations_url":"https://api.github.com/users/iam-merlin/orgs","repos_url":"https://api.github.com/users/iam-merlin/repos","events_url":"https://api.github.com/users/iam-merlin/events{/privacy}","received_events_url":"https://api.github.com/users/iam-merlin/received_events","type":"User","site_admin":false},"created_at":"2017-06-07T10:14:40Z","updated_at":"2017-06-07T10:14:40Z","body":"btw, I never tried. Kong can loadbalance using dns providing by `resolv.conf`?"}}
{"actor":{"display_login":"iam-merlin"}}