-
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
Kong proxy pod crash loopback every day #9836
Comments
Thanks for your report. We have noticed this issue. It seems that Kong can not create unix socket |
when docker restart has this problem |
2022-11-29 15:30:27 nginx: [warn] the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /usr/local/kong/nginx.conf:6 |
Kong version ($ kong version) |
Hi, checked actual version of our Docker image
I was wrong when i opened the ticket |
Kong 3.0 uses The UNIX socket file is From the error logs above, I think the reason may be the path has the wrong permission, and kong can not access the socket file. Could you share the details of docker run params? |
####################################### Kong: The API Gateway####################################### networks: kong:
|
I did not see If kong works well, you can use Please check the prefix path to ensure it is available for kong. |
$ ls |
Could you check the permission of these files with
|
$ ls -l |
Hi ugun111, from your posted data it seems all works well, and I also can not reproduce the same error. |
it can work well,but if you don't stop docker and restart the computer,it will show 1#0: bind() to unix:/usr/local/kong/worker_events.sock failed (98: Address already in use) |
Hello, It seems that the issue is that when the pod is killed "abruptly", sock are left in the empty dir. A way to solve it would be IMO to set the kong_prefix emptyDir to use medium memory. this way it would use tmpfs and sock will not get persisted after a hard stop. I've edited locally the daemonset I'm using and it seems to be working |
can you give me your docker-compose.yml , volumes the name of the kong_prefix emptyDir @agm650 |
I'm using helm chart to install Kong, so I do not have a docker-compose.yml file. If you are using docker-compose directly you might be able to specify that the kong_prefix directory is mounted with the flag "--tmpfs" or the "--mount" flag by adding the |
We have a PR trying to fix it. Kong/docker-kong#620 |
For anyone still experiencing this issue while waiting for Kong/docker-kong#620 to get into a future release, here is a reference way to implement a workaround fix by helm chart (the kong image manifest shows the latest kong image 3.1.1 on commit Kong/docker-kong@5f914be, which is older than the merged fix): One way is to define an initContainer, similar to how stale PIDs are cleared in the kong helm chart:
If your $KONG_PREFIX is different, just change the prefix dir accordingly. The The other way is as @agm650 suggested. I had a few issues getting it to work at first because the default prefix dir volume defined in the kong helm chart can't be modified, so i had to define a new alternate volume to define it as
|
If anyone has encountered this problem in docker so far, then here is a command for you to delete the problematic file. It must be executed when this error occurs, at the moment of starting inside the Kong container rm /usr/local/kong/worker_events.sock If you set env "KONG_PREFIX" at the start of Kong, then replace "/usr/local/kong" (set's by default) with your own. |
Is there an existing issue for this?
Kong version (
$ kong version
)3.0.1.0
Current Behavior
On Kubernetes, kong-gateway:3.0.1.0, installed with HELM
Every night we shut down our cluster to reduce cost (dev/staging) and every morning the system restart automatically.
Since few days, kong is broken with following logs:
Our last changes:
Expected Behavior
When the Kubernetes restart on the morning, Kong is working properly and is ready to take requests
Steps To Reproduce
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: