Content
Postgres migration from V10 to V14: cannot access db anymore
Hey all,
after procrastinating way too long with my postgres migration to a newer version, I finally got around to do it.
At least that was the plan, but after updating from V10 to V14 in Ubuntu 22.04.03 LTS according to the instructions in the documentation, I receive an error along the lines of:
"psql: error: connection to server at "localhost" (::1), port xxxx failed: FATAL: password authentication failed for user "Userxxx"
connection to server at "localhost" (::1), port xxxx failed: FATAL: password authentication failed for user "Userxxx""
Note: I wanted to upgrade directly to postgres V14, because the V13 package was not suggested/available via apt install by default.
I get an authentication error when using the command psql $(openproject config:get DATABASE_URL) in postgres V14, but when I roll back to a snapshot before the migration and execute the exact same command in postgres V10, I log into postgres without a problem. This is also the reason why OpenProject stops working during startup and why I am actually posting here.
One thing to note might be that my OpenProject installation is a bit older and I might not have configured a password during the initial setup. I can't remember since it has been several years and I didn't note it down.
Does anyone have an idea how I can solve this issue?
Thanks in advance and best regards,
Philipp
I'm running into a similar issue, but I'm running V13. I originally got it working back in late 2022 and it's been running fine until early last week. Now I'm getting the same error as you when I run openproject configure and it's preventing me from upgrading OpenProject. It also looks like OpenProject is now inaccessible from the web. Any help on this would be appreciated.
Here are the contents of my installer.dat file (removed personal data):
smtp/autoinstall smtp
smtp/authentication login
smtp/host xxx
smtp/port 587
smtp/username xxx
smtp/password xxx
smtp/domain xxx
smtp/admin_email xxx
postgres/addon_version v1
server/autoinstall install
server/hostname localhost
server/server_path_prefix /openproject
server/ssl no
repositories/api-key xxx
repositories/svn-install install
repositories/svn-path /var/db/openproject/svn
repositories/apache-wrapper-token xxx
repositories/git-install install
repositories/git-path /var/db/openproject/git
repositories/git-http-backend /usr/lib/git-core/git-http-backend/
memcached/autoinstall install
server/variant apache2
openproject/edition default
postgres/autoinstall reuse
postgres/db_host 127.0.0.1
postgres/db_port 45432
postgres/db_username openproject
postgres/db_password xxx
postgres/db_name openproject
postgres/retry abort
Same scenario for me. Did you have any luck figuring it out?
I had skipped the troubleshooting suggestion on the upgrade page about replacing scram-sha-256 with md5 in pg_hba.conf because mine wasn't the same error, but I gave it a shot and it worked.
"Check /var/lib/pgsql/13/data/pg_hba.conf for any appearance of scram-sha-256 and replace with md5
Check /var/lib/pgsql/13/data/postgresql.conf for any appearance of scram-sha-256 and replace with md5 (search for encryption)
Reload Configuration of PostgreSQL server with systemctl reload postgresql-13"
Note: in my installation, it was /etc/postgresql/14/main/pg_hba.conf
HTH!