Top Menu

Jump to content
Home
    Modules
      • Projects
      • Activity
      • Work packages
      • Gantt charts
      • Calendars
      • Team planners
      • Boards
      • News
    • Getting started
    • Introduction video
      Welcome to OpenProject Community
      Get a quick overview of project management and team collaboration with OpenProject. You can restart this video from the help menu.

    • Help and support
    • Upgrade to Enterprise edition
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Enterprise support

    • Additional resources
    • Data privacy and security policy
    • Digital accessibility (DE)
    • OpenProject website
    • Security alerts / Newsletter
    • OpenProject blog
    • Release notes
    • Report a bug
    • Development roadmap
    • Add and edit translations
    • API documentation
  • Sign in
      Forgot your password?

      or sign in with your existing account

      Google

Side Menu

  • Overview
  • Activity
    Activity
  • Roadmap
  • Work packages
    Work packages
  • Gantt charts
    Gantt charts
  • Calendars
    Calendars
  • Team planners
    Team planners
  • Boards
    Boards
  • News
  • Forums

Content

Support Installation & Updates
  1. OpenProject
  2. Forums
  3. Support Installation & Updates
  4. Postgres migration from V10 to V14: cannot access db anymore

Postgres migration from V10 to V14: cannot access db anymore

Added by Philipp Schulz over 1 year 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)

RE: Postgres migration from V10 to V14: cannot access db anymore - Added by Alex Naylor over 1 year ago

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.

RE: Postgres migration from V10 to V14: cannot access db anymore - Added by Alex Naylor over 1 year ago

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

RE: RE: Postgres migration from V10 to V14: cannot access db anymore - Added by Jeremy Drahos 12 months ago

Same scenario for me.  Did you have any luck figuring it out?

RE: RE: Postgres migration from V10 to V14: cannot access db anymore - Added by Jeremy Drahos 12 months ago

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!

  • (1 - 4/4)
Loading...