-
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
Error while using SRV records in upstream targets #2964
Comments
This issue seems related to the do
-- set the upstream host header if not `preserve_host`
local upstream_host = var.upstream_host
if not upstream_host or upstream_host == "" then
local addr = ctx.balancer_address
upstream_host = addr.hostname
local upstream_scheme = var.upstream_scheme
if upstream_scheme == "http" and addr.port ~= 80 or
upstream_scheme == "https" and addr.port ~= 443
then
upstream_host = upstream_host .. ":" .. addr.port
end
var.upstream_host = upstream_host
end
end |
This was already fixed Kong/lua-resty-dns-client#19 to be released |
Is there a release date ? |
within the next 2 weeks probably |
@Tieske in latest version(0.11.1), i use SRV records in upstream target with port 8080, like 'a-server.a-user.svc.cluster.local:8080',and i get |
@coxon please do not respond to closed issues. How is Kong configured? what is the Note worthy: Kong trusts the nameserver, so any port configured in your |
Summary
In a Kubernetes environment, we try to use SRV records in upstream target. Each time we have a http code 500 error.
But with A records, everything works.
We double check the SRV DNS entry and it's correctly set.
Steps To Reproduce
In a Kubernetes environment (in Google Cloud Engine):
The response is a http code 500 with this error message:
Additional Details & Logs
$ kong version
)$ kong start --vv
)<KONG_PREFIX>/logs/error.log
)The text was updated successfully, but these errors were encountered: