-
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
An invalid response was received from the upstream server #1601
Comments
Kong uses dnsmasq to resolve the host names. You can configure it in the Kong configuration, or disable it and use your own. |
Thanks @Tieske. Still not working though. I have disabled dnsmaq in my .conf file (/etc/kong.conf):
and used the one configured in my machine:
I then reloaded kong and ran
Finally, I re-ran curl to check if it worked but I got the same error:
Extract from error.log:
|
@PierrickI3 I run go-dnsmasq in the kong pod ,working
|
@gavinzhou That worked. Thanks! |
Although the issue has closed, I'd like to thank @gavinzhou, your solution solved the same issue I just encountered. |
Actually, we've had the same issue here. The solution was to call the 'FQDN' of the service, instead of only 'ping'. Kong/NGINX doesn't respect the search path of the resolver. So, calling ping.namespace.svc.cluster.local (assuming ping is the name of the service, namespace is your namespace, svc.cluster.local is the configured DNS / domain name of your kubernetes cluster) it did worked fine. |
Summary
Testing kong with docker in kubernetes.
Here is the .yaml file I used to create the replication controller:
I logged into my kong instance and tested my own api, hosted in a different pod:
which returned the appropriate response:
This is an expected response since I did not pass the required parameters.
So, I used the following in Kong to redirect to my API:
which returned:
but a GET request (
curl -i -X GET --url http://localhost:8000/api/v1/ping
) returns this:/logs/error.log shows this:
ping ping
returns this:How is Kong resolving my host (ping)? As you saw above, curl manages to call my API without any problem using
curl -X GET http://ping:3000/api/v1/ping
. but Kong can't.Additional Details & Logs
The text was updated successfully, but these errors were encountered: