I wanted to report a misleading error message in the gvm-check-setup script in case this is still an issue. Overall I find this script very useful for diagnosing issues with the openvas program after an upgrade to the system. However this one had me going for a bit. The error reported was that the pgcrypto extension in Postgres was missing.
Step 5: Checking Postgresql DB and user …
OK: Postgresql version and default port are OK.
gvmd | _gvm | UTF8 | libc | en_US.UTF-8 | en_US.UTF-8 | | | =Tc/_gvm +
ERROR: The new extension pgcrypto does not exist for gvmd database
FIX: Run ‘sudo runuser -u postgres – /usr/share/gvm/create-postgresql-database’
However checking the Postgres extensions in the database, it was clearly there.
gvmd=# \dx
List of installed extensions
Name | Version | Schema | Description
-----------±--------±-----------±------------------------------------------------
pgcrypto | 1.3 | public | cryptographic functions
plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language
uuid-ossp | 1.1 | public | generate universally unique identifiers (UUIDs)
(3 rows)
The problem that existed was that the pg-gvm extension was missing. Checking the gvm-check-setup script showed that the script is correctly checking for the existence of the pg-gvm extension but reporting an error indicating the pgcrypto extension is missing.
416 echo "Checking the PostgreSQL extension pg-gvm" >> $LOG
417 if ! runuser -u _gvm -- psql --quiet --tuples-only --no-align -c "SELECT * FROM pg_extension" gvmd | grep pg-gvm
418 then
419 log_and_print "ERROR: The new extension pgcrypto does not exist for gvmd database"
420 log_and_print "FIX: Run 'sudo runuser -u postgres -- /usr/share/gvm/create-postgresql-database'"
421 check_failed
422 fi
The fix for the problem under Kali was to install the pg-gvm extension
apt install postgresql-16-pg-gvm