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

Hi,

I have been running GVM using images from dockerhub, it was running fine.
But I upgraded to the latest version of GVM and it started failing when I tried to login.

gsa_1                  | gsad  gmp:WARNING:2023-07-26 09h20.09 utc:13: Failed to connect to server at /run/gvmd/gvmd.sock: No such file or directory
gsa_1                  | gsad  gmp:WARNING:2023-07-26 09h20.09 utc:13: Authentication failure for 'admin' from 10.1.20.171. Status was 1.

This is the error I am getting. I have checked for the sock file inside /run/gvmd directory and it exists but the size of the file is 0.

I have already tried the solutions mentioned in other threads, but unfortunately, none of them are working.

Hi,

could you check if there are other errors for example from gvmd? It’s very likely that gvmd is not running at all.

1 Like

Hi @bricks,

Thanks for your response.

Yes, as you said there is an error in GVMD. It is unable to connect to the psql(giving the wrong database version error.)
But all the images are latest and I have also tried bringing everything down and restarting it, still didn’t work. I am also unable to run ‘gvmd --migrate’ from either the Postgres or GVMD container.
Below is the complete error.

gvmd_1                 |  connection 
gvmd_1                 | ------------
gvmd_1                 |  connected
gvmd_1                 | (1 row)
gvmd_1                 | 
gvmd_1                 | 
gvmd_1                 | (gvmd:24): md manage-WARNING **: 09:13:45.759: sql_exec_internal: PQexec failed: ERROR:  extension "pg-gvm" has no update path from version "22.5" to version "22.6"
gvmd_1                 |  (7)
gvmd_1                 | 
gvmd_1                 | (gvmd:24): md manage-WARNING **: 09:13:45.759: sql_exec_internal: SQL: ALTER EXTENSION "pg-gvm" UPDATE;
gvmd_1                 | 
gvmd_1                 | (gvmd:24): md manage-WARNING **: 09:13:45.759: sqlv: sql_exec_internal failed
gvmd_1                 | Database is wrong version.
gvmd_1                 | Database is wrong version.
gvmd_1                 | Database is wrong version.
gvmd_1                 | starting gvmd
gvmd_1                 | md manage:MESSAGE:2023-07-26 09h13.45 utc:25: check_db_versions: database version supported by manager: 255
gvmd_1                 | md   main:MESSAGE:2023-07-26 09h13.45 utc:27:    Greenbone Vulnerability Manager version 22.6.0 (DB revision 255)
gvmd_1                 | md manage:   INFO:2023-07-26 09h13.45 utc:27:    Getting users.
gvmd_1                 | md manage:MESSAGE:2023-07-26 09h13.45 utc:27: check_db_versions: database version of database: 254
gvmd_1                 | md manage:MESSAGE:2023-07-26 09h13.45 utc:27: check_db_versions: database version supported by manager: 255
gvmd_1                 | md   main:MESSAGE:2023-07-26 09h13.45 utc:30:    Greenbone Vulnerability Manager version 22.6.0 (DB revision 255)
gvmd_1                 | md manage:   INFO:2023-07-26 09h13.45 utc:30:    Modifying setting.
gvmd_1                 | md manage:MESSAGE:2023-07-26 09h13.45 utc:30: check_db_versions: database version of database: 254
gvmd_1                 | md manage:MESSAGE:2023-07-26 09h13.45 utc:30: check_db_versions: database version supported by manager: 255
gvmd_1                 | md   main:MESSAGE:2023-07-26 09h13.45 utc:31:    Greenbone Vulnerability Manager version 22.6.0 (DB revision 255)
gvmd_1                 | md manage:MESSAGE:2023-07-26 09h13.45 utc:32: check_db_versions: database version of database: 254
gvmd_1                 | md manage:MESSAGE:2023-07-26 09h13.45 utc:32: check_db_versions: database version supported by manager: 255
gvmd_1                 | md   main:CRITICAL:2023-07-26 09h13.45 utc:32: gvmd: database is wrong version
gvmd_1                 | setting up configuration file for mail agent
gvmd_1                 | waiting 1 second for ready postgres container
gvmd_1                 | waiting 1 second for ready postgres container
gvmd_1                 | waiting 1 second for ready postgres container
gvmd_1                 | waiting 1 second for ready postgres container
gvmd_1                 | waiting 1 second for ready postgres container
gvmd_1                 | waiting 1 second for ready postgres container
gvmd_1                 | psql: error: could not connect to server: Connection refused
gvmd_1                 | 	Is the server running locally and accepting
gvmd_1                 | 	connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
gvmd_1                 | waiting 1 second to retry psql connection

This should have the same origin like already discussed here:

1 Like

Thank you @cfi for attaching this thread.
The issue was because of the postgres, after pulling the latest image the issue got resolved.

Also Thank you @bricks

1 Like

I already expected the pg-gvm issue to causing your pains here.

2 Likes