Hi, I am also facing same issue. Initially the gsad.service and ospd-openvas.service are disabled and inactive, I activated and enabled them.
But still facing issue “gvmd.service: Can’t open PID file /run/gvmd/gvmd.pid (yet?) after start: Operation not permitted”
Please help me in resolving this.
bricks
August 24, 2022, 8:48am
2
Hi and welcome to our community!
I’ve moved your message to a new topic. It is best to open a new one in such cases.
1 Like
bricks
August 24, 2022, 8:53am
3
Sadly I was never able to reproduce this issue therefore I still don’t understand what’s going on here. Systemd should create the /run/gvmd/
directory with the correct permissions as stated in the service file. Thus please check the gvmd.service
file first. It should contain the following lines
User=gvm
PIDFile=/run/gvmd/gvmd.pid
RuntimeDirectory=gvmd
RuntimeDirectoryMode=2775
Second you should check if /run/gvmd
has the correct permissions via ls -l /run/gvmd
. The owner should be the gvm
user and not root
for example.
I am still not sure if this error originates from gvmd or systemd.
1 Like
heewey
August 25, 2022, 6:37am
4
Hi @Siva_Laveti
check your unit
/etc/systemd/system/gvmd.service
It should look like this:
[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/gvm/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
The second check has to be the already running process that was not killed from previous tries.
ps -elf | grep gvm
1 Like
bricks
August 25, 2022, 6:44am
5
Sorry, no this is wrong. It needs to be PIDFile=/run/gvmd/gvmd.pid
.
2 Likes
bricks
August 25, 2022, 6:47am
6
1 Like
DeeAnn
Split this topic
October 24, 2022, 1:51pm
7
bricks
October 28, 2022, 6:33am
8
This could maybe caused by the same issue as Change service start up type from forking to exec by rfc6919 · Pull Request #84 · greenbone/gsad · GitHub but not for gvmd instead. Changing Type
to exec
and adding a --foreground
to ExecStart
may improve the situation.
1 Like
DeeAnn
Split this topic
November 14, 2022, 11:23am
9