Installing GVM with remote postgres (using docker-compose)

GVM versions

gsad: none yet
gvmd: last provided by
openvas-scanner: none yet
gvm-libs: unknown


Operating system: Linux
Kernel: (‘uname -a’) doesn’t matter: just using dockers.
Installation method / source:
I’m trying to install GVMd by using docker-compose with an external postgresql installation, and it seems to have all kind of errors.

Source code is here:
The readme file contains instructions to replicate this.

It is showing different errors:

  • Migration doesn’t work because it complains about /usr/local/lib/libgvm-pg-server:
gvm_1       | (gvmd:20): md manage-WARNING **: 11:31:36.793: sql_exec_internal: SQL: CREATE OR REPLACE FUNCTION hosts_contains (text, text) RETURNS boolean AS '/usr/local/lib/libgvm-pg-server', 'sql_hosts_contains' LANGUAGE C I
  • Looks like it connects to DB because it shows that some extensions are already created, but later it complains again about the same file.
  • Finally, it looks like is trying to connect using sockets instead of the PG_HOST:
gvm_1       | md manage:WARNING:2022-05-13 11h31.36 utc:23: sql_open: PQconnectStart to 'gvmd' failed: could not connect to server: No such file or directory
gvm_1       |   Is the server running locally and accepting
gvm_1       |   connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

Could anyone help me to make it work? It might be a cool contribution when working.

you need to build gvm-libs with postgres support that will provide the or have a look to

In any case you need to provide the for your postges version.

1 Like