daemon icon indicating copy to clipboard operation
daemon copied to clipboard

PID file not found

Open Zambiorix opened this issue 6 years ago • 6 comments

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?

Zambiorix avatar Feb 21 '19 10:02 Zambiorix

Hi, What version of the OS you use?

takama avatar Feb 21 '19 11:02 takama

Ubuntu 16.04 LTS

Zambiorix avatar Feb 21 '19 12:02 Zambiorix

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/

takama avatar Feb 21 '19 13:02 takama

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

Zambiorix avatar Feb 21 '19 13:02 Zambiorix

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

takama avatar Feb 21 '19 13:02 takama

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

wongoo avatar May 05 '19 12:05 wongoo