Can't open PID file /run/gvmd/gvmd.pig

Hi there,

I did not find the solution to my problem in the other threads on your forum.
I explain myself after having completely followed this documentation when I start gvmd, here is what I have in the logs about it:

systemd[1]: gvmd.service: Can't open PID file /run/gvmd/gvmd.pid (yet?)

When I go to check if gvm is the owner of the files :

root@HDV-Greenbone:/run/gvmd# ls -l /run/gvmd
total 4
-rw-rw-r-- 1 gvm gvm 0 27 oct.  12:05 gvm-checking
-rw-rw-r-- 1 gvm gvm 0 27 oct.  12:05 gvm-create-functions
-rw------- 1 gvm gvm 6 27 oct.  13:17 gvmd.pid
srw-rw---- 1 gvm gvm 0 27 oct.  13:17 gvmd.sock
-rw-rw-r-- 1 gvm gvm 0 27 oct.  12:05 gvm-helping
-rw-rw-r-- 1 gvm gvm 0 27 oct.  12:05 gvm-migrating
-rw-rw-r-- 1 gvm gvm 0 27 oct.  12:05 gvm-serving

My file : /etc/systemd/system/gvmd.service

[Unit]
Description=Greenbone Vulnerability Manager daemon (gvmd)
After=network.target networking.service postgresql.service ospd-openvas.service
Wants=postgresql.service ospd-openvas.service
Documentation=man:gvmd(8)
ConditionKernelCommandLine=!recovery

[Service]
Type=forking
User=gvm
Group=gvm
PIDFile=/run/gvmd/gvmd.pid
RuntimeDirectory=gvmd
RuntimeDirectoryMode=2775
ExecStart=/usr/local/sbin/gvmd --osp-vt-update=/run/ospd/ospd-openvas.sock --listen-group=gvm
Restart=always
TimeoutStopSec=10

[Install]
WantedBy=multi-user.target

Do you have an idea ?
Thank you in advance for your precious help,
Cordially

Is gvmd still running? If yes maybe that’s a similar issue to Change service start up type from forking to exec by rfc6919 · Pull Request #84 · greenbone/gsad · GitHub

Can you try changing line Type=forking in the gvmd.service file to Type=exec and add a --foreground to the ExecStart line?

2 Likes