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

fix(balancer) log the tries upon a dns error #3177

Merged
merged 1 commit into from
Jan 25, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions kong/core/balancer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -696,10 +696,14 @@ local function execute(target)

else
-- have to do a regular DNS lookup
ip, port = toip(target.host, target.port, dns_cache_only)
local try_list
ip, port, try_list = toip(target.host, target.port, dns_cache_only)
hostname = target.host
if not ip and port == "dns server error: 3 name error" then
return nil, "name resolution failed", 503
if not ip then
log(ERR, "[dns] ", port, ". Tried: ", tostring(try_list))
if port == "dns server error: 3 name error" then
return nil, "name resolution failed", 503
end
end
end

Expand Down