After Cloudron upgrade to v8.3.1, postgresql fails to start with message 'root@postgres FATAL: role "root" does not exist'
-
Hi,
After upgrading Cloudron to v8.3.1, the postgresql service (as well as multiple apps presumably depending on it) fails to restart and shows the following error message: 'root@postgres FATAL: role "root" does not exist.'
How would you suggest to handle this?
Best,
Sébastien -
Can you send the postgres service logs?
-
Thanks for asking! Here are the logs:
Service postgresql Apr 01 09:19:55 ==> Detected existing installation Apr 01 09:19:55 ==> Copying updated config Apr 01 09:19:55 ==> Updating existing postgresql Apr 01 09:19:55 waiting for server to start....2025-04-01 13:19:55.095 GMT [15] LOG: skipping missing configuration file "/var/lib/postgresql/16/main/custom.conf" Apr 01 09:19:55 2025-04-01 13:19:55.095 GMT [15] LOG: skipping missing configuration file "/var/lib/postgresql/16/main/custom.conf" Apr 01 09:19:55 2025-04-01 13:19:55.268 UTC [15] LOG: starting PostgreSQL 16.6 (Ubuntu 16.6-0ubuntu0.24.04.1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 13.2.0-23ubuntu4) 13.2.0, 64-bit Apr 01 09:19:55 2025-04-01 13:19:55.268 UTC [15] LOG: listening on IPv4 address "0.0.0.0", port 5432 Apr 01 09:19:55 2025-04-01 13:19:55.268 UTC [15] LOG: listening on IPv6 address "::", port 5432 Apr 01 09:19:55 2025-04-01 13:19:55.370 UTC [15] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" Apr 01 09:19:55 2025-04-01 13:19:55.557 UTC [18] LOG: database system was interrupted; last known up at 2025-04-01 13:18:53 UTC Apr 01 09:19:55 2025-04-01 13:19:55.857 UTC [18] LOG: database system was not properly shut down; automatic recovery in progress Apr 01 09:19:55 2025-04-01 13:19:55.928 UTC [18] LOG: invalid record length at 0/1550C80: expected at least 24, got 0 Apr 01 09:19:55 2025-04-01 13:19:55.928 UTC [18] LOG: redo is not required Apr 01 09:19:56 2025-04-01 13:19:56.005 UTC [16] LOG: checkpoint starting: end-of-recovery immediate wait Apr 01 09:19:56 .2025-04-01 13:19:56.264 UTC [16] LOG: checkpoint complete: wrote 3 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.035 s, sync=0.055 s, total=0.316 s; sync files=2, longest=0.033 s, average=0.028 s; distance=0 kB, estimate=0 kB; lsn=0/1550C80, redo lsn=0/1550C80 Apr 01 09:19:56 2025-04-01 13:19:56.321 UTC [15] LOG: database system is ready to accept connections Apr 01 09:19:56 done Apr 01 09:19:56 server started Apr 01 09:19:56 ==> Waiting for Postgres Apr 01 09:19:56 pg_ctl: server is running (PID: 15) Apr 01 09:19:56 /usr/lib/postgresql/16/bin/postgres "-D" "/var/lib/postgresql/16/main" Apr 01 09:19:56 ==> Postgres is running Apr 01 09:19:56 ==> Resetting root password Apr 01 09:19:56 2025-04-01 13:19:56.439 UTC [28] root@postgres FATAL: role "root" does not exist Apr 01 09:19:56 psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: role "root" does not exist Apr 01 09:20:57 ==> Detected existing installation Apr 01 09:20:57 ==> Copying updated config Apr 01 09:20:57 ==> Updating existing postgresql Apr 01 09:20:57 waiting for server to start....2025-04-01 13:20:57.400 GMT [15] LOG: skipping missing configuration file "/var/lib/postgresql/16/main/custom.conf" Apr 01 09:20:57 2025-04-01 13:20:57.400 GMT [15] LOG: skipping missing configuration file "/var/lib/postgresql/16/main/custom.conf" Apr 01 09:20:57 2025-04-01 13:20:57.610 UTC [15] LOG: starting PostgreSQL 16.6 (Ubuntu 16.6-0ubuntu0.24.04.1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 13.2.0-23ubuntu4) 13.2.0, 64-bit Apr 01 09:20:57 2025-04-01 13:20:57.610 UTC [15] LOG: listening on IPv4 address "0.0.0.0", port 5432 Apr 01 09:20:57 2025-04-01 13:20:57.610 UTC [15] LOG: listening on IPv6 address "::", port 5432 Apr 01 09:20:57 2025-04-01 13:20:57.711 UTC [15] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" Apr 01 09:20:57 2025-04-01 13:20:57.830 UTC [18] LOG: database system was interrupted; last known up at 2025-04-01 13:19:56 UTC Apr 01 09:20:58 2025-04-01 13:20:58.114 UTC [18] LOG: database system was not properly shut down; automatic recovery in progress Apr 01 09:20:58 2025-04-01 13:20:58.185 UTC [18] LOG: invalid record length at 0/1550CF8: expected at least 24, got 0 Apr 01 09:20:58 2025-04-01 13:20:58.185 UTC [18] LOG: redo is not required Apr 01 09:20:58 2025-04-01 13:20:58.262 UTC [16] LOG: checkpoint starting: end-of-recovery immediate wait Apr 01 09:20:58 .2025-04-01 13:20:58.539 UTC [16] LOG: checkpoint complete: wrote 3 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.052 s, sync=0.052 s, total=0.333 s; sync files=2, longest=0.033 s, average=0.026 s; distance=0 kB, estimate=0 kB; lsn=0/1550CF8, redo lsn=0/1550CF8 Apr 01 09:20:58 2025-04-01 13:20:58.595 UTC [15] LOG: database system is ready to accept connections Apr 01 09:20:58 done Apr 01 09:20:58 server started Apr 01 09:20:58 ==> Waiting for Postgres Apr 01 09:20:58 pg_ctl: server is running (PID: 15) Apr 01 09:20:58 /usr/lib/postgresql/16/bin/postgres "-D" "/var/lib/postgresql/16/main" Apr 01 09:20:58 ==> Postgres is running Apr 01 09:20:58 ==> Resetting root password Apr 01 09:20:58 2025-04-01 13:20:58.747 UTC [28] root@postgres FATAL: role "root" does not exist Apr 01 09:20:58 psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: role "root" does not exist Apr 01 09:21:59 ==> Detected existing installation Apr 01 09:21:59 ==> Copying updated config Apr 01 09:21:59 ==> Updating existing postgresql Apr 01 09:21:59 waiting for server to start....2025-04-01 13:21:59.973 GMT [15] LOG: skipping missing configuration file "/var/lib/postgresql/16/main/custom.conf" Apr 01 09:21:59 2025-04-01 13:21:59.973 GMT [15] LOG: skipping missing configuration file "/var/lib/postgresql/16/main/custom.conf" Apr 01 09:22:00 2025-04-01 13:22:00.141 UTC [15] LOG: starting PostgreSQL 16.6 (Ubuntu 16.6-0ubuntu0.24.04.1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 13.2.0-23ubuntu4) 13.2.0, 64-bit Apr 01 09:22:00 2025-04-01 13:22:00.142 UTC [15] LOG: listening on IPv4 address "0.0.0.0", port 5432 Apr 01 09:22:00 2025-04-01 13:22:00.142 UTC [15] LOG: listening on IPv6 address "::", port 5432 Apr 01 09:22:00 2025-04-01 13:22:00.239 UTC [15] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" Apr 01 09:22:00 2025-04-01 13:22:00.350 UTC [18] LOG: database system was interrupted; last known up at 2025-04-01 13:20:58 UTC Apr 01 09:22:00 2025-04-01 13:22:00.648 UTC [18] LOG: database system was not properly shut down; automatic recovery in progress Apr 01 09:22:00 2025-04-01 13:22:00.715 UTC [18] LOG: invalid record length at 0/1550D70: expected at least 24, got 0 Apr 01 09:22:00 2025-04-01 13:22:00.715 UTC [18] LOG: redo is not required Apr 01 09:22:00 2025-04-01 13:22:00.798 UTC [16] LOG: checkpoint starting: end-of-recovery immediate wait Apr 01 09:22:01 .2025-04-01 13:22:01.033 UTC [16] LOG: checkpoint complete: wrote 3 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.035 s, sync=0.052 s, total=0.283 s; sync files=2, longest=0.031 s, average=0.026 s; distance=0 kB, estimate=0 kB; lsn=0/1550D70, redo lsn=0/1550D70 Apr 01 09:22:01 2025-04-01 13:22:01.088 UTC [15] LOG: database system is ready to accept connections Apr 01 09:22:01 done Apr 01 09:22:01 server started Apr 01 09:22:01 ==> Waiting for Postgres Apr 01 09:22:01 pg_ctl: server is running (PID: 15) Apr 01 09:22:01 /usr/lib/postgresql/16/bin/postgres "-D" "/var/lib/postgresql/16/main" Apr 01 09:22:01 ==> Postgres is running Apr 01 09:22:01 ==> Resetting root password Apr 01 09:22:01 2025-04-01 13:22:01.217 UTC [28] root@postgres FATAL: role "root" does not exist Apr 01 09:22:01 psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: role "root" does not exist Apr 01 09:23:02 ==> Detected existing installation Apr 01 09:23:02 ==> Copying updated config Apr 01 09:23:02 ==> Updating existing postgresql Apr 01 09:23:02 waiting for server to start....2025-04-01 13:23:02.267 GMT [15] LOG: skipping missing configuration file "/var/lib/postgresql/16/main/custom.conf" Apr 01 09:23:02 2025-04-01 13:23:02.267 GMT [15] LOG: skipping missing configuration file "/var/lib/postgresql/16/main/custom.conf" Apr 01 09:23:02 2025-04-01 13:23:02.468 UTC [15] LOG: starting PostgreSQL 16.6 (Ubuntu 16.6-0ubuntu0.24.04.1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 13.2.0-23ubuntu4) 13.2.0, 64-bit Apr 01 09:23:02 2025-04-01 13:23:02.469 UTC [15] LOG: listening on IPv4 address "0.0.0.0", port 5432 Apr 01 09:23:02 2025-04-01 13:23:02.469 UTC [15] LOG: listening on IPv6 address "::", port 5432 Apr 01 09:23:02 2025-04-01 13:23:02.562 UTC [15] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" Apr 01 09:23:02 2025-04-01 13:23:02.669 UTC [18] LOG: database system was interrupted; last known up at 2025-04-01 13:22:01 UTC Apr 01 09:23:02 2025-04-01 13:23:02.931 UTC [18] LOG: database system was not properly shut down; automatic recovery in progress Apr 01 09:23:02 2025-04-01 13:23:02.998 UTC [18] LOG: invalid record length at 0/1550DE8: expected at least 24, got 0 Apr 01 09:23:02 2025-04-01 13:23:02.998 UTC [18] LOG: redo is not required Apr 01 09:23:03 2025-04-01 13:23:03.080 UTC [16] LOG: checkpoint starting: end-of-recovery immediate wait Apr 01 09:23:03 .2025-04-01 13:23:03.339 UTC [16] LOG: checkpoint complete: wrote 3 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.035 s, sync=0.054 s, total=0.308 s; sync files=2, longest=0.033 s, average=0.027 s; distance=0 kB, estimate=0 kB; lsn=0/1550DE8, redo lsn=0/1550DE8 Apr 01 09:23:03 2025-04-01 13:23:03.396 UTC [15] LOG: database system is ready to accept connections Apr 01 09:23:03 done Apr 01 09:23:03 server started Apr 01 09:23:03 ==> Waiting for Postgres Apr 01 09:23:03 pg_ctl: server is running (PID: 15) Apr 01 09:23:03 /usr/lib/postgresql/16/bin/postgres "-D" "/var/lib/postgresql/16/main" Apr 01 09:23:03 ==> Postgres is running Apr 01 09:23:03 ==> Resetting root password Apr 01 09:23:03 2025-04-01 13:23:03.508 UTC [28] root@postgres FATAL: role "root" does not exist Apr 01 09:23:03 psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: role "root" does not exist Apr 01 09:24:04 ==> Detected existing installation Apr 01 09:24:04 ==> Copying updated config Apr 01 09:24:04 ==> Updating existing postgresql Apr 01 09:24:04 waiting for server to start....2025-04-01 13:24:04.545 GMT [15] LOG: skipping missing configuration file "/var/lib/postgresql/16/main/custom.conf" Apr 01 09:24:04 2025-04-01 13:24:04.545 GMT [15] LOG: skipping missing configuration file "/var/lib/postgresql/16/main/custom.conf" Apr 01 09:24:04 2025-04-01 13:24:04.916 UTC [15] LOG: starting PostgreSQL 16.6 (Ubuntu 16.6-0ubuntu0.24.04.1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 13.2.0-23ubuntu4) 13.2.0, 64-bit Apr 01 09:24:04 2025-04-01 13:24:04.917 UTC [15] LOG: listening on IPv4 address "0.0.0.0", port 5432 Apr 01 09:24:04 2025-04-01 13:24:04.917 UTC [15] LOG: listening on IPv6 address "::", port 5432 Apr 01 09:24:05 2025-04-01 13:24:05.016 UTC [15] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" Apr 01 09:24:05 2025-04-01 13:24:05.143 UTC [18] LOG: database system was interrupted; last known up at 2025-04-01 13:23:03 UTC Apr 01 09:24:05 2025-04-01 13:24:05.485 UTC [18] LOG: database system was not properly shut down; automatic recovery in progress Apr 01 09:24:05 .2025-04-01 13:24:05.551 UTC [18] LOG: invalid record length at 0/1550E60: expected at least 24, got 0 Apr 01 09:24:05 2025-04-01 13:24:05.552 UTC [18] LOG: redo is not required Apr 01 09:24:05 2025-04-01 13:24:05.700 UTC [16] LOG: checkpoint starting: end-of-recovery immediate wait
-
Forum Search indicated this is a duplicate.
See:- https://forum.cloudron.io/topic/13519/cant-start-peertube-after-updateing-latest-cloudron
- https://forum.cloudron.io/topic/11276/cloudron-update-to-7-7-0-postgresql-does-not-start
Can you check if these topic help you resolve this issue?
-
Thanks for asking! Here are the logs:
Service postgresql Apr 01 09:19:55 ==> Detected existing installation Apr 01 09:19:55 ==> Copying updated config Apr 01 09:19:55 ==> Updating existing postgresql Apr 01 09:19:55 waiting for server to start....2025-04-01 13:19:55.095 GMT [15] LOG: skipping missing configuration file "/var/lib/postgresql/16/main/custom.conf" Apr 01 09:19:55 2025-04-01 13:19:55.095 GMT [15] LOG: skipping missing configuration file "/var/lib/postgresql/16/main/custom.conf" Apr 01 09:19:55 2025-04-01 13:19:55.268 UTC [15] LOG: starting PostgreSQL 16.6 (Ubuntu 16.6-0ubuntu0.24.04.1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 13.2.0-23ubuntu4) 13.2.0, 64-bit Apr 01 09:19:55 2025-04-01 13:19:55.268 UTC [15] LOG: listening on IPv4 address "0.0.0.0", port 5432 Apr 01 09:19:55 2025-04-01 13:19:55.268 UTC [15] LOG: listening on IPv6 address "::", port 5432 Apr 01 09:19:55 2025-04-01 13:19:55.370 UTC [15] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" Apr 01 09:19:55 2025-04-01 13:19:55.557 UTC [18] LOG: database system was interrupted; last known up at 2025-04-01 13:18:53 UTC Apr 01 09:19:55 2025-04-01 13:19:55.857 UTC [18] LOG: database system was not properly shut down; automatic recovery in progress Apr 01 09:19:55 2025-04-01 13:19:55.928 UTC [18] LOG: invalid record length at 0/1550C80: expected at least 24, got 0 Apr 01 09:19:55 2025-04-01 13:19:55.928 UTC [18] LOG: redo is not required Apr 01 09:19:56 2025-04-01 13:19:56.005 UTC [16] LOG: checkpoint starting: end-of-recovery immediate wait Apr 01 09:19:56 .2025-04-01 13:19:56.264 UTC [16] LOG: checkpoint complete: wrote 3 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.035 s, sync=0.055 s, total=0.316 s; sync files=2, longest=0.033 s, average=0.028 s; distance=0 kB, estimate=0 kB; lsn=0/1550C80, redo lsn=0/1550C80 Apr 01 09:19:56 2025-04-01 13:19:56.321 UTC [15] LOG: database system is ready to accept connections Apr 01 09:19:56 done Apr 01 09:19:56 server started Apr 01 09:19:56 ==> Waiting for Postgres Apr 01 09:19:56 pg_ctl: server is running (PID: 15) Apr 01 09:19:56 /usr/lib/postgresql/16/bin/postgres "-D" "/var/lib/postgresql/16/main" Apr 01 09:19:56 ==> Postgres is running Apr 01 09:19:56 ==> Resetting root password Apr 01 09:19:56 2025-04-01 13:19:56.439 UTC [28] root@postgres FATAL: role "root" does not exist Apr 01 09:19:56 psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: role "root" does not exist Apr 01 09:20:57 ==> Detected existing installation Apr 01 09:20:57 ==> Copying updated config Apr 01 09:20:57 ==> Updating existing postgresql Apr 01 09:20:57 waiting for server to start....2025-04-01 13:20:57.400 GMT [15] LOG: skipping missing configuration file "/var/lib/postgresql/16/main/custom.conf" Apr 01 09:20:57 2025-04-01 13:20:57.400 GMT [15] LOG: skipping missing configuration file "/var/lib/postgresql/16/main/custom.conf" Apr 01 09:20:57 2025-04-01 13:20:57.610 UTC [15] LOG: starting PostgreSQL 16.6 (Ubuntu 16.6-0ubuntu0.24.04.1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 13.2.0-23ubuntu4) 13.2.0, 64-bit Apr 01 09:20:57 2025-04-01 13:20:57.610 UTC [15] LOG: listening on IPv4 address "0.0.0.0", port 5432 Apr 01 09:20:57 2025-04-01 13:20:57.610 UTC [15] LOG: listening on IPv6 address "::", port 5432 Apr 01 09:20:57 2025-04-01 13:20:57.711 UTC [15] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" Apr 01 09:20:57 2025-04-01 13:20:57.830 UTC [18] LOG: database system was interrupted; last known up at 2025-04-01 13:19:56 UTC Apr 01 09:20:58 2025-04-01 13:20:58.114 UTC [18] LOG: database system was not properly shut down; automatic recovery in progress Apr 01 09:20:58 2025-04-01 13:20:58.185 UTC [18] LOG: invalid record length at 0/1550CF8: expected at least 24, got 0 Apr 01 09:20:58 2025-04-01 13:20:58.185 UTC [18] LOG: redo is not required Apr 01 09:20:58 2025-04-01 13:20:58.262 UTC [16] LOG: checkpoint starting: end-of-recovery immediate wait Apr 01 09:20:58 .2025-04-01 13:20:58.539 UTC [16] LOG: checkpoint complete: wrote 3 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.052 s, sync=0.052 s, total=0.333 s; sync files=2, longest=0.033 s, average=0.026 s; distance=0 kB, estimate=0 kB; lsn=0/1550CF8, redo lsn=0/1550CF8 Apr 01 09:20:58 2025-04-01 13:20:58.595 UTC [15] LOG: database system is ready to accept connections Apr 01 09:20:58 done Apr 01 09:20:58 server started Apr 01 09:20:58 ==> Waiting for Postgres Apr 01 09:20:58 pg_ctl: server is running (PID: 15) Apr 01 09:20:58 /usr/lib/postgresql/16/bin/postgres "-D" "/var/lib/postgresql/16/main" Apr 01 09:20:58 ==> Postgres is running Apr 01 09:20:58 ==> Resetting root password Apr 01 09:20:58 2025-04-01 13:20:58.747 UTC [28] root@postgres FATAL: role "root" does not exist Apr 01 09:20:58 psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: role "root" does not exist Apr 01 09:21:59 ==> Detected existing installation Apr 01 09:21:59 ==> Copying updated config Apr 01 09:21:59 ==> Updating existing postgresql Apr 01 09:21:59 waiting for server to start....2025-04-01 13:21:59.973 GMT [15] LOG: skipping missing configuration file "/var/lib/postgresql/16/main/custom.conf" Apr 01 09:21:59 2025-04-01 13:21:59.973 GMT [15] LOG: skipping missing configuration file "/var/lib/postgresql/16/main/custom.conf" Apr 01 09:22:00 2025-04-01 13:22:00.141 UTC [15] LOG: starting PostgreSQL 16.6 (Ubuntu 16.6-0ubuntu0.24.04.1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 13.2.0-23ubuntu4) 13.2.0, 64-bit Apr 01 09:22:00 2025-04-01 13:22:00.142 UTC [15] LOG: listening on IPv4 address "0.0.0.0", port 5432 Apr 01 09:22:00 2025-04-01 13:22:00.142 UTC [15] LOG: listening on IPv6 address "::", port 5432 Apr 01 09:22:00 2025-04-01 13:22:00.239 UTC [15] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" Apr 01 09:22:00 2025-04-01 13:22:00.350 UTC [18] LOG: database system was interrupted; last known up at 2025-04-01 13:20:58 UTC Apr 01 09:22:00 2025-04-01 13:22:00.648 UTC [18] LOG: database system was not properly shut down; automatic recovery in progress Apr 01 09:22:00 2025-04-01 13:22:00.715 UTC [18] LOG: invalid record length at 0/1550D70: expected at least 24, got 0 Apr 01 09:22:00 2025-04-01 13:22:00.715 UTC [18] LOG: redo is not required Apr 01 09:22:00 2025-04-01 13:22:00.798 UTC [16] LOG: checkpoint starting: end-of-recovery immediate wait Apr 01 09:22:01 .2025-04-01 13:22:01.033 UTC [16] LOG: checkpoint complete: wrote 3 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.035 s, sync=0.052 s, total=0.283 s; sync files=2, longest=0.031 s, average=0.026 s; distance=0 kB, estimate=0 kB; lsn=0/1550D70, redo lsn=0/1550D70 Apr 01 09:22:01 2025-04-01 13:22:01.088 UTC [15] LOG: database system is ready to accept connections Apr 01 09:22:01 done Apr 01 09:22:01 server started Apr 01 09:22:01 ==> Waiting for Postgres Apr 01 09:22:01 pg_ctl: server is running (PID: 15) Apr 01 09:22:01 /usr/lib/postgresql/16/bin/postgres "-D" "/var/lib/postgresql/16/main" Apr 01 09:22:01 ==> Postgres is running Apr 01 09:22:01 ==> Resetting root password Apr 01 09:22:01 2025-04-01 13:22:01.217 UTC [28] root@postgres FATAL: role "root" does not exist Apr 01 09:22:01 psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: role "root" does not exist Apr 01 09:23:02 ==> Detected existing installation Apr 01 09:23:02 ==> Copying updated config Apr 01 09:23:02 ==> Updating existing postgresql Apr 01 09:23:02 waiting for server to start....2025-04-01 13:23:02.267 GMT [15] LOG: skipping missing configuration file "/var/lib/postgresql/16/main/custom.conf" Apr 01 09:23:02 2025-04-01 13:23:02.267 GMT [15] LOG: skipping missing configuration file "/var/lib/postgresql/16/main/custom.conf" Apr 01 09:23:02 2025-04-01 13:23:02.468 UTC [15] LOG: starting PostgreSQL 16.6 (Ubuntu 16.6-0ubuntu0.24.04.1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 13.2.0-23ubuntu4) 13.2.0, 64-bit Apr 01 09:23:02 2025-04-01 13:23:02.469 UTC [15] LOG: listening on IPv4 address "0.0.0.0", port 5432 Apr 01 09:23:02 2025-04-01 13:23:02.469 UTC [15] LOG: listening on IPv6 address "::", port 5432 Apr 01 09:23:02 2025-04-01 13:23:02.562 UTC [15] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" Apr 01 09:23:02 2025-04-01 13:23:02.669 UTC [18] LOG: database system was interrupted; last known up at 2025-04-01 13:22:01 UTC Apr 01 09:23:02 2025-04-01 13:23:02.931 UTC [18] LOG: database system was not properly shut down; automatic recovery in progress Apr 01 09:23:02 2025-04-01 13:23:02.998 UTC [18] LOG: invalid record length at 0/1550DE8: expected at least 24, got 0 Apr 01 09:23:02 2025-04-01 13:23:02.998 UTC [18] LOG: redo is not required Apr 01 09:23:03 2025-04-01 13:23:03.080 UTC [16] LOG: checkpoint starting: end-of-recovery immediate wait Apr 01 09:23:03 .2025-04-01 13:23:03.339 UTC [16] LOG: checkpoint complete: wrote 3 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.035 s, sync=0.054 s, total=0.308 s; sync files=2, longest=0.033 s, average=0.027 s; distance=0 kB, estimate=0 kB; lsn=0/1550DE8, redo lsn=0/1550DE8 Apr 01 09:23:03 2025-04-01 13:23:03.396 UTC [15] LOG: database system is ready to accept connections Apr 01 09:23:03 done Apr 01 09:23:03 server started Apr 01 09:23:03 ==> Waiting for Postgres Apr 01 09:23:03 pg_ctl: server is running (PID: 15) Apr 01 09:23:03 /usr/lib/postgresql/16/bin/postgres "-D" "/var/lib/postgresql/16/main" Apr 01 09:23:03 ==> Postgres is running Apr 01 09:23:03 ==> Resetting root password Apr 01 09:23:03 2025-04-01 13:23:03.508 UTC [28] root@postgres FATAL: role "root" does not exist Apr 01 09:23:03 psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: role "root" does not exist Apr 01 09:24:04 ==> Detected existing installation Apr 01 09:24:04 ==> Copying updated config Apr 01 09:24:04 ==> Updating existing postgresql Apr 01 09:24:04 waiting for server to start....2025-04-01 13:24:04.545 GMT [15] LOG: skipping missing configuration file "/var/lib/postgresql/16/main/custom.conf" Apr 01 09:24:04 2025-04-01 13:24:04.545 GMT [15] LOG: skipping missing configuration file "/var/lib/postgresql/16/main/custom.conf" Apr 01 09:24:04 2025-04-01 13:24:04.916 UTC [15] LOG: starting PostgreSQL 16.6 (Ubuntu 16.6-0ubuntu0.24.04.1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 13.2.0-23ubuntu4) 13.2.0, 64-bit Apr 01 09:24:04 2025-04-01 13:24:04.917 UTC [15] LOG: listening on IPv4 address "0.0.0.0", port 5432 Apr 01 09:24:04 2025-04-01 13:24:04.917 UTC [15] LOG: listening on IPv6 address "::", port 5432 Apr 01 09:24:05 2025-04-01 13:24:05.016 UTC [15] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" Apr 01 09:24:05 2025-04-01 13:24:05.143 UTC [18] LOG: database system was interrupted; last known up at 2025-04-01 13:23:03 UTC Apr 01 09:24:05 2025-04-01 13:24:05.485 UTC [18] LOG: database system was not properly shut down; automatic recovery in progress Apr 01 09:24:05 .2025-04-01 13:24:05.551 UTC [18] LOG: invalid record length at 0/1550E60: expected at least 24, got 0 Apr 01 09:24:05 2025-04-01 13:24:05.552 UTC [18] LOG: redo is not required Apr 01 09:24:05 2025-04-01 13:24:05.700 UTC [16] LOG: checkpoint starting: end-of-recovery immediate wait
@svigneau said in After Cloudron upgrade to v8.3.1, postgresql fails to start with message 'root@postgres FATAL: role "root" does not exist':
Apr 01 09:24:05 2025-04-01 13:24:05.143 UTC [18] LOG: database system was interrupted; last known up at 2025-04-01 13:23:03 UTC
Apr 01 09:24:05 2025-04-01 13:24:05.485 UTC [18] LOG: database system was not properly shut down; automatic recovery in progress
Apr 01 09:24:05 .2025-04-01 13:24:05.551 UTC [18] LOG: invalid record length at 0/1550E60: expected at least 24, got 0The database is corrupt . You have to recreate the postgresql addon. See https://docs.cloudron.io/services/#corrupt-addon on how to rebuild it.
-
-
Thanks! I went through the steps to recreate the postgresql addon, then on the dashboard to restore individual apps from backup. However, I received the following error:
Locked by task 19848: pending_restart/running
. Do you have any suggestions on how to remove the lock? -
Thanks! I went through the steps to recreate the postgresql addon, then on the dashboard to restore individual apps from backup. However, I received the following error:
Locked by task 19848: pending_restart/running
. Do you have any suggestions on how to remove the lock? -
Thanks, @joseph! However,
systemctl restart box
didn't fix the lock. All non-working apps are still stuck with the messageRestarting - Waiting for platform to initialize
in the GUI, and I still get the same message,Locked by task 19848: pending_restart/running
, when trying to restore from a backup. -
Thanks, @joseph! However,
systemctl restart box
didn't fix the lock. All non-working apps are still stuck with the messageRestarting - Waiting for platform to initialize
in the GUI, and I still get the same message,Locked by task 19848: pending_restart/running
, when trying to restore from a backup. -
@joseph Here are some excerpts from the log around the time I noticed the problem ("XXXXX" were manually added):
025-03-31T14:41:08.552Z box:server ========================================== 2025-03-31T14:41:08.553Z box:server Cloudron 8.3.1 2025-03-31T14:41:08.553Z box:server ========================================== 2025-03-31T14:41:08.554Z box:platform initialize: start platform 2025-03-31T14:41:08.889Z box:tasks stopAllTasks: stopping all tasks 2025-03-31T14:41:08.889Z box:shell tasks /usr/bin/sudo -S /home/yellowtent/box/src/scripts/stoptask.sh all 2025-03-31T14:41:09.138Z box:shell All tasks stopped 2025-03-31T14:41:09.443Z box:locks releaseAll: all locks released 2025-03-31T14:41:09.486Z box:reverseproxy writeDashboardConfig: writing dashboard config for sebastienvigneau.xyz 2025-03-31T14:41:09.645Z box:shell reverseproxy: openssl x509 -in /home/yellowtent/platformdata/nginx/cert/my.sebastienvigneau.xyz.cert -noout -ocsp_uri 2025-03-31T14:41:09.757Z box:shell reverseproxy /usr/bin/sudo -S /home/yellowtent/box/src/scripts/restartservice.sh nginx 2025-03-31T14:41:12.464Z box:platform onActivated: starting post activation services 2025-03-31T14:41:12.464Z box:platform startInfra: checking infrastructure 2025-03-31T14:41:12.569Z box:platform startInfra: updating infrastructure from 49.8.0 to 49.8.0 2025-03-31T14:41:12.570Z box:platform markApps: changedAddons: ["mysql","postgresql","mongodb","redis"] 2025-03-31T14:41:12.736Z box:services startServices: existing infra. incremental service create ["start","startTurn","startMysql","startPostgresql","startMongodb","startRedis","startGraphite","start"] 2025-03-31T14:41:12.736Z box:mailserver startMail: starting 2025-03-31T14:41:12.739Z box:mailserver restart: restarting mail container with mailFqdn:my.sebastienvigneau.xyz mailDomain:sebastienvigneau.xyz 2025-03-31T14:41:12.882Z box:locks write: current locks: {"mail_restart":null} 2025-03-31T14:41:12.882Z box:locks acquire: mail_restart 2025-03-31T14:41:13.100Z box:mailserver configureMail: stopping and deleting previous mail container 2025-03-31T14:42:42.033Z box:mailserver createMailConfig: generating mail config with my.sebastienvigneau.xyz 2025-03-31T14:42:42.068Z box:mailserver configureMail: starting mail container 2025-03-31T14:42:42.068Z box:shell mailserver: /bin/bash -c docker run --restart=always -d --name=mail --net cloudron --net-alias mail --log-driver syslog --log-opt syslog-address=unix:///home/yellowtent/platformdata/logs/syslog.sock --log-opt syslog-format=rfc5424 --log-opt tag=mail -m 536870912 --memory-swap -1 --dns 172.18.0.1 --dns-search=. --ip 172.18.30.4 -e CLOUDRON_MAIL_TOKEN=XXXXX -e CLOUDRON_RELAY_TOKEN=XXXXX -e LOGLEVEL=info -v /home/yellowtent/boxdata/mail:/app/data -v /home/yellowtent/platformdata/addons/mail:/etc/mail:ro -p 587:2587 -p 993:9993 -p 4190:4190 -p 25:2587 -p 465:2465 -p 995:9995 --label isCloudronManaged=true --read-only -v /run -v /tmp registry.docker.com/cloudron/mail:3.15.0@sha256:c93b5a83fc4e775bda4e05010bd19e5a658936e7a09cf7e51281e3696fde4536 2025-03-31T14:43:33.399Z box:locks write: current locks: {} 2025-03-31T14:43:33.399Z box:locks release: mail_restart 2025-03-31T14:43:33.399Z box:docker deleteImage: removing registry.docker.com/cloudron/mail:3.14.9@sha256:c51a2ee20b2087e208084a9115cc6a525e3b3b227b52d8cfdac2d98a6409672e 2025-03-31T14:43:33.405Z box:services startTurn: stopping and deleting previous turn container 2025-03-31T14:44:04.243Z box:services startTurn: starting turn container 2025-03-31T14:44:04.243Z box:shell services: /bin/bash -c docker run --restart=always -d --name=turn --hostname turn --net host --log-driver syslog --log-opt syslog-address=unix:///home/yellowtent/platformdata/logs/syslog.sock --log-opt syslog-format=rfc5424 --log-opt tag=turn -m 268435456 --memory-swap -1 -e CLOUDRON_TURN_SECRET=XXXXX -e CLOUDRON_REALM=my.sebastienvigneau.xyz --label isCloudronManaged=true --read-only -v /tmp -v /run registry.docker.com/cloudron/turn:1.8.0@sha256:cdbe83c3c83b8f25de3a5814b121eb941b457dca7127d2e6ff446c7a0cfa1570 2025-03-31T14:44:15.397Z box:docker deleteImage: removing registry.docker.com/cloudron/turn:1.7.2@sha256:9ed8da613c1edc5cb8700657cf6e49f0f285b446222a8f459f80919945352f6d 2025-03-31T14:44:15.400Z box:services startMysql: stopping and deleting previous mysql container 2025-03-31T14:44:29.585Z box:services startMysql: starting mysql container 2025-03-31T14:44:29.585Z box:shell services: /bin/bash -c docker run --restart=always -d --name=mysql --hostname mysql --net cloudron --net-alias mysql --log-driver syslog --log-opt syslog-address=unix:///home/yellowtent/platformdata/logs/syslog.sock --log-opt syslog-format=rfc5424 --log-opt tag=mysql --ip 172.18.30.1 -e CLOUDRON_MYSQL_TOKEN=XXXXX -e CLOUDRON_MYSQL_ROOT_HOST=172.18.0.1 -e CLOUDRON_MYSQL_ROOT_PASSWORD=XXXXX -v /home/yellowtent/platformdata/mysql:/var/lib/mysql --label isCloudronManaged=true --cap-add SYS_NICE --read-only -v /tmp -v /run registry.docker.com/cloudron/mysql:3.5.0@sha256:969ea5b2f91861940ca6309c7676c52e479d2a864ba3aabd08a4266799707280 2025-03-31T14:44:36.436Z box:services Waiting for mysql 2025-03-31T14:44:36.442Z box:services Attempt 1 failed. Will retry: Network error waiting for mysql: connect ECONNREFUSED 172.18.30.1:3000 2025-03-31T14:44:51.455Z box:services Attempt 2 failed. Will retry: Network error waiting for mysql: connect ECONNREFUSED 172.18.30.1:3000 2025-03-31T14:45:06.732Z box:services Attempt 3 failed. Will retry: Error waiting for mysql. Status code: 200 message: connect ECONNREFUSED 127.0.0.1:3306 2025-03-31T14:45:22.063Z box:docker deleteImage: removing registry.docker.com/cloudron/mysql:3.4.3@sha256:8934c5ddcd69f24740d9a38f0de2937e47240238f3b8f5c482862eeccc5a21d2 2025-03-31T14:45:26.965Z box:services startPostgresql: postgresql will be upgraded 2025-03-31T14:45:26.965Z box:services exportDatabase: Exporting postgresql 2025-03-31T14:45:26.972Z box:services exportDatabase: Exporting addon postgresql of app 1bd225ff-a0e5-4f80-866f-99bd40115530 2025-03-31T14:45:26.973Z box:services Backing up postgresql 2025-03-31T14:45:26.976Z box:services exportDatabase: Error exporting postgresql of app 1bd225ff-a0e5-4f80-866f-99bd40115530. BoxError: Could not pipe http://172.18.30.2:3000/databases/db1bd225ffa0e54f80866f99bd40115530/backup?access_token=XXXXX to /home/yellowtent/appsdata/1bd225ff-a0e5-4f80-866f-99bd40115530/postgresqldump: connect ECONNREFUSED 172.18.30.2:3000 at ClientRequest.<anonymous> (/home/yellowtent/box/src/services.js:1350:47) at ClientRequest.emit (node:events:519:28) at emitErrorEvent (node:_http_client:101:11) at Socket.socketErrorListener (node:_http_client:504:5) at Socket.emit (node:events:519:28) at emitErrorNT (node:internal/streams/destroy:169:8) at emitErrorCloseNT (node:internal/streams/destroy:128:3) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) { reason: 'Network Error', details: {} } 2025-03-31T14:45:26.976Z box:platform startInfra: Failed to start services. retry=false (attempt 0): Could not pipe http://172.18.30.2:3000/databases/db1bd225ffa0e54f80866f99bd40115530/backup?access_token=XXXXX to /home/yellowtent/appsdata/1bd225ff-a0e5-4f80-866f-99bd40115530/postgresqldump: connect ECONNREFUSED 172.18.30.2:3000 2025-03-31T14:45:26.976Z box:platform BoxError: Could not pipe http://172.18.30.2:3000/databases/db1bd225ffa0e54f80866f99bd40115530/backup?access_token=XXXXX to /home/yellowtent/appsdata/1bd225ff-a0e5-4f80-866f-99bd40115530/postgresqldump: connect ECONNREFUSED 172.18.30.2:3000 at ClientRequest.<anonymous> (/home/yellowtent/box/src/services.js:1350:47) at ClientRequest.emit (node:events:519:28) at emitErrorEvent (node:_http_client:101:11) at Socket.socketErrorListener (node:_http_client:504:5) at Socket.emit (node:events:519:28) at emitErrorNT (node:internal/streams/destroy:169:8) at emitErrorCloseNT (node:internal/streams/destroy:128:3) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) 2025-03-31T18:15:19.191Z box:shell system: swapon --noheadings --raw --bytes --show=type,size,used,name 2025-03-31T18:15:19.505Z box:shell services: grep -q avx /proc/cpuinfo 2025-03-31T18:15:19.608Z box:shell services: systemctl is-active nginx 2025-03-31T18:15:19.610Z box:shell services: systemctl is-active unbound 2025-03-31T18:16:37.596Z box:shell system: swapon --noheadings --raw --bytes --show=type,size,used,name 2025-03-31T18:16:40.619Z box:shell system /usr/bin/sudo -S /home/yellowtent/box/src/scripts/reboot.sh 2025-03-31T18:16:40.968Z box:box Received SIGTERM. Shutting down. 2025-03-31T18:16:40.969Z box:platform uninitializing platform 2025-03-31T18:16:40.969Z box:shell system: /usr/bin/sudo -S /home/yellowtent/box/src/scripts/reboot.sh errored BoxError: system exited with code null signal SIGTERM at ChildProcess.<anonymous> (/home/yellowtent/box/src/shell.js:137:19) at ChildProcess.emit (node:events:519:28) at ChildProcess.emit (node:domain:488:12) at ChildProcess._handle.onexit (node:internal/child_process:294:12) { reason: 'Shell Error', details: {}, code: null, signal: 'SIGTERM' } 2025-03-31T18:16:40.970Z box:system reboot: could not reboot. BoxError: system exited with code null signal SIGTERM at ChildProcess.<anonymous> (/home/yellowtent/box/src/shell.js:137:19) at ChildProcess.emit (node:events:519:28) at ChildProcess.emit (node:domain:488:12) at ChildProcess._handle.onexit (node:internal/child_process:294:12) { reason: 'Shell Error', details: {}, code: null, signal: 'SIGTERM' } 2025-03-31T18:16:40.977Z box:platform onDeactivated: stopping post activation services 2025-03-31T18:16:40.977Z box:tasks stopAllTasks: stopping all tasks 2025-03-31T18:16:40.978Z box:shell tasks /usr/bin/sudo -S /home/yellowtent/box/src/scripts/stoptask.sh all 2025-03-31T18:16:41.456Z box:shell All tasks stopped
Anyway, I ended up running
cloudron-support --recreate-docker
, which made the apps functional again, and I am now restoring them from the backup one by one.