OpenVAS Greenbone GVS security scanner segfaults

What have you tried:
Running OpenVAS Greenbone GVS security scanner
What is the error:
Port 9392 not open. https://127.0.0.1:9392/ not available because process segfaults
What device is this on:
the official kali linux vmware image:
https://cdimage.kali.org/kali-2025.1c/kali-linux-2025.1c-vmware-amd64.7z

Before you do anything else, run a full upgrade.

What is the segfault message you get?

1 Like

I have been trying to post this for 5min but discourse gives me 403 errors

This is the full post: What have you tried:Running OpenVAS Greenbone GVS security scannerWhat is th - Pastebin.com

sudo apt full-upgrade did not fix the issue straight away.

sudo gvm-start now gives

Job for gvmd.service failed because a timeout was exceeded.
See "systemctl status gvmd.service" and "journalctl -xeu gvmd.service" for details.

journalctl -xeu gvmd.service gives:

May 15 10:25:51 kali gvmd[2771]: md manage:MESSAGE:2025-05-15 14h25.51 utc:2771: check_db_versions: database version supported by manager: 259
May 15 10:25:51 kali gvmd[2771]: md   main:CRITICAL:2025-05-15 14h25.51 utc:2771: gvmd: database is wrong version
May 15 10:25:51 kali gvmd[2771]: md   main:CRITICAL:2025-05-15 14h25.51 utc:2771: gvmd: Your database is too old for this version of gvmd.
May 15 10:25:51 kali gvmd[2771]: md   main:CRITICAL:2025-05-15 14h25.51 utc:2771: gvmd: Please migrate to the current data model.
May 15 10:25:51 kali gvmd[2771]: md   main:CRITICAL:2025-05-15 14h25.51 utc:2771: gvmd: Use a command like this: gvmd --migrate

gvmd --migrate fails at sql_open.

I will try to reinstall the package and report back.

1 Like

No, even completely reinstalling everything from a fresh vm doesn’t work.

The latest gvm and postgres packages are not compatible with each other

gvm-setup recommends:

] Creating PostgreSQL database
WARNING: database “postgres” has a collation version mismatch
DETAIL: The database was created using collation version 2.40, but the operating system provides version 2.41.
HINT: Rebuild all objects in this database that use the default collation and run ALTER DATABASE postgres REFRESH COLLATION VERSION, or build PostgreSQL with the right library version.

Not sure where exactly I should execute that ALTER DATABASE postgres REFRESH COLLATION VERSION command.

─$ sudo psql -c “ALTER DATABASE postgres REFRESH COLLATION VERSION”
psql: error: connection to server on socket “/var/run/postgresql/.s.PGSQL.5432” failed: FATAL: role “root” does not exist

You need to run psql as the user postgres, so do:

sudo su postgres -

Then run the postgres client:

psql

To list the databases, run:

\l

(Thats a lowercase L by the way!)

You should get something like this:

postgres=# \l
List of databases
Name | Owner | Encoding | Locale Provider | Collate | Ctype | Locale | ICU Rules | Access privileges
-----------±---------±---------±----------------±------------±------------±-------±----------±----------------------
gvmd | _gvm | UTF8 | libc | en_US.UTF-8 | en_US.UTF-8 | | |
postgres | postgres | UTF8 | libc | en_US.UTF-8 | en_US.UTF-8 | | |
template0 | postgres | UTF8 | libc | en_US.UTF-8 | en_US.UTF-8 | | | =c/postgres +
| | | | | | | | postgres=CTc/postgres
template1 | postgres | UTF8 | libc | en_US.UTF-8 | en_US.UTF-8 | | | =c/postgres +
| | | | | | | | postgres=CTc/postgres

Then run your ALTER command.

2 Likes

That did work! Thank you!

sudo su postgres
psql -c "ALTER DATABASE postgres REFRESH COLLATION VERSION"
psql -c "ALTER DATABASE template1 REFRESH COLLATION VERSION"
exit
sudo gvm-setup
sudo gvm-start

I hope the package gets fixed so that others don’t have to struggle.

1 Like

since the setup got messed up with the database i also had to set a new password and recreate the scan config

sudo gvm-stop
sudo runuser -u _gvm -- gvmd --user=admin --new-password=<removed>
sudo -u _gvm gvmd --rebuild-gvmd-data=all
sudo gvm-start

But now it finally seems to work fully :slight_smile:

I also had to manually run

sudo greenbone-scapdata-sync

one more time to get rid of the “The SCAP database is required” error when displaying reports. But now everything finally seems to work. fingers crossed