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

PID file not found #83

Open
Zambiorix opened this issue Feb 21, 2019 · 6 comments
Open

PID file not found #83

Zambiorix opened this issue Feb 21, 2019 · 6 comments

Comments

@Zambiorix
Copy link

Hi,

I am using this package for a service running on ubuntu

When I look at the service file I see that the pid file should be in /var/run

But the service starts and stops just fine and no pid file is ever generated there.
I searched the whole disk, but no pid file

Where is it?

@takama
Copy link
Owner

takama commented Feb 21, 2019

Hi,
What version of the OS you use?

@Zambiorix
Copy link
Author

Ubuntu 16.04 LTS

@takama
Copy link
Owner

takama commented Feb 21, 2019

Seems like you have system D. In this case the pid file location can be define here Please check your service file in the directory /etc/systemd/system/

@Zambiorix
Copy link
Author

Yes, I know that. I checked the service file already and the path for the pid file is there.
But when I go look for the pid file, it is not there...

The service is running fine

This is my service file

[Unit]
Description=Dodentocht API-development Service
Requires=mariadb.service
After=mariadb.service

[Service]
PIDFile=/var/run/dodentocht-api-development.pid
ExecStartPre=/bin/rm -f /var/run/dodentocht-api-development.pid
ExecStart=/usr/share/dodentocht/dodentocht-api-development run
Restart=on-abort

[Install]
WantedBy=multi-user.target

and when I cat it, nothing is found

cat: /var/run/dodentocht-api-development.pid: No such file or directory

@takama
Copy link
Owner

takama commented Feb 21, 2019

Could you please check system logs? I guess it may be access problem. The services wants user or root access, there is difference in access to PID file under different user

@wongoo
Copy link

wongoo commented May 5, 2019

I have the same problem!

linux verson: centos-release-7-2.1511.el7.centos.2.10.x86_64

generated service file /etc/systemd/system/multi-user.target.wants/wolfAgent.service:

[Unit]
Description=agent of wolf project
Requires=network-online.target
After=network-online.target

[Service]
PIDFile=/var/run/wolfAgent.pid
ExecStartPre=/bin/rm -f /var/run/wolfAgent.pid
ExecStart=/opt/wolfAgent
Restart=on-failure

[Install]
WantedBy=multi-user.target

the process has root permission:

-rwxr-xr-x  1 root root  9177662 May  5 20:13 wolfAgent

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

3 participants