Failed database DNS lookup while running in docker #14021
Unanswered
lucacavazzana
asked this question in
Help
Replies: 1 comment
-
Hi @bungle , |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
HI,
I'm running a Kong 3.7.1 instance using docker-compose. In a specific environment, after restarting the services, I started getting a DNS timeout during the startup when Kong resolves the database hostname.
(See the end of the post for a stripped-down version of the compose file I'm using to troubleshoot the problem. It works as expected on other environments, but reproduces the issue on that specific instance).
Yet, running
dig
from inside the kong container (named gw), I get the correct answer:The
kong migrate bootstrap
container fails similarly:Removing the
dsn_search: .
override makes thebootstrap
work. The same fix does not work for the main kong service, which still fails in the same way (except for using the inherited host's search:Tried: ["(short)kdb:(na) - cache-miss","kdb.########.org:33 - cache-miss/querying"]
)Performing other tests I noticed that if I start Kong without running the
boostrap
container, (either with thedns_search: .
override or without) it complains about the missing schema, suggesting that the service can resolve and connect the database in the early phases of the startup:Also: overriding the
dns_search: .
causes theCompose file
The following is the minimal configuration used to reproduce the problem:
Logs
Here is the complete startup log:
Beta Was this translation helpful? Give feedback.
All reactions