Skip to content
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

Service won't start since pid file is found #27

Open
bhaeussermann opened this issue May 5, 2023 · 0 comments
Open

Service won't start since pid file is found #27

bhaeussermann opened this issue May 5, 2023 · 0 comments

Comments

@bhaeussermann
Copy link

OS: Ubuntu 22.04.1 LTS

I used the template to create a service for starting the docker daemon.

Starting the service:

$ sudo /etc/init.d/docker start
Starting docker

Querying status:

$ sudo /etc/init.d/docker status
Stopped

Surely enough, the docker daemon isn't running at this stage.

Checking the error log /var/log/docker.err I see

time="2023-05-05T12:31:24.062889666Z" level=info msg="Starting up"
failed to start daemon: pid file found, ensure docker is not running or delete /var/run/docker.pid

Deleting the docker.pid file and starting the service again yields the same result.

If I delete the line

echo $! > "$pid_file"

from the script, the service works as expected and the docker.pid is automatically created with the correct PID.

It appears that the System V init script isn't supposed to be writing the docker.pid file, but should be leaving that to init.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant