-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
unicorn.service: Can't open PID file unicorn.pid (yet?) after reload: Operation not permitted #16636
Comments
You configured a PIDFile= which is good, but the PID file doesn't actually exist, i.e. we get ENOENT opening it. Fix the PIDFile= path. Or maybe your app is broken and doesn't write the PID file before returning in the process we invoke? Either way, this is not a systemd issue, closing hence. |
@poettering the file is there and contains the current PID. As I have already written above. This looks like a systemd issue here. |
|
@mnin Have you solved this problem? I am having the same issue |
What does this sentence mean? It reads like broken english. |
Which part don't you comprehend? It reads perfectly fine to me... |
Did he mean to say "before turning in the process"? or "before returning into the process"? Or "returning (a noun is usually required here) inside the process"? |
The context here is a self-daemonizing process, which implies a double fork is happening somewhere outside of systemd's control. For the pidfile to be usable the piece doing the double fork must write out the pid to the pidfile before it returns/exits - at which point systemd will reap the child it had created and attempt to make use of the pidfile. Lennart's statement makes sense in the context of what's being discussed here. I think there must just be some confusion surrounding how pidfiles and daemonizing processes work, which is something Lennart's statement assumes is understood. It doesn't read as broken english. |
So "returning" as in "terminating execution". I'm not sure what terminating "in the process" means though. |
See https://www.freedesktop.org/software/systemd/man/daemon.html#SysV%20Daemons if you want to understand it better |
systemd version the issue has been seen with
Used distribution
Expected behaviour you didn't see
Unexpected behaviour you saw
unicorn.service file
logs
unicorn service status
What we see here is:
775820
is the PID from the new master process from the unicorn service.But
786416
is almost died and doesn't exists anymore. Because it was the old unicorn master process which is replaced by the new one.strace
Steps to reproduce the problem
The text was updated successfully, but these errors were encountered: