I deployed two openvas servers on two distinct VMs (Debian 10) with postgresql version 11. I replicated the postgres 11 using with hot standby configuration, the data is getting replicated but after the replication, gvmd service & gsad service goes down. On the other hand, ospd-openvas.service is up, but because of gvmd service is down, I am not able to log in.
In the log section, I am getting these errors:
sql_exec_internal: SQL: CREATE EXTENSION IF NOT EXISTS “uuid-ossp” sqlv: sql_exec_internal failed
systemctl status gvmd.service give me and error output of -
gvmd.service: Can’t open PID file /run/gvm/gvmd.pid (yet?) after start: No such file or directory
I tried to create an extension in postgresql of “uuid-ossp”, but it postgres cannot create an extension in a read-only transaction.
transaction of postgresql cannot be set to read write mode because of the recovery file, and after removing recovery file from /var/lib/postgresql/11/main/recovery.conf gvmd & gsad service starts normally.
Did you install from the Debian 10 Buster repository? (I’ve moved your post into the Linux Distribution category in the meantime, if it’s the wrong place we can move it later). If it’s a repository install it’s out of date with OpenVAS 9 which is end of life. If not, please let us know. Thanks!
I am not a PostgreSQL expert, but you need to be aware what table is locked and how your replication is running while you have a active application altering your database content. That Setup is NOT supported and GVM is not aware of any replication methods needing application / locking support in the database, so your replication method needs to be agnostic to the application.