Fresh install of Ubuntu and the docker containers. Failure to login

Hi all,

I am following the docker install here. Greenbone Community Containers 22.4 - Greenbone Community Documentation

I get it completely installed and change the password on the system using the command provided. I get a red box on the login screen that say this:

The Greenbone Vulnerability Manager service is not responding. This could be due to system maintenance. Please try again later, check the system status, or contact your system administrator.

These are the errors in the logs:

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
pg-gvm_1 | The PostgreSQL server failed to start. Please check the log output:
pg-gvm_1 | 2023-06-19 20:26:28.513 UTC [23] LOG: starting PostgreSQL 13.11 (Debian 13.11-0+deb11u1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
pg-gvm_1 | 2023-06-19 20:26:28.514 UTC [23] LOG: listening on IPv4 address “127.0.0.1”, port 5432
pg-gvm_1 | 2023-06-19 20:26:28.514 UTC [23] LOG: could not bind IPv6 address “::1”: Cannot assign requested address
pg-gvm_1 | 2023-06-19 20:26:28.514 UTC [23] HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
pg-gvm_1 | 2023-06-19 20:26:28.595 UTC [23] LOG: listening on Unix socket “/tmp/.s.PGSQL.5432”
pg-gvm_1 | 2023-06-19 20:26:28.601 UTC [24] LOG: database system was shut down at 2023-06-19 14:01:04 UTC
pg-gvm_1 | 2023-06-19 20:26:28.612 UTC [23] LOG: database system is ready to accept connections
pg-gvm_1 | CREATE ROLE
pg-gvm_1 | GRANT ROLE
pg-gvm_1 | CREATE EXTENSION
pg-gvm_1 | CREATE EXTENSION
pg-gvm_1 | ERROR: extension “pg-gvm” has no installation script nor update path for version “1.1”
gvmd_1 | psql: error: could not connect to server: No such file or directory
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
pg-gvm_1 | 2023-06-19 20:26:59.605 UTC [83] LOG: starting PostgreSQL 13.11 (Debian 13.11-0+deb11u1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
pg-gvm_1 | 2023-06-19 20:26:59.608 UTC [83] LOG: listening on IPv4 address “127.0.0.1”, port 5432
pg-gvm_1 | 2023-06-19 20:26:59.608 UTC [83] LOG: could not bind IPv6 address “::1”: Cannot assign requested address
pg-gvm_1 | 2023-06-19 20:26:59.608 UTC [83] HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
pg-gvm_1 | 2023-06-19 20:26:59.613 UTC [83] LOG: listening on Unix socket “/var/run/postgresql/.s.PGSQL.5432”
pg-gvm_1 | 2023-06-19 20:26:59.621 UTC [84] LOG: database system was shut down at 2023-06-19 20:26:59 UTC
pg-gvm_1 | 2023-06-19 20:26:59.631 UTC [83] LOG: database system is ready to accept connections
gvmd_1 | connection
gvmd_1 | ------------
gvmd_1 | connected
gvmd_1 | (1 row)
gvmd_1 |
gvmd_1 | md manage-Message: 20:27:00.692: cleanup_old_sql_functions: cleaning up SQL functions now included in pg-gvm extension
gvmd_1 |
gvmd_1 | (gvmd:58): md manage-WARNING **: 20:27:00.694: sql_exec_internal: PQexec failed: ERROR: extension “pg-gvm” has no installation script nor update path for version “1.1”
gvmd_1 | (7)
gvmd_1 |
gvmd_1 | (gvmd:58): md manage-WARNING **: 20:27:00.694: sql_exec_internal: SQL: CREATE EXTENSION IF NOT EXISTS “pg-gvm”
gvmd_1 |
gvmd_1 | (gvmd:58): md manage-WARNING **: 20:27:00.694: sqlv: sql_exec_internal failed
pg-gvm_1 | 2023-06-19 20:27:00.694 UTC [92] gvmd@gvmd ERROR: extension “pg-gvm” has no installation script nor update path for version “1.1”
pg-gvm_1 | 2023-06-19 20:27:00.694 UTC [92] gvmd@gvmd STATEMENT: CREATE EXTENSION IF NOT EXISTS “pg-gvm”
pg-gvm_1 | 2023-06-19 20:27:00.717 UTC [93] gvmd@gvmd ERROR: relation “public.meta” does not exist at character 19
pg-gvm_1 | 2023-06-19 20:27:00.717 UTC [93] gvmd@gvmd STATEMENT: SELECT value FROM public.meta WHERE name = ‘database_version’;
pg-gvm_1 | 2023-06-19 20:27:00.723 UTC [93] gvmd@gvmd ERROR: extension “pg-gvm” has no installation script nor update path for version “1.1”
pg-gvm_1 | 2023-06-19 20:27:00.723 UTC [93] gvmd@gvmd STATEMENT: CREATE EXTENSION IF NOT EXISTS “pg-gvm”
pg-gvm_1 | 2023-06-19 20:27:00.742 UTC [94] gvmd@gvmd ERROR: relation “public.meta” does not exist at character 19
pg-gvm_1 | 2023-06-19 20:27:00.742 UTC [94] gvmd@gvmd STATEMENT: SELECT value FROM public.meta WHERE name = ‘database_version’;
pg-gvm_1 | 2023-06-19 20:27:00.750 UTC [94] gvmd@gvmd ERROR: extension “pg-gvm” has no installation script nor update path for version “1.1”
pg-gvm_1 | 2023-06-19 20:27:00.750 UTC [94] gvmd@gvmd STATEMENT: CREATE EXTENSION IF NOT EXISTS “pg-gvm”
pg-gvm_1 | 2023-06-19 20:27:00.780 UTC [95] gvmd@gvmd ERROR: relation “public.meta” does not exist at character 19
pg-gvm_1 | 2023-06-19 20:27:00.780 UTC [95] gvmd@gvmd STATEMENT: SELECT value FROM public.meta WHERE name = ‘database_version’;
pg-gvm_1 | 2023-06-19 20:27:00.796 UTC [95] gvmd@gvmd ERROR: extension “pg-gvm” has no installation script nor update path for version “1.1”
pg-gvm_1 | 2023-06-19 20:27:00.796 UTC [95] gvmd@gvmd STATEMENT: CREATE EXTENSION IF NOT EXISTS “pg-gvm”
gvmd_1 | starting gvmd
gvmd_1 | md manage:WARNING:2023-06-19 20h27.00 utc:64: sql_exec_internal: SQL: SELECT value FROM public.meta WHERE name = ‘database_version’;
gvmd_1 | md manage:WARNING:2023-06-19 20h27.00 utc:64: sql_x: sql_exec_internal failed
gvmd_1 | md manage:MESSAGE:2023-06-19 20h27.00 utc:64: No SCAP database found
gvmd_1 | md manage:MESSAGE:2023-06-19 20h27.00 utc:64: No CERT database found
gvmd_1 | md manage:MESSAGE:2023-06-19 20h27.00 utc:64: cleanup_old_sql_functions: cleaning up SQL functions now included in pg-gvm extension
gvmd_1 | md manage:WARNING:2023-06-19 20h27.00 utc:64: sql_exec_internal: PQexec failed: ERROR: extension “pg-gvm” has no installation script nor update path for version “1.1”
gvmd_1 | (7)
gvmd_1 | md manage:WARNING:2023-06-19 20h27.00 utc:64: sql_exec_internal: SQL: CREATE EXTENSION IF NOT EXISTS “pg-gvm”
gvmd_1 | md manage:WARNING:2023-06-19 20h27.00 utc:64: sqlv: sql_exec_internal failed
gvmd_1 | md main:MESSAGE:2023-06-19 20h27.00 utc:65: Greenbone Vulnerability Manager version 22.5.0 (DB revision 254)
pg-gvm_1 | 2023-06-19 20:27:00.827 UTC [96] gvmd@gvmd ERROR: relation “public.meta” does not exist at character 19
pg-gvm_1 | 2023-06-19 20:27:00.827 UTC [96] gvmd@gvmd STATEMENT: SELECT value FROM public.meta WHERE name = ‘database_version’;
pg-gvm_1 | 2023-06-19 20:27:00.843 UTC [96] gvmd@gvmd ERROR: extension “pg-gvm” has no installation script nor update path for version “1.1”
pg-gvm_1 | 2023-06-19 20:27:00.843 UTC [96] gvmd@gvmd STATEMENT: CREATE EXTENSION IF NOT EXISTS “pg-gvm”
gvmd_1 | md manage:WARNING:2023-06-19 20h27.00 utc:66: sql_exec_internal: PQexec failed: ERROR: relation “public.meta” does not exist
gvmd_1 | LINE 1: SELECT value FROM public.meta WHERE name = 'database_version…
gvmd_1 | ^
gvmd_1 | (7)
gvmd_1 | md manage:WARNING:2023-06-19 20h27.00 utc:66: sql_exec_internal: SQL: SELECT value FROM public.meta WHERE name = ‘database_version’;
gvmd_1 | md manage:WARNING:2023-06-19 20h27.00 utc:66: sql_x: sql_exec_internal failed
gvmd_1 | md manage:MESSAGE:2023-06-19 20h27.00 utc:66: No SCAP database found
gvmd_1 | md manage:MESSAGE:2023-06-19 20h27.00 utc:66: No CERT database found
gvmd_1 | md manage:MESSAGE:2023-06-19 20h27.00 utc:66: cleanup_old_sql_functions: cleaning up SQL functions now included in pg-gvm extension
gvmd_1 | md manage:WARNING:2023-06-19 20h27.00 utc:66: sql_exec_internal: PQexec failed: ERROR: extension “pg-gvm” has no installation script nor update path for version “1.1”
gvmd_1 | (7)
gvmd_1 | md manage:WARNING:2023-06-19 20h27.00 utc:66: sql_exec_internal: SQL: CREATE EXTENSION IF NOT EXISTS “pg-gvm”
gvmd_1 | md manage:WARNING:2023-06-19 20h27.00 utc:66: sqlv: sql_exec_internal failed
ospd-openvas_1 | OSPD[7] 2023-06-19 20:27:51,245: INFO: (ospd_openvas.daemon) Finished loading VTs. The VT cache has been updated from version 0 to 202306161507.
gsa_1 | gsad gmp:WARNING:2023-06-19 20h28.24 utc:13: Failed to connect to server at /run/gvmd/gvmd.sock: No such file or directory
gsa_1 | gsad gmp:WARNING:2023-06-19 20h28.24 utc:13: Authentication failure for ‘admin’ from 10.60.20.2. Status was 1.

I am obviously doing something wrong. What should I do next?

Thank you
Charles

I belive your problem is that you have another instance of PostgreSQL running on the default port within your Ubuntu installation. Even though docker is a virtualization, it will still use the bare-metal ports to communicate between services. So, this port 5432 is already in use.

I’m not aware of how to change the default listening port for Greenbone Community Ed. within the docker containers, but this is one potential solution. Otherwise, you could re-assign the already running PostgreSQL port to another port.

You’re not alone there Charles.
I built a new system from scratch yesterday successfully using community-containers, and when I tried just now I get the same issue as you.
I suspect there is a breaking change in pg-gvm 22.5.0 that came out 14 hours ago.

I see log messags about port 5432 and IPv6 going back in my old builds that that hasn’t been causing the postgresql process to fail to start like I’m seeing now.

My old builds seem to be on pgsql v13.8. The new builds are on pgqsl v13.11

When comparing old builds with new builds, they seem to diverge at this line:

ERROR:  extension "pg-gvm" has no installation script nor update path for version "1.1"

Here is an old startup of pg-gvm:

2023-06-19 02:27:41.337 UTC [23] LOG:  starting PostgreSQL 13.8 (Debian 13.8-0+deb11u1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
2023-06-19 02:27:41.341 UTC [23] LOG:  listening on IPv4 address "127.0.0.1", port 5432
2023-06-19 02:27:41.341 UTC [23] LOG:  could not bind IPv6 address "::1": Cannot assign requested address
2023-06-19 02:27:41.341 UTC [23] HINT:  Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
2023-06-19 02:27:41.352 UTC [23] LOG:  listening on Unix socket "/tmp/.s.PGSQL.5432"
2023-06-19 02:27:41.365 UTC [24] LOG:  database system was interrupted; last known up at 2023-06-19 02:23:17 UTC
2023-06-19 02:27:41.802 UTC [24] LOG:  database system was not properly shut down; automatic recovery in progress
2023-06-19 02:27:41.805 UTC [24] LOG:  redo starts at 3/4A64FA28
2023-06-19 02:27:41.806 UTC [24] LOG:  invalid record length at 3/4A650538: wanted 24, got 0
2023-06-19 02:27:41.806 UTC [24] LOG:  redo done at 3/4A650508
2023-06-19 02:27:41.828 UTC [23] LOG:  database system is ready to accept connections
createuser: error: creation of new role failed: ERROR:  role "gvmd" already exists
createdb: error: database creation failed: ERROR:  database "gvmd" already exists
ERROR:  role "dba" already exists
NOTICE:  role "gvmd" is already a member of role "dba"
GRANT ROLE
ERROR:  extension "uuid-ossp" already exists
ERROR:  extension "pgcrypto" already exists
ERROR:  extension "pg-gvm" already exists
2023-06-19 02:28:13.315 UTC [83] LOG:  starting PostgreSQL 13.8 (Debian 13.8-0+deb11u1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
2023-06-19 02:28:13.316 UTC [83] LOG:  listening on IPv4 address "127.0.0.1", port 5432
2023-06-19 02:28:13.316 UTC [83] LOG:  could not bind IPv6 address "::1": Cannot assign requested address
2023-06-19 02:28:13.316 UTC [83] HINT:  Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
2023-06-19 02:28:13.320 UTC [83] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2023-06-19 02:28:13.325 UTC [84] LOG:  database system was shut down at 2023-06-19 02:28:13 UTC
2023-06-19 02:28:13.331 UTC [83] LOG:  database system is ready to accept connections

This is what I’m seeing now:

2023-06-20 03:59:36.383 UTC [23] LOG:  starting PostgreSQL 13.11 (Debian 13.11-0+deb11u1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
2023-06-20 03:59:36.430 UTC [23] LOG:  listening on IPv4 address "127.0.0.1", port 5432
2023-06-20 03:59:36.430 UTC [23] LOG:  could not bind IPv6 address "::1": Cannot assign requested address
2023-06-20 03:59:36.430 UTC [23] HINT:  Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
2023-06-20 03:59:36.558 UTC [23] LOG:  listening on Unix socket "/tmp/.s.PGSQL.5432"
2023-06-20 03:59:36.779 UTC [24] LOG:  database system was interrupted; last known up at 2023-06-20 03:58:53 UTC
2023-06-20 03:59:49.112 UTC [24] LOG:  database system was not properly shut down; automatic recovery in progress
2023-06-20 03:59:49.121 UTC [24] LOG:  invalid record length at 0/1610C48: wanted 24, got 0
2023-06-20 03:59:49.121 UTC [24] LOG:  redo is not required
2023-06-20 03:59:49.207 UTC [23] LOG:  database system is ready to accept connections
createuser: error: creation of new role failed: ERROR:  role "gvmd" already exists
createdb: error: database creation failed: ERROR:  database "gvmd" already exists
ERROR:  role "dba" already exists
GRANT ROLE
NOTICE:  role "gvmd" is already a member of role "dba"
ERROR:  extension "uuid-ossp" already exists
ERROR:  extension "pgcrypto" already exists
ERROR:  extension "pg-gvm" has no installation script nor update path for version "1.1"
2023-06-20 04:00:19.997 UTC [83] LOG:  starting PostgreSQL 13.11 (Debian 13.11-0+deb11u1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
2023-06-20 04:00:19.998 UTC [83] LOG:  listening on IPv4 address "127.0.0.1", port 5432
2023-06-20 04:00:19.998 UTC [83] LOG:  could not bind IPv6 address "::1": Cannot assign requested address
2023-06-20 04:00:19.998 UTC [83] HINT:  Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
2023-06-20 04:00:20.005 UTC [83] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2023-06-20 04:00:20.017 UTC [84] LOG:  database system was shut down at 2023-06-20 04:00:19 UTC
2023-06-20 04:00:20.017 UTC [85] gvmd@gvmd FATAL:  the database system is starting up
2023-06-20 04:00:20.024 UTC [83] LOG:  database system is ready to accept connections
2023-06-20 04:00:21.164 UTC [93] gvmd@gvmd ERROR:  extension "pg-gvm" has no installation script nor update path for version "1.1"
2023-06-20 04:00:21.164 UTC [93] gvmd@gvmd STATEMENT:  CREATE EXTENSION IF NOT EXISTS "pg-gvm"
2023-06-20 04:00:21.191 UTC [94] gvmd@gvmd ERROR:  relation "public.meta" does not exist at character 19
2023-06-20 04:00:21.191 UTC [94] gvmd@gvmd STATEMENT:  SELECT value FROM public.meta WHERE name = 'database_version';
2023-06-20 04:00:21.199 UTC [94] gvmd@gvmd ERROR:  extension "pg-gvm" has no installation script nor update path for version "1.1"
2023-06-20 04:00:21.199 UTC [94] gvmd@gvmd STATEMENT:  CREATE EXTENSION IF NOT EXISTS "pg-gvm"
2023-06-20 04:00:21.220 UTC [95] gvmd@gvmd ERROR:  relation "public.meta" does not exist at character 19
2023-06-20 04:00:21.220 UTC [95] gvmd@gvmd STATEMENT:  SELECT value FROM public.meta WHERE name = 'database_version';
2023-06-20 04:00:21.229 UTC [95] gvmd@gvmd ERROR:  extension "pg-gvm" has no installation script nor update path for version "1.1"
2023-06-20 04:00:21.229 UTC [95] gvmd@gvmd STATEMENT:  CREATE EXTENSION IF NOT EXISTS "pg-gvm"
2023-06-20 04:00:21.249 UTC [96] gvmd@gvmd ERROR:  relation "public.meta" does not exist at character 19
2023-06-20 04:00:21.249 UTC [96] gvmd@gvmd STATEMENT:  SELECT value FROM public.meta WHERE name = 'database_version';
2023-06-20 04:00:21.257 UTC [96] gvmd@gvmd ERROR:  extension "pg-gvm" has no installation script nor update path for version "1.1"
2023-06-20 04:00:21.257 UTC [96] gvmd@gvmd STATEMENT:  CREATE EXTENSION IF NOT EXISTS "pg-gvm"
2023-06-20 04:00:21.277 UTC [97] gvmd@gvmd ERROR:  relation "public.meta" does not exist at character 19
2023-06-20 04:00:21.277 UTC [97] gvmd@gvmd STATEMENT:  SELECT value FROM public.meta WHERE name = 'database_version';
2023-06-20 04:00:21.283 UTC [97] gvmd@gvmd ERROR:  extension "pg-gvm" has no installation script nor update path for version "1.1"
2023-06-20 04:00:21.283 UTC [97] gvmd@gvmd STATEMENT:  CREATE EXTENSION IF NOT EXISTS "pg-gvm"

1 Like

I’ve created a new github issue:

Which looks a lot like an existing issue:

2 Likes

Hi all,

The container updated and it is all working now.

Thank you all,
Charles

Fixed with Release pg-gvm 22.5.1 · greenbone/pg-gvm · GitHub a new container image is uploaded and ready.

4 Likes