Added by Philipp Schulz about 2 years ago
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
Replies (4)
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 configureand 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.datfile (removed personal data):smtp/autoinstall smtp
smtp/authentication login
smtp/host
xxxsmtp/port 587
smtp/username
xxxsmtp/password
xxxsmtp/domain
xxxsmtp/admin_email
xxxpostgres/addon_version v1
server/autoinstall install
server/hostname localhost
server/server_path_prefix /openproject
server/ssl no
repositories/api-key
xxxrepositories/svn-install install
repositories/svn-path /var/db/openproject/svn
repositories/apache-wrapper-token
xxxrepositories/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
xxxpostgres/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.conffor any appearance ofscram-sha-256and replace withmd5Check
/var/lib/pgsql/13/data/postgresql.conffor any appearance ofscram-sha-256and replace withmd5(search forencryption)Reload Configuration of PostgreSQL server with
systemctl reload postgresql-13"Note: in my installation, it was
/etc/postgresql/14/main/pg_hba.confHTH!