Failed to start Greenbone Vulnerability Manager daemon (gvmd)

Hi there,
I try to start the Greenbone Vulnerability Manager Daemon and get the following error messages.

# journalctl -xe
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ A stop job for unit gvmd.service has finished.
░░ 
░░ The job identifier is 1561 and the job result is done.
Nov 30 13:25:56 openvas systemd[1]: gvmd.service: Failed to load environment files: No such file or directory
Nov 30 13:25:56 openvas systemd[1]: gvmd.service: Failed to run 'start' task: No such file or directory
Nov 30 13:25:56 openvas systemd[1]: gvmd.service: Failed with result 'resources'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ The unit gvmd.service has entered the 'failed' state with result 'resources'.
Nov 30 13:25:56 openvas systemd[1]: Failed to start Greenbone Vulnerability Manager daemon (gvmd).
░░ 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.
░░ 
░░ The job identifier is 1561 and the job result is failed.
Nov 30 13:25:56 openvas systemd[1]: gvmd.service: Scheduled restart job, restart counter is at 5.
░░ 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.
Nov 30 13:25:56 openvas systemd[1]: Stopped Greenbone Vulnerability Manager daemon (gvmd).
░░ 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 1639 and the job result is done.
Nov 30 13:25:56 openvas systemd[1]: gvmd.service: Start request repeated too quickly.
Nov 30 13:25:56 openvas systemd[1]: gvmd.service: Failed with result 'resources'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ The unit gvmd.service has entered the 'failed' state with result 'resources'.
Nov 30 13:25:56 openvas systemd[1]: Failed to start Greenbone Vulnerability Manager daemon (gvmd).
░░ 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.
░░ 
░░ The job identifier is 1639 and the job result is failed.

Do you have some ideas to solve the problem?

Best regards
James

GVM versions

gsad: Greenbone Security Assistant 20.08.1~git-fc9e55140-HEAD
gvmd: (‘gvmd --version’)
openvas-scanner: OpenVAS 20.8.1
gvm-libs: gvm-libs 20.8.1~git-2712b4df-HEAD

Environment

Operating system: Debian Linux 11 (“Bullseye”)
Kernel: Linux openvas 5.10.0-9-amd64 #1 SMP Debian 5.10.70-1 (2021-09-30) x86_64 GNU/Linux
Installation method / source: GitHub

Please take a look at /var/log/gvm/gvmd.log for further error details.

2 Likes

I have done already before my post here.

md   main:MESSAGE:2021-11-29 16h13.17 utc:89165:    Greenbone Vulnerability Manager version 20.08.1~git-cda161386-HEAD (GIT revision cda161386-HEAD) (DB revision 233)
md manage:WARNING:2021-11-29 16h13.17 utc:89168: sql_exec_internal: PQexec failed: FEHLER:  konnte Bibliothek »/opt/gvm/lib/libgvm-pg-server.so« nicht laden: libgvm_base.so.20: Kann die Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden
 (7)
md manage:WARNING:2021-11-29 16h13.17 utc:89168: sql_exec_internal: SQL: CREATE OR REPLACE FUNCTION hosts_contains (text, text) RETURNS boolean AS '/opt/gvm/lib/libgvm-pg-server', 'sql_hosts_contains' LANGUAGE C IMMUTABLE;
md manage:WARNING:2021-11-29 16h13.17 utc:89168: sqlv: sql_exec_internal failed
md   main:MESSAGE:2021-11-29 16h33.37 utc:89330:    Greenbone Vulnerability Manager version 20.08.1~git-cda161386-HEAD (GIT revision cda161386-HEAD) (DB revision 233)
md manage:   INFO:2021-11-29 16h33.37 utc:89330:    Creating scanner.
md manage:WARNING:2021-11-29 16h33.37 utc:89330: sql_open: PQconnectPoll failed
md manage:WARNING:2021-11-29 16h33.37 utc:89330: sql_open: PQerrorMessage (conn): FATAL:  Rolle »root« existiert nicht
md manage:WARNING:2021-11-29 16h33.37 utc:89330: init_manage_process: sql_open failed
md   main:MESSAGE:2021-11-29 16h33.50 utc:89333:    Greenbone Vulnerability Manager version 20.08.1~git-cda161386-HEAD (GIT revision cda161386-HEAD) (DB revision 233)
md manage:   INFO:2021-11-29 16h33.50 utc:89333:    Getting scanners.
md manage:WARNING:2021-11-29 16h33.50 utc:89333: sql_open: PQconnectPoll failed
md manage:WARNING:2021-11-29 16h33.50 utc:89333: sql_open: PQerrorMessage (conn): FATAL:  Rolle »root« existiert nicht
md manage:WARNING:2021-11-29 16h33.50 utc:89333: init_manage_process: sql_open failed
md   main:MESSAGE:2021-11-30 08h24.45 utc:93268:    Greenbone Vulnerability Manager version 20.08.1~git-cda161386-HEAD (GIT revision cda161386-HEAD) (DB revision 233)
md manage:WARNING:2021-11-30 08h24.45 utc:93269: sql_open: PQconnectPoll failed
md manage:WARNING:2021-11-30 08h24.45 utc:93269: sql_open: PQerrorMessage (conn): FATAL:  Rolle »root« existiert nicht
md manage:WARNING:2021-11-30 08h24.45 utc:93269: init_manage_process: sql_open failed
md   main:MESSAGE:2021-11-30 09h38.36 utc:94062:    Greenbone Vulnerability Manager version 20.08.1~git-cda161386-HEAD (GIT revision cda161386-HEAD) (DB revision 233)
md   main:   INFO:2021-11-30 09h38.36 utc:94062:    Migrating database.
md   main:WARNING:2021-11-30 09h38.36 utc:94062: manage_migrate: no task tables yet, so no need to migrate them
md   main:MESSAGE:2021-11-30 09h38.36 utc:94062: No SCAP database found for migration
md   main:MESSAGE:2021-11-30 09h38.36 utc:94062: No CERT database found for migration
md   main:WARNING:2021-11-30 09h38.36 utc:94062: gvmd: databases are already at the supported version
md   main:MESSAGE:2021-11-30 09h41.47 utc:1335:    Greenbone Vulnerability Manager version 20.08.1~git-cda161386-HEAD (GIT revision cda161386-HEAD) (DB revision 233)
md manage:WARNING:2021-11-30 09h41.48 utc:1339: sql_exec_internal: PQexec failed: FEHLER:  Relation »public.meta« existiert nicht
LINE 1: SELECT value FROM public.meta WHERE name = 'database_version...
                          ^
 (7)
md manage:WARNING:2021-11-30 09h41.48 utc:1339: sql_exec_internal: SQL: SELECT value FROM public.meta WHERE name = 'database_version';
md manage:WARNING:2021-11-30 09h41.48 utc:1339: sql_x: sql_exec_internal failed
md manage:MESSAGE:2021-11-30 09h41.48 utc:1339: No SCAP database found
md manage:MESSAGE:2021-11-30 09h41.48 utc:1339: No CERT database found
util gpgme:MESSAGE:2021-11-30 09h42.03 utc:1339: Setting GnuPG dir to '/opt/gvm/var/lib/gvm/gvmd/gnupg'
util gpgme:MESSAGE:2021-11-30 09h42.03 utc:1339: Created GnuPG dir '/opt/gvm/var/lib/gvm/gvmd/gnupg'
util gpgme:MESSAGE:2021-11-30 09h42.04 utc:1339: Using OpenPGP engine version '2.2.27'
util gpgme:   INFO:2021-11-30 09h42.04 utc:1339: starting key generation ...
util gpgme:   INFO:2021-11-30 09h42.04 utc:1339: OpenPGP key 'GVM Credential Encryption' has been generated
md manage:   INFO:2021-11-30 09h43.25 utc:1403: OSP service has different VT status (version 202111291038) from database (version (null), 0 VTs). Starting update ...
md manage:WARNING:2021-11-30 09h43.25 utc:1402: update_scap: No SCAP db present, rebuilding SCAP db from scratch
md manage:   INFO:2021-11-30 09h43.25 utc:1404: Initializing CERT database
md manage:   INFO:2021-11-30 09h43.28 utc:1402: update_scap: Updating data from feed
md manage:   INFO:2021-11-30 09h43.28 utc:1402: Updating CPEs
md manage:   INFO:2021-11-30 09h45.37 utc:1402: Updating /opt/gvm/var/lib/gvm/scap-data/nvdcve-2.0-2021.xml
md manage:   INFO:2021-11-30 09h46.16 utc:1402: Updating /opt/gvm/var/lib/gvm/scap-data/nvdcve-2.0-2014.xml
md manage:   INFO:2021-11-30 09h46.31 utc:1402: Updating /opt/gvm/var/lib/gvm/scap-data/nvdcve-2.0-2005.xml
md manage:   INFO:2021-11-30 09h46.40 utc:1402: Updating /opt/gvm/var/lib/gvm/scap-data/nvdcve-2.0-2011.xml
md manage:   INFO:2021-11-30 09h46.55 utc:1402: Updating /opt/gvm/var/lib/gvm/scap-data/nvdcve-2.0-2016.xml
md manage:   INFO:2021-11-30 09h47.14 utc:1402: Updating /opt/gvm/var/lib/gvm/scap-data/nvdcve-2.0-2009.xml
md manage:   INFO:2021-11-30 09h47.32 utc:1402: Updating /opt/gvm/var/lib/gvm/scap-data/nvdcve-2.0-2007.xml
md manage:   INFO:2021-11-30 09h47.45 utc:1402: Updating /opt/gvm/var/lib/gvm/scap-data/nvdcve-2.0-2006.xml
md manage:   INFO:2021-11-30 09h47.59 utc:1402: Updating /opt/gvm/var/lib/gvm/scap-data/nvdcve-2.0-2019.xml
md manage:   INFO:2021-11-30 09h48.05 utc:1403: Updating VTs in database ... 78891 new VTs, 0 changed VTs
md manage:WARNING:2021-11-30 09h48.05 utc:1403: sql_exec_internal: PQexec failed: FEHLER:  Funktion digest(text, unknown) existiert nicht
LINE 1: ...d  ORDER BY nvts.oid ASC ) SELECT encode         (digest    ...
                                                             ^
HINT:  Keine Funktion stimmt mit dem angegebenen Namen und den Argumenttypen überein. Sie müssen möglicherweise ausdrückliche Typumwandlungen hinzufügen.
 (7)
md manage:WARNING:2021-11-30 09h48.05 utc:1403: sql_exec_internal: SQL: WITH pref_str AS (  SELECT name,         substring(name, '^(.*?):') AS oid,         substring (name, '^.*?:([^:]+):') AS pref_id,         (substring (name, '^.*?:([^:]+):')          || substring (name,                        '^[^:]*:[^:]*:[^:]*:(.*)')          || value) AS pref  FROM nvt_preferences ), nvt_str AS (  SELECT (SELECT nvts.oid            || max(modification_time)            || coalesce (string_agg(pref_str.pref, ''                                    ORDER BY pref_id),                         ''))         AS vt_string  FROM nvts  LEFT JOIN pref_str ON nvts.oid = pref_str.oid  GROUP BY nvts.oid  ORDER BY nvts.oid ASC ) SELECT encode         (digest           (coalesce (string_agg (nvt_str.vt_string, ''),                      ''),            'sha256'),          'hex') FROM nvt_str;
md manage:WARNING:2021-11-30 09h48.05 utc:1403: sql_x: sql_exec_internal failed
md manage:WARNING:2021-11-30 09h48.05 utc:1403: update_nvts_from_vts: SHA-256 hash of the VTs in the database ((null)) does not match the one from the scanner (ee1137fa223093c7e4af4d5ad69f5d3622ce1c87560d863716abe6ebdbc7ecac).
md   main:MESSAGE:2021-11-30 09h48.05 utc:1403: Rebuilding NVTs because integrity check failed
md manage:   INFO:2021-11-30 09h48.45 utc:1402: Updating /opt/gvm/var/lib/gvm/scap-data/nvdcve-2.0-2012.xml
md manage:   INFO:2021-11-30 09h48.59 utc:1402: Updating /opt/gvm/var/lib/gvm/scap-data/nvdcve-2.0-2017.xml
md manage:   INFO:2021-11-30 09h49.25 utc:1402: Updating /opt/gvm/var/lib/gvm/scap-data/nvdcve-2.0-2015.xml
md manage:   INFO:2021-11-30 09h49.37 utc:1402: Updating /opt/gvm/var/lib/gvm/scap-data/nvdcve-2.0-2013.xml
md manage:   INFO:2021-11-30 09h49.50 utc:1402: Updating /opt/gvm/var/lib/gvm/scap-data/nvdcve-2.0-2002.xml
md manage:   INFO:2021-11-30 09h49.59 utc:1402: Updating /opt/gvm/var/lib/gvm/scap-data/nvdcve-2.0-2004.xml
md manage:   INFO:2021-11-30 09h50.04 utc:1402: Updating /opt/gvm/var/lib/gvm/scap-data/nvdcve-2.0-2010.xml
md manage:   INFO:2021-11-30 09h50.12 utc:1402: Updating /opt/gvm/var/lib/gvm/scap-data/nvdcve-2.0-2008.xml
md manage:   INFO:2021-11-30 09h50.25 utc:1402: Updating /opt/gvm/var/lib/gvm/scap-data/nvdcve-2.0-2018.xml
md manage:   INFO:2021-11-30 09h51.15 utc:1402: Updating /opt/gvm/var/lib/gvm/scap-data/nvdcve-2.0-2020.xml
md manage:   INFO:2021-11-30 09h52.02 utc:1402: Updating /opt/gvm/var/lib/gvm/scap-data/nvdcve-2.0-2003.xml
md manage:   INFO:2021-11-30 09h52.06 utc:1402: Updating OVAL data
md manage:   INFO:2021-11-30 09h52.09 utc:1402: Updating /opt/gvm/var/lib/gvm/scap-data/oval/5.10/org.mitre.oval/c/oval.xml
md manage:   INFO:2021-11-30 09h52.09 utc:1402: Updating /opt/gvm/var/lib/gvm/scap-data/oval/5.10/org.mitre.oval/m/oval.xml
md manage:   INFO:2021-11-30 09h52.09 utc:1402: Updating /opt/gvm/var/lib/gvm/scap-data/oval/5.10/org.mitre.oval/v/family/ios.xml
md manage:   INFO:2021-11-30 09h52.09 utc:1402: Updating /opt/gvm/var/lib/gvm/scap-data/oval/5.10/org.mitre.oval/v/family/pixos.xml
md manage:   INFO:2021-11-30 09h52.10 utc:1402: Updating /opt/gvm/var/lib/gvm/scap-data/oval/5.10/org.mitre.oval/p/oval.xml
md manage:   INFO:2021-11-30 09h52.36 utc:1403: Updating VTs in database ... 78891 new VTs, 0 changed VTs
md manage:WARNING:2021-11-30 09h52.36 utc:1403: sql_exec_internal: PQexec failed: FEHLER:  Funktion digest(text, unknown) existiert nicht
LINE 1: ...d  ORDER BY nvts.oid ASC ) SELECT encode         (digest    ...
                                                             ^
HINT:  Keine Funktion stimmt mit dem angegebenen Namen und den Argumenttypen überein. Sie müssen möglicherweise ausdrückliche Typumwandlungen hinzufügen.
 (7)
md manage:WARNING:2021-11-30 09h52.36 utc:1403: sql_exec_internal: SQL: WITH pref_str AS (  SELECT name,         substring(name, '^(.*?):') AS oid,         substring (name, '^.*?:([^:]+):') AS pref_id,         (substring (name, '^.*?:([^:]+):')          || substring (name,                        '^[^:]*:[^:]*:[^:]*:(.*)')          || value) AS pref  FROM nvt_preferences ), nvt_str AS (  SELECT (SELECT nvts.oid            || max(modification_time)            || coalesce (string_agg(pref_str.pref, ''                                    ORDER BY pref_id),                         ''))         AS vt_string  FROM nvts  LEFT JOIN pref_str ON nvts.oid = pref_str.oid  GROUP BY nvts.oid  ORDER BY nvts.oid ASC ) SELECT encode         (digest           (coalesce (string_agg (nvt_str.vt_string, ''),                      ''),            'sha256'),          'hex') FROM nvt_str;
md manage:WARNING:2021-11-30 09h52.36 utc:1403: sql_x: sql_exec_internal failed
md manage:WARNING:2021-11-30 09h52.36 utc:1403: update_nvts_from_vts: SHA-256 hash of the VTs in the database ((null)) does not match the one from the scanner (ee1137fa223093c7e4af4d5ad69f5d3622ce1c87560d863716abe6ebdbc7ecac).
md   main:WARNING:2021-11-30 09h52.36 utc:1403: update_nvt_cache_retry: rebuild failed
md manage:   INFO:2021-11-30 09h53.28 utc:1402: Updating /opt/gvm/var/lib/gvm/scap-data/oval/5.10/org.mitre.oval/i/oval.xml
md manage:   INFO:2021-11-30 09h53.29 utc:1402: Updating /opt/gvm/var/lib/gvm/scap-data/oval/5.10/org.mitre.oval/v/family/macos.xml
md manage:   INFO:2021-11-30 09h53.30 utc:1402: Updating /opt/gvm/var/lib/gvm/scap-data/oval/5.10/org.mitre.oval/v/family/unix.xml
md manage:   INFO:2021-11-30 09h53.33 utc:1402: Updating /opt/gvm/var/lib/gvm/scap-data/oval/5.10/org.mitre.oval/v/family/windows.xml
md manage:   INFO:2021-11-30 09h53.39 utc:1402: Updating user OVAL definitions.
md manage:   INFO:2021-11-30 09h53.39 utc:1402: Updating CVSS scores and CVE counts for CPEs
md manage:   INFO:2021-11-30 09h55.45 utc:1402: Updating CVSS scores for OVAL definitions
md manage:   INFO:2021-11-30 09h55.49 utc:1402: Updating placeholder CPEs
md manage:   INFO:2021-11-30 09h56.09 utc:1402: Updating Max CVSS for DFN-CERT
md manage:   INFO:2021-11-30 09h56.10 utc:1402: Updating DFN-CERT CVSS max succeeded.
md manage:   INFO:2021-11-30 09h56.10 utc:1402: Updating Max CVSS for CERT-Bund
md manage:   INFO:2021-11-30 09h56.10 utc:1402: Updating CERT-Bund CVSS max succeeded.
md manage:   INFO:2021-11-30 09h56.15 utc:1402: update_scap_end: Updating SCAP info succeeded

Meanwhile I have restarted the service of gvmd again and again without further entries in that log.
The right location of this log file is “/opt/gvm/var/log/gvm/gvmd.log”, not " /var/log/gvm/gvmd.log2

You need to ensure that the library is build for the used postgres version and it is loadable (means it is in the linkers search path).

It seems you are building from source therefore I highly recommend to use our guide Greenbone Source Edition – Documentation — Greenbone Documentation documentation

2 Likes

Thanks for the URL. Meanwhile is the scanner running.

1 Like