Openvas doesn't start after upgrade

Hello everyone, I updated gsad to the version proposed by the updates.

Unfortunately, the redis service does not start and fails.

dbconfig-common: writing config to /etc/dbconfig-common/gvmd-pg.conf
dbconfig-common: flushing administrative password
migrating the postgresql database...

(gvmd-pg:12180): md manage-WARNING **: 07:40:52.130: sql_open: PQconnectPoll failed

(gvmd-pg:12180): md manage-WARNING **: 07:40:52.130: sql_open: PQerrorMessage (conn): could not connect to server: Connection refused
	Is the server running on host "localhost" (::1) and accepting
	TCP/IP connections on port 5432?
could not connect to server: Connection refused
	Is the server running on host "localhost" ( and accepting
	TCP/IP connections on port 5432?

(gvmd-pg:12180): md manage-WARNING **: 07:40:52.130: init_manage_open_db: sql_open failed
Creating admin user...
Prime generation might be too slow. To make it faster it is a good idea to perform some other action (type on the keyboard, move the mouse, utilize the disks).
Existing certificate infrastructure found, aborting.
Use '-f' parameter to overwrite existing certificates.
Configurazione di openvas-scanner (1:21.4.4-1)...
The user `gvm' is already a member of `redis'.
Configurazione di python3-distupgrade (1:20.04.38)...
Configurazione di locales (2.31-0ubuntu9.9)...
Generating locales (this might take a while)...


Have you tried this?

chown -R redis:redis /var/log/redis
chmod -R u+rwX,g+rwX,u+rx /var/log/redis

chmod +r /etc/redis/redis.conf
1 Like

I just tried, but unfortunately nothing to do!

did you upgrade your postgres installation? maybe from 10->11 or what ever?

is your postgres running?

1 Like

Yes, updates to the distro I upgraded postgres but nothing to do. I made all the updates to finally leave only those of openvas, so if I update only the openvas suite does not work.

once you upgrade the postgres version (you should have done with the pg_upgrade tool) you also need to recompile gvm-libs to match the postgres version. maybe you should recompile all components, to have the correct bindings.

1 Like

First of all, thank you for your reply, however, the package I installed by openvas is not the version to compile, so the error probably as you write is due to the migration to the database. But what to do now?

okay, which distribution do you use?

first of all make sure you have migrated the database, let me just google a howto for you:
change it to your needs. don’t forget to configure your new postgres for the gvm needs (pg_hba.conf…) (also disable jit compiler for postgres etc.) normally you can copy the configuration files to the new DB.

than what you in the most cases need todo is compile the packages again:

for Debian/Ubuntu/Kali

apt-get build-dep -y <package>;
apt-get source --compile <package>;

Or even better is to build gvm complete from source.

Best Regards, Josef


Thank you for responding. The destruction I use is ubuntu, but like LXC on proxmox (never had problems, only insufficient memory that I solved …).

Linux openvas 5.15.35-1-pve #1 SMP PVE 5.15.35-2 (Thu, 05 May 2022 13:54:35 +0200) x86_64 x86_64 x86_64 GNU/Linux

Ubuntu 20.04.4 LTS (GNU/Linux 5.15.35-1-pve x86_64)

Also I just ran the openvas update again (as before), here are the errors :slight_smile:

Failed to connect to server at /run/gvmd/gvmd.sock: No such file or directory

root@openvas:/run/gvm# ls -l
total 4
-rw-rw-r-- 1 gvm gvm 0 mag 18 18:46 gvm-checking
-rw-rw-r-- 1 gvm gvm 0 mag 18 18:46 gvm-create-functions
-rw------- 1 gvm gvm 5 mag 18 18:46
srw-rw---- 1 gvm gvm 0 mag 18 18:46 gvmd.sock
-rw-rw-r-- 1 gvm gvm 0 mag 18 18:46 gvm-helping
-rw-rw-r-- 1 gvm gvm 0 mag 18 18:46 gvm-migrating
-rw-rw-r-- 1 gvm gvm 0 mag 18 18:46 gvm-serving

From where are the packages? Looks like they not maintain it very good.


Yes, I installed my openvas from :slight_smile:

Add-apt-repository ppa:mrazavi/gvm

You should contact and ask him to update the packages so that everything match together. Or you keep your old version of postgres, if he is not provide the source to compile it again.


Thank you for taking the time to the problem, I will see how to contact him.

1 Like