Kong: Get {"message":"An unexpected error occurred"}

Created on 20 Apr 2017  路  3Comments  路  Source: Kong/kong

Summary

Got {"message":"An unexpected error occurred"} when set dns_resolver

Steps To Reproduce

1.start a consul on 172.19.0.3
2.add environment variable "KONG_DNS_RESOLVER=172.19.0.3:8600" in docker-compose.yml
3.kong start --vv
4.curl 127.0.0.1:8001 in kong container

The Debug log

gateway_kong_1 | 2017-04-20T03:54:47.742654515Z 2017/04/20 03:54:47 [verbose] Kong: 0.10.1
gateway_kong_1 | 2017-04-20T03:54:47.742695175Z 2017/04/20 03:54:47 [debug] ngx_lua: 10007
gateway_kong_1 | 2017-04-20T03:54:47.742701392Z 2017/04/20 03:54:47 [debug] nginx: 1011002
gateway_kong_1 | 2017-04-20T03:54:47.742705832Z 2017/04/20 03:54:47 [debug] Lua: LuaJIT 2.1.0-beta2
gateway_kong_1 | 2017-04-20T03:54:47.742710241Z 2017/04/20 03:54:47 [verbose] no config file found at /etc/kong/kong.conf
gateway_kong_1 | 2017-04-20T03:54:47.742717582Z 2017/04/20 03:54:47 [verbose] no config file found at /etc/kong.conf
gateway_kong_1 | 2017-04-20T03:54:47.742723178Z 2017/04/20 03:54:47 [verbose] no config file, skipping loading
gateway_kong_1 | 2017-04-20T03:54:47.742727340Z 2017/04/20 03:54:47 [debug] KONG_PG_PASSWORD ENV found with "******"
gateway_kong_1 | 2017-04-20T03:54:47.742732034Z 2017/04/20 03:54:47 [debug] KONG_DNS_RESOLVER ENV found with "172.19.0.3:8600"
gateway_kong_1 | 2017-04-20T03:54:47.742736361Z 2017/04/20 03:54:47 [debug] KONG_PG_HOST ENV found with "kong-database"
gateway_kong_1 | 2017-04-20T03:54:47.742740570Z 2017/04/20 03:54:47 [debug] KONG_NGINX_DAEMON ENV found with "off"
gateway_kong_1 | 2017-04-20T03:54:47.742744582Z 2017/04/20 03:54:47 [debug] KONG_PG_USER ENV found with "kong"
gateway_kong_1 | 2017-04-20T03:54:47.742748609Z 2017/04/20 03:54:47 [debug] KONG_DATABASE ENV found with "postgres"
gateway_kong_1 | 2017-04-20T03:54:47.742781909Z 2017/04/20 03:54:47 [debug] admin_listen = "0.0.0.0:8001"
gateway_kong_1 | 2017-04-20T03:54:47.742786614Z 2017/04/20 03:54:47 [debug] admin_listen_ssl = "0.0.0.0:8444"
gateway_kong_1 | 2017-04-20T03:54:47.742790636Z 2017/04/20 03:54:47 [debug] admin_ssl = true
gateway_kong_1 | 2017-04-20T03:54:47.742794734Z 2017/04/20 03:54:47 [debug] anonymous_reports = true
gateway_kong_1 | 2017-04-20T03:54:47.742798785Z 2017/04/20 03:54:47 [debug] cassandra_consistency = "ONE"
gateway_kong_1 | 2017-04-20T03:54:47.742802879Z 2017/04/20 03:54:47 [debug] cassandra_contact_points = {"127.0.0.1"}
gateway_kong_1 | 2017-04-20T03:54:47.742807041Z 2017/04/20 03:54:47 [debug] cassandra_data_centers = {"dc1:2","dc2:3"}
gateway_kong_1 | 2017-04-20T03:54:47.742811233Z 2017/04/20 03:54:47 [debug] cassandra_keyspace = "kong"
gateway_kong_1 | 2017-04-20T03:54:47.742815156Z 2017/04/20 03:54:47 [debug] cassandra_lb_policy = "RoundRobin"
gateway_kong_1 | 2017-04-20T03:54:47.742819199Z 2017/04/20 03:54:47 [debug] cassandra_port = 9042
gateway_kong_1 | 2017-04-20T03:54:47.742823024Z 2017/04/20 03:54:47 [debug] cassandra_repl_factor = 1
gateway_kong_1 | 2017-04-20T03:54:47.742826779Z 2017/04/20 03:54:47 [debug] cassandra_repl_strategy = "SimpleStrategy"
gateway_kong_1 | 2017-04-20T03:54:47.742830725Z 2017/04/20 03:54:47 [debug] cassandra_ssl = false
gateway_kong_1 | 2017-04-20T03:54:47.742834421Z 2017/04/20 03:54:47 [debug] cassandra_ssl_verify = false
gateway_kong_1 | 2017-04-20T03:54:47.742838257Z 2017/04/20 03:54:47 [debug] cassandra_timeout = 5000
gateway_kong_1 | 2017-04-20T03:54:47.742843042Z 2017/04/20 03:54:47 [debug] cassandra_username = "kong"
gateway_kong_1 | 2017-04-20T03:54:47.742847269Z 2017/04/20 03:54:47 [debug] cluster_listen = "0.0.0.0:7946"
gateway_kong_1 | 2017-04-20T03:54:47.742851175Z 2017/04/20 03:54:47 [debug] cluster_listen_rpc = "127.0.0.1:7373"
gateway_kong_1 | 2017-04-20T03:54:47.742855175Z 2017/04/20 03:54:47 [debug] cluster_profile = "wan"
gateway_kong_1 | 2017-04-20T03:54:47.742866889Z 2017/04/20 03:54:47 [debug] cluster_ttl_on_failure = 3600
gateway_kong_1 | 2017-04-20T03:54:47.742871530Z 2017/04/20 03:54:47 [debug] custom_plugins = {}
gateway_kong_1 | 2017-04-20T03:54:47.742881622Z 2017/04/20 03:54:47 [debug] database = "postgres"
gateway_kong_1 | 2017-04-20T03:54:47.742887635Z 2017/04/20 03:54:47 [debug] dns_hostsfile = "/etc/hosts"
gateway_kong_1 | 2017-04-20T03:54:47.742891788Z 2017/04/20 03:54:47 [debug] dns_resolver = {"172.19.0.3:8600"}
gateway_kong_1 | 2017-04-20T03:54:47.742896022Z 2017/04/20 03:54:47 [debug] log_level = "notice"
gateway_kong_1 | 2017-04-20T03:54:47.742899973Z 2017/04/20 03:54:47 [debug] lua_code_cache = "on"
gateway_kong_1 | 2017-04-20T03:54:47.742903981Z 2017/04/20 03:54:47 [debug] lua_package_cpath = ""
gateway_kong_1 | 2017-04-20T03:54:47.742907907Z 2017/04/20 03:54:47 [debug] lua_package_path = "?/init.lua;./kong/?.lua"
gateway_kong_1 | 2017-04-20T03:54:47.742911945Z 2017/04/20 03:54:47 [debug] lua_socket_pool_size = 30
gateway_kong_1 | 2017-04-20T03:54:47.742915738Z 2017/04/20 03:54:47 [debug] lua_ssl_verify_depth = 1
gateway_kong_1 | 2017-04-20T03:54:47.742919607Z 2017/04/20 03:54:47 [debug] mem_cache_size = "128m"
gateway_kong_1 | 2017-04-20T03:54:47.742923438Z 2017/04/20 03:54:47 [debug] nginx_daemon = "off"
gateway_kong_1 | 2017-04-20T03:54:47.742927431Z 2017/04/20 03:54:47 [debug] nginx_optimizations = true
gateway_kong_1 | 2017-04-20T03:54:47.742931278Z 2017/04/20 03:54:47 [debug] nginx_worker_processes = "auto"
gateway_kong_1 | 2017-04-20T03:54:47.742935218Z 2017/04/20 03:54:47 [debug] pg_database = "kong"
gateway_kong_1 | 2017-04-20T03:54:47.742939009Z 2017/04/20 03:54:47 [debug] pg_host = "kong-database"
gateway_kong_1 | 2017-04-20T03:54:47.742942906Z 2017/04/20 03:54:47 [debug] pg_password = "******"
gateway_kong_1 | 2017-04-20T03:54:47.742946721Z 2017/04/20 03:54:47 [debug] pg_port = 5432
gateway_kong_1 | 2017-04-20T03:54:47.742950522Z 2017/04/20 03:54:47 [debug] pg_ssl = false
gateway_kong_1 | 2017-04-20T03:54:47.742954225Z 2017/04/20 03:54:47 [debug] pg_ssl_verify = false
gateway_kong_1 | 2017-04-20T03:54:47.742958105Z 2017/04/20 03:54:47 [debug] pg_user = "kong"
gateway_kong_1 | 2017-04-20T03:54:47.742961900Z 2017/04/20 03:54:47 [debug] prefix = "/usr/local/kong/"
gateway_kong_1 | 2017-04-20T03:54:47.742965966Z 2017/04/20 03:54:47 [debug] proxy_listen = "0.0.0.0:8000"
gateway_kong_1 | 2017-04-20T03:54:47.742969771Z 2017/04/20 03:54:47 [debug] proxy_listen_ssl = "0.0.0.0:8443"
gateway_kong_1 | 2017-04-20T03:54:47.742973663Z 2017/04/20 03:54:47 [debug] serf_path = "serf"
gateway_kong_1 | 2017-04-20T03:54:47.742977455Z 2017/04/20 03:54:47 [debug] ssl = true
gateway_kong_1 | 2017-04-20T03:54:47.742981138Z 2017/04/20 03:54:47 [debug] upstream_keepalive = 60
gateway_kong_1 | 2017-04-20T03:54:47.742984862Z 2017/04/20 03:54:47 [verbose] prefix in use: /usr/local/kong
gateway_kong_1 | 2017-04-20T03:54:47.742988599Z 2017/04/20 03:54:47 [verbose] preparing nginx prefix directory at /usr/local/kong
gateway_kong_1 | 2017-04-20T03:54:47.742992455Z 2017/04/20 03:54:47 [verbose] saving serf identifier to /usr/local/kong/serf/serf.id
gateway_kong_1 | 2017-04-20T03:54:47.742996312Z 2017/04/20 03:54:47 [debug] searching for OpenResty 'resty' executable
gateway_kong_1 | 2017-04-20T03:54:47.743004740Z 2017/04/20 03:54:47 [debug] /usr/local/openresty/bin/resty -V: 'nginx version: openresty/1.11.2.2'
gateway_kong_1 | 2017-04-20T03:54:47.743009360Z 2017/04/20 03:54:47 [debug] found OpenResty 'resty' executable at /usr/local/openresty/bin/resty
gateway_kong_1 | 2017-04-20T03:54:47.743013499Z 2017/04/20 03:54:47 [verbose] saving serf shell script handler to /usr/local/kong/serf/serf_event.sh
gateway_kong_1 | 2017-04-20T03:54:47.743017664Z 2017/04/20 03:54:47 [verbose] SSL enabled, no custom certificate set: using default certificate
gateway_kong_1 | 2017-04-20T03:54:50.592602406Z 2017/04/20 03:54:47 [ver2017/04/20 03:54:50 Service not registered: Unexpected response code: 500 (CheckID "kong-8000-6f63cc955ab1-gateway-kong-1" does not have associated TTL)
gateway_kong_1 | 2017-04-20T03:54:50.598526615Z 2017/04/20 03:54:50 Service registered: kong-8000

Most helpful comment

I suppose it's something trivial, but how did you solve this?

All 3 comments

problem solved, but another problem show up, question same as #2333

I suppose it's something trivial, but how did you solve this?

Hi @cospotato, what was causing the issue?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

noamelf picture noamelf  路  36Comments

grillorafael picture grillorafael  路  42Comments

daviesf1 picture daviesf1  路  39Comments

throrin19 picture throrin19  路  39Comments

marktopper picture marktopper  路  41Comments