Content
openproject upgrade fails with error password authentication failed for user "openproject"
Added by Chris Sabian 10 months ago
Hello Community,
i try to upgrade our OpenProject 11 Installation from postgres 9.5 to postgres 14. (So i can upgrade Openproject to the current rls)
It is a normal installation, no docker or bitnami.
It is running on an Ubuntu x64 wich i just upgraded from 20.04 to 22.04 .
postgres 14 is also already installed.
i followed the guide from here :
https://www.openproject.org/docs/installation-and-operations/misc/migration-to-postgresql13/
i stopped instance V14 :
openproject:~$ sudo su - postgres -c "/usr/lib/postgresql/14/bin/pg_ctl stop --wait --pgdata=/var/lib/postgresql/14/main"
waiting for server to shut down.... done
server stopped
after that i started DB Migration:
openproject:~$ sudo su - postgres <<CMD
/usr/lib/postgresql/14/bin/pg_upgrade \
--old-bindir=/usr/lib/postgresql/9.5/bin \
--new-bindir=/usr/lib/postgresql/14/bin \
--old-datadir=/var/lib/postgresql/9.5/main \
--new-datadir=/var/lib/postgresql/14/main \
--old-options '-c config_file=/etc/postgresql/9.5/main/postgresql.conf' \
--new-options '-c config_file=/etc/postgresql/14/main/postgresql.conf'
CMD
Performing Consistency Checks
-----------------------------
Checking cluster versions ok
Checking database user is the install user ok
Checking database connection settings ok
Checking for prepared transactions ok
Checking for system-defined composite types in user tables ok
Checking for reg* data types in user tables ok
Checking for contrib/isn with bigint-passing mismatch ok
Checking for removed "abstime" data type in user tables ok
Checking for removed "reltime" data type in user tables ok
Checking for removed "tinterval" data type in user tables ok
Checking for user-defined encoding conversions ok
Checking for user-defined postfix operators ok
Checking for incompatible polymorphic functions ok
Checking for tables WITH OIDS ok
Checking for invalid "sql_identifier" user columns ok
Creating dump of global objects ok
Creating dump of database schemas
ok
Checking for presence of required libraries ok
Checking database user is the install user ok
Checking for prepared transactions ok
Checking for new cluster tablespace directories ok
If pg_upgrade fails after this point, you must re-initdb the
new cluster before continuing.
Performing Upgrade
------------------
Analyzing all rows in the new cluster ok
Freezing all rows in the new cluster ok
Deleting files from new pg_xact ok
Copying old pg_xact to new server ok
Setting oldest XID for new cluster ok
Setting next transaction ID and epoch for new cluster ok
Deleting files from new pg_multixact/offsets ok
Copying old pg_multixact/offsets to new server ok
Deleting files from new pg_multixact/members ok
Copying old pg_multixact/members to new server ok
Setting next multixact ID and offset for new cluster ok
Resetting WAL archives ok
Setting frozenxid and minmxid counters in new cluster ok
Restoring global objects in the new cluster ok
Restoring database schemas in the new cluster
ok
Copying user relation files
ok
Setting next OID for new cluster ok
Sync data directory to disk ok
Creating script to delete old cluster ok
Checking for extension updates ok
Upgrade Complete
----------------
Optimizer statistics are not transferred by pg_upgrade.
Once you start the new server, consider running:
/usr/lib/postgresql/14/bin/vacuumdb --all --analyze-in-stages
Ok, that was sucessful.
After that i changed the DB Port for Instance v14 to the port of the old v9.5 (5432) Instance in /etc/postgresql/14/main/postgresql.conf and did shoot down the old v9.5.
Now i restarted the Postgres Instance V14 so now its running on the old 9.5 Port
But now if i try to issue the command :
sudo openproject configure
it ends up with a connection error :
....snip
Module filter already enabled
Site openproject already enabled
Syntax OK
[repositories] ./bin/postinstall
No repositories have been configured. Skipping configuration.
[smtp] ./bin/postinstall
[memcached] ./bin/postinstall
[openproject] ./bin/postinstall
Server prefix is set. Need to recompile rails assets. Setting RECOMPILE_RAILS_ASSETS=true
E, [2024-02-13T15:13:35.170622 #33432] ERROR -- : Database connection could not be established: connection to server at "localhost" (127.0.0.1), port 5432 failed: FATAL: password authentication failed for user "openproject"
connection to server at "localhost" (127.0.0.1), port 5432 failed: FATAL: password authentication failed for user "openproject"
. Falling back to NullDB.
Database connection failed with error: connection to server at "localhost" (127.0.0.1), port 5432 failed: FATAL: password authentication failed for user "openproject"
connection to server at "localhost" (127.0.0.1), port 5432 failed: FATAL: password authentication failed for user "openproject"
Webrowser shows this:
Internal error
An error occurred on the page you were trying to access.
If you continue to experience problems please contact your OpenProject administrator for assistance.
If you are the OpenProject administrator, check your log files for details about the error.
Back
so what could be the reason for this ?
I don't have any password for postgres sql user "openproject". - Can i reset it?
Where can i put the postgres credentials for the openproject V14 Instance?
On the Ubuntu 22.04 i got root privileges.
help would be greatly appreciated :-)
greets Chris