Job for gvmd.service failed

Hi,

Recently installed on Debian 10 server
Source Edition with the following components:
*gvm-libs-11.0
*openvas-7.0
*gvmd-9.0
*master (openvas-smb)
*gsa-9.0
*ospd-openvas-1.0
*ospd-2.0

Got steps from here: https://sadsloth.net/post/install-gvm11-src-on-debian/

Everything was working fine. I was even able to run a first scan for testing, check the report and add some users. After restart the server the services gsad and ospd-openvas have green status but gvmd is failing to start.

Am I missing something? Please help

Thank you

Console output

Job for gvmd.service failed because the control process exited with error code.
See "systemctl status gvmd.service" and "journalctl -xe" for details.
gvm@IDSmini:~$ systemctl status gvmd.service
ā— gvmd.service - Job that runs the gvm daemon
   Loaded: loaded (/etc/systemd/system/gvmd.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Wed 2020-06-24 17:04:54 EDT; 1min 31s ago
     Docs: man:gvm
  Process: 12456 ExecStart=/opt/gvm/sbin/gvmd --osp-vt-update=/opt/gvm/var/run/ospd.sock (code=exited, status=1/FAILURE)
    Tasks: 1 (limit: 4915)
   Memory: 142.1M
   CGroup: /system.slice/gvmd.service
           └─1067 gvmd: Waiting for incoming connections

Please take a look at the gvmd log file to find further hints about what’s going wrong.

1 Like

Hi @bricks ,

I can’t find any gvmd log file, at least in the conventional location /var/logs. Can you please tell me where should I look for it?

All the information I could get at this moment is from the journalctl

Thank you

Console output

user1@server1:~$ journalctl -xe
Jun 25 08:42:21 server1 ntpd[768]: error resolving pool 1.debian.pool.ntp.org: Temporary failure in name resolution (-3)
Jun 25 08:42:26 server1 systemd[1]: gvmd.service: Service RestartSec=2min expired, scheduling restart.
Jun 25 08:42:26 server1 systemd[1]: gvmd.service: Scheduled restart job, restart counter is at 448.
-- Subject: Automatic restarting of a unit has been scheduled
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Automatic restarting of the unit gvmd.service has been scheduled, as the result for
-- the configured Restart= setting for the unit.
Jun 25 08:42:26 server1 systemd[1]: Stopped Job that runs the gvm daemon.
-- Subject: A stop job for unit gvmd.service has finished
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A stop job for unit gvmd.service has finished.
--
-- The job identifier is 36456 and the job result is done.
Jun 25 08:42:26 server1 systemd[1]: gvmd.service: Found left-over process 1045 (gvmd) in control group while starting unit. Ignoring.
Jun 25 08:42:26 server 1systemd[1]: This usually indicates unclean termination of a previous run, or service implementation deficiencies.
Jun 25 08:42:26 server1 systemd[1]: Starting Job that runs the gvm daemon...
-- Subject: A start job for unit gvmd.service has begun execution
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A start job for unit gvmd.service has begun execution.
--
-- The job identifier is 36456.
Jun 25 08:42:26 server1 systemd[1]: gvmd.service: Control process exited, code=exited, status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- An ExecStart= process belonging to unit gvmd.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 1.
Jun 25 08:42:26 server1 systemd[1]: gvmd.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The unit gvmd.service has entered the 'failed' state with result 'exit-code'.
Jun 25 08:42:26 server1 systemd[1]: Failed to start Job that runs the gvm daemon.
-- Subject: A start job for unit gvmd.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A start job for unit gvmd.service has finished with a failure.

After some research I was able to locate the logs file for the gvmd service at /opt/gvm/var/log/gvm/. Still I have been unable to fix it on my own. Please help.

Thank you

Console output

md manage:WARNING:2020-06-25 12h48.28 utc:28498: open_secinfo_lockfile: failed to open lock file '/tmp/gvm-sync-scap': No such file or directory
md manage:WARNING:2020-06-25 12h48.28 utc:28501: open_secinfo_lockfile: failed to open lock file '/tmp/gvm-sync-cert': No such file or directory
md manage:WARNING:2020-06-25 12h48.28 utc:28499: manage_update_nvt_cache_osp: failed to connect to /opt/gvm/var/run/ospd.sock
md manage:WARNING:2020-06-25 12h48.38 utc:28508: open_secinfo_lockfile: failed to open lock file '/tmp/gvm-sync-scap': No such file or directory
md manage:WARNING:2020-06-25 12h48.38 utc:28511: open_secinfo_lockfile: failed to open lock file '/tmp/gvm-sync-cert': No such file or directory
md manage:WARNING:2020-06-25 12h48.38 utc:28509: manage_update_nvt_cache_osp: failed to connect to /opt/gvm/var/run/ospd.sock
md manage:WARNING:2020-06-25 12h48.49 utc:28520: open_secinfo_lockfile: failed to open lock file '/tmp/gvm-sync-scap': No such file or directory
md manage:WARNING:2020-06-25 12h48.49 utc:28523: open_secinfo_lockfile: failed to open lock file '/tmp/gvm-sync-cert': No such file or directory
md manage:WARNING:2020-06-25 12h48.49 utc:28521: manage_update_nvt_cache_osp: failed to connect to /opt/gvm/var/run/ospd.sock
md manage:WARNING:2020-06-25 12h48.59 utc:28529: open_secinfo_lockfile: failed to open lock file '/tmp/gvm-sync-scap': No such file or directory
md manage:WARNING:2020-06-25 12h48.59 utc:28532: open_secinfo_lockfile: failed to open lock file '/tmp/gvm-sync-cert': No such file or directory
md manage:WARNING:2020-06-25 12h48.59 utc:28530: manage_update_nvt_cache_osp: failed to connect to /opt/gvm/var/run/ospd.sock
md manage:WARNING:2020-06-25 12h49.09 utc:28540: open_secinfo_lockfile: failed to open lock file '/tmp/gvm-sync-scap': No such file or directory
md manage:WARNING:2020-06-25 12h49.09 utc:28543: open_secinfo_lockfile: failed to open lock file '/tmp/gvm-sync-cert': No such file or directory
md manage:WARNING:2020-06-25 12h49.09 utc:28541: manage_update_nvt_cache_osp: failed to connect to /opt/gvm/var/run/ospd.sock
md manage:WARNING:2020-06-25 12h49.19 utc:28550: open_secinfo_lockfile: failed to open lock file '/tmp/gvm-sync-scap': No such file or directory
md manage:WARNING:2020-06-25 12h49.19 utc:28553: open_secinfo_lockfile: failed to open lock file '/tmp/gvm-sync-cert': No such file or directory
md manage:WARNING:2020-06-25 12h49.19 utc:28551: manage_update_nvt_cache_osp: failed to connect to /opt/gvm/var/run/ospd.sock
md manage:WARNING:2020-06-25 12h49.29 utc:28558: open_secinfo_lockfile: failed to open lock file '/tmp/gvm-sync-scap': No such file or directory
md manage:WARNING:2020-06-25 12h49.29 utc:28561: open_secinfo_lockfile: failed to open lock file '/tmp/gvm-sync-cert': No such file or directory
md manage:WARNING:2020-06-25 12h49.29 utc:28559: manage_update_nvt_cache_osp: failed to connect to /opt/gvm/var/run/ospd.sock
md manage:WARNING:2020-06-25 12h49.39 utc:28566: open_secinfo_lockfile: failed to open lock file '/tmp/gvm-sync-scap': No such file or directory
md manage:WARNING:2020-06-25 12h49.39 utc:28569: open_secinfo_lockfile: failed to open lock file '/tmp/gvm-sync-cert': No such file or directory
md manage:WARNING:2020-06-25 12h49.39 utc:28567: manage_update_nvt_cache_osp: failed to connect to /opt/gvm/var/run/ospd.sock
md manage:WARNING:2020-06-25 12h49.49 utc:28577: open_secinfo_lockfile: failed to open lock file '/tmp/gvm-sync-scap': No such file or directory
md manage:WARNING:2020-06-25 12h49.49 utc:28580: open_secinfo_lockfile: failed to open lock file '/tmp/gvm-sync-cert': No such file or directory
md manage:WARNING:2020-06-25 12h49.49 utc:28578: manage_update_nvt_cache_osp: failed to connect to /opt/gvm/var/run/ospd.sock
md manage:WARNING:2020-06-25 12h50.00 utc:28586: open_secinfo_lockfile: failed to open lock file '/tmp/gvm-sync-scap': No such file or directory
md manage:WARNING:2020-06-25 12h50.00 utc:28589: open_secinfo_lockfile: failed to open lock file '/tmp/gvm-sync-cert': No such file or directory
md manage:WARNING:2020-06-25 12h50.00 utc:28587: manage_update_nvt_cache_osp: failed to connect to /opt/gvm/var/run/ospd.sock
md manage:WARNING:2020-06-25 12h50.10 utc:28595: open_secinfo_lockfile: failed to open lock file '/tmp/gvm-sync-scap': No such file or directory
md manage:WARNING:2020-06-25 12h50.10 utc:28598: open_secinfo_lockfile: failed to open lock file '/tmp/gvm-sync-cert': No such file or directory
md manage:WARNING:2020-06-25 12h50.10 utc:28596: manage_update_nvt_cache_osp: failed to connect to /opt/gvm/var/run/ospd.sock
md manage:WARNING:2020-06-25 12h50.20 utc:28604: open_secinfo_lockfile: failed to open lock file '/tmp/gvm-sync-scap': No such file or directory
md manage:WARNING:2020-06-25 12h50.20 utc:28607: open_secinfo_lockfile: failed to open lock file '/tmp/gvm-sync-cert': No such file or directory
md manage:WARNING:2020-06-25 12h50.20 utc:28605: manage_update_nvt_cache_osp: failed to connect to /opt/gvm/var/run/ospd.sock
md   main:MESSAGE:2020-06-25 12h50.27 utc:28611:    Greenbone Vulnerability Manager version 9.0.1~git-f17f9a71-gvmd-9.0 (GIT revision f17f9a71-gvmd-9.0) (DB revision 221)
md   main:WARNING:2020-06-25 12h50.27 utc:28611: gvmd: Main process is already running
md manage:WARNING:2020-06-25 12h50.30 utc:28616: open_secinfo_lockfile: failed to open lock file '/tmp/gvm-sync-scap': No such file or directory
md manage:WARNING:2020-06-25 12h50.30 utc:28619: open_secinfo_lockfile: failed to open lock file '/tmp/gvm-sync-cert': No such file or directory
md manage:WARNING:2020-06-25 12h50.30 utc:28617: manage_update_nvt_cache_osp: failed to connect to /opt/gvm/var/run/ospd.sock
md manage:WARNING:2020-06-25 12h50.40 utc:28624: open_secinfo_lockfile: failed to open lock file '/tmp/gvm-sync-scap': No such file or directory
md manage:WARNING:2020-06-25 12h50.40 utc:28627: open_secinfo_lockfile: failed to open lock file '/tmp/gvm-sync-cert': No such file or directory
md manage:WARNING:2020-06-25 12h50.40 utc:28625: manage_update_nvt_cache_osp: failed to connect to /opt/gvm/var/run/ospd.sock

It seems that your installation and paths are not correct, this needs to be fixed with the start/stop scripts and at compile time.

Hi,

Could you elaborate a little bit more about the possible solution to this errors? I am unable to compile Openvas on my own, at least with the official documentation, so I found this ā€œcopy-and-pasteā€ tutorial that allowed me to compile and deploy Openvas. It might contain errors that lead to the issue described above.

https://sadsloth.net/post/install-gvm11-src-on-debian/

Thank you

I would suggest you can try to work with the GCE, a free community driven VM.

This means ospd-openvas is not running or not listening at this unix socket location.

I’ve never seem this before. Ensure that /tmp directory exits and is writable by the user running gvmd.

This indicates that there is already a running gvmd process that hasn’t been stopped before. Check with ps or htop if a gvmd process is still running and try to stop it.

3 Likes

Hi @bricks and @Lukas,

I appreciate the time that both of you dedicated to research on my issue. I will troubleshoot deeply about those errors and the possible cause provided by @bricks. Thanks!

I have been trying the GCE (free community driven VM) for a while and it works great!! Thank you again!! But I am trying to avoid running OpenVas on a separate machine. I already have a server running other apps and with enough resources to include OpenVas, so it would be great if I could have OpenVas running and stable on that machine. Of course, the VM it’s the plan B, since I already know that it works and that’s how I have been testing your awesome app so far.

Thank you again!

To archive this, you need fundamental Linux knowledge, if you can“t build and install GVM, you would not able to run and maintain it. So GCE would be in my point of view a better solution for you. You can install a hypervisor on that machine and run GCE there or learn to fully understand your operating system, but this is not the topic here :wink:

Just a side note: it’s not OpenVAS anymore. It is called GVM. See Frequently Asked Questions (FAQ) for background.

1 Like

It also worked for me
Thank you