-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
[BUG] Minetest server does not receive SIGTERM on container stop #65
Comments
Works fine here with the latest image
Created the container with |
Apparently it stops working when I bind the minetest folder volume with
And I noticed that after doing that, when the server starts, these two lines are not printed
Maybe the init phase is not completed. I need to investigate further with a clean volume. |
Problem found!
it does not conclude this init phase
and the SIGTERM is not received by the process when you stop the container. |
I can confirm that if I add I don't know if there is a way to let netcat understand if the server is not listening on IPv6. |
@aptalca Any hint? |
I have no ipv6 capability so can't help you there |
From the log you posted
I see that also on your machine localhost gets resolved to ::1 and this cause the problem when the server is not listening on IPv6, also seems a common question https://unix.stackexchange.com/questions/530976/why-does-localhost-resolve-to-1-but-not-127-0-0-1 I think in this case we can just add the -4 option in the netcat command as the minetest server always listen on IPv4. |
This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions. |
Is there an existing issue for this?
Current Behavior
When I stop the container, instead of stopping the minetest server gracefully(it should print
[Main]: INFO: signal_handler(): got SIGTERM, shutting down.
in the logs) it waits the timeout and then it kills it.Expected Behavior
The server receives the SIGTERM and shuts down without waiting the 10s Docker timeout.
I think the problem is caused by the usage of s6 service, I don't know how to route the SIGTERM to the service.
Steps To Reproduce
I think there is the same problem with just Docker
Environment
CPU architecture
x86-64
Docker creation
services: minetest: image: lscr.io/linuxserver/minetest:5.9.1 container_name: minetest environment: - PUID=1001 - PGID=1002 - TZ=Europe/Rome volumes: - ./data/minetest:/config/.minetest ports: - "0.0.0.0:30000:30000/udp" restart: unless-stopped
Container logs
The text was updated successfully, but these errors were encountered: