A server is already running (pid: 10, file: /var/app/tmp/pids/server.pid).
OS & Hardware Unraid
Version any - Docker
Describe the bug Whenever the Container crashes it fails to restart, because of said file (/var/app/tmp/pids/server.pid) is still present, since it doesnt get cleaned up on crash and Ruby on Rails "believes"" there is already a server running and exits.
Proposed fix: Running a check on container Start if file is present and then delete it
Additional context Add any other context about the problem here.
/var/app/tmp shouldn't be persistent volume. On container crash the entire /var/ should be recreated.
but how do i make Imports persistent then?
I mount /var/app/tmp/imports/watched and /var/app/public as persistent. Make persistent only the things you really need to be persistgent. In the ideal situation, / must be R/O, and everyting RW (/tmp, everyting ../run/..) must me mounted as EmptyDir and re-created every container restart.
But these are the only Directories i am mounting as persistent directories as well. As soon as I recreate the container, the problem is gone. But not if I restart it.
Shouln't it be restarted if app crashes?
As i am saying from the beginning, when i just restart the Container, the App fails to start because of that. Since i am not using the docker compose in this case, there is no health check, so its not restarting, if there is no exit signal from the app
i get the same error with the docker on unraid every couple of days. i have to force update aka recreate the container to get it running again.
same issue here, also on unraid. Good to know that force update is a workaround
i get the same error with the docker on unraid every couple of days. i have to force update aka recreate the container to get it running again.
Same here, recreating fixes this, but thats not the solution.
I see the same issue. Is this just related to the Docker on Unraid, or is it a general issue? At the moment the Docker container stops almost every night. just restarting it does not even allow to show the log file with the Unraid GUI because it closes so fast.
It seems to be a problem with the Unraid template. I installed it via docker compose on my unraid now and never ran into the problem again. So if you use the docker compose Plugin on unraid and install dawarich with compose, it's not an issue anymore
after your answer yesterday I was trying a bit with the Unraid Docker Templated, comparing it to the Docker-Compose file. I am not 100% sure yet, but there is a difference in the "Command" section of the Webserver Container.
entrypoint: web-entrypoint.sh
command: ['bin/rails', 'server', '-p', '3000', '-b', '::']
The Unraid Template uses under "Post Arguments" in "Advanced View" only bin/dev. The Sidekiq Container template uses sidekiq in the "Post Arguments"
After several trials I ended up with the "Post arguments" like in the docker-compose file, just without the quotation marks:
bin/rails server -p 3000 -b ::
At the moment, even after restarting the Dawarich-Container there is no problem yet. In the past, restarting already gave me this problem. Maybe you can try this out.
I have the same problem and find it to be really odd as i never seen docker containers behaving in a similar way.
Although i must say that the solution mentioned by @andrepue worked for me
@nwithan8 is this something you can help with?
after your answer yesterday I was trying a bit with the Unraid Docker Templated, comparing it to the Docker-Compose file. I am not 100% sure yet, but there is a difference in the "Command" section of the Webserver Container.
entrypoint: web-entrypoint.shcommand: ['bin/rails', 'server', '-p', '3000', '-b', '::']The Unraid Template uses under "Post Arguments" in "Advanced View" only
bin/dev. The Sidekiq Container template usessidekiqin the "Post Arguments" After several trials I ended up with the "Post arguments" like in the docker-compose file, just without the quotation marks:
bin/rails server -p 3000 -b ::At the moment, even after restarting the Dawarich-Container there is no problem yet. In the past, restarting already gave me this problem. Maybe you can try this out.
@nwithan8 is this something you can help with?
after your answer yesterday I was trying a bit with the Unraid Docker Templated, comparing it to the Docker-Compose file. I am not 100% sure yet, but there is a difference in the "Command" section of the Webserver Container.
entrypoint: web-entrypoint.shcommand: ['bin/rails', 'server', '-p', '3000', '-b', '::']The Unraid Template uses under "Post Arguments" in "Advanced View" onlybin/dev. The Sidekiq Container template usessidekiqin the "Post Arguments" After several trials I ended up with the "Post arguments" like in the docker-compose file, just without the quotation marks:bin/rails server -p 3000 -b ::At the moment, even after restarting the Dawarich-Container there is no problem yet. In the past, restarting already gave me this problem. Maybe you can try this out.
This was resolved in March via https://github.com/nwithan8/unraid_templates/commit/f2e580ebbde4a6b6a91b93ac8a855f48834a161f
Sounds like the user had the old version cached.
Thanks!