Content
You are here:
password authentication failed for user "openproject" when migrating between two sameDebian 12 OS.
Added by Jeff Li about 1 year ago
Hi,
When I migrating my packaged OpenProject installation (master on Windows Hyper-V virtual system Debian 12) to another environment (direct copy slave on Windows Hyper-V virtual system Debian 12):
Here is my steps:
openproject config:get DATABASE_URL on master: postgres://openproject:uCpl9lFVpYj07j8OAaddQm5KEUTXSLYQ@127.0.0.1:45432/openproject
openproject config:get DATABASE_URL on slave: postgres://openproject:WwjMpsjVnWGMWB88AjVvq2GhQAiWYEsS@127.0.0.1:45432/openproject
upload four archive files from master backup to slave backup:
attachments-20231022112754.tar.gz
conf-20231022112754.tar.gz
postgresql-dump-20231022112754.pgdump
svn-repositories-20231022112754.tar.gz
run restore commands for 3 kind of archives:
tar xzf /var/db/openproject/backup/attachments*.tar.gz -C /var/db/openproject/files
tar xzf /var/db/openproject/backup/conf*.tar.gz -C /etc/openproject
tar xzf /var/db/openproject/backup/svn-repositories*.tar.gz -C /var/db/openproject/svn
modify configure files because password for two PostgreSQL account "openproject" is different:
/etc/openproject/installer.dat:
postgres/db_password uCpl9lFVpYj07j8OAaddQm5KEUTXSLYQ --(to)--> postgres/db_password WwjMpsjVnWGMWB88AjVvq2GhQAiWYEsS
/etc/openproject/conf.d/00_addon_postgres:
export DATABASE_URL="postgres://openproject:uCpl9lFVpYj07j8OAaddQm5KEUTXSLYQ@127.0.0.1:45432/openproject" --(to)-->
export DATABASE_URL="postgres://openproject:WwjMpsjVnWGMWB88AjVvq2GhQAiWYEsS@127.0.0.1:45432/openproject"
then run database restore command:
pg_restore --clean --if-exists --dbname $(openproject config:get DATABASE_URL) postgresql-dump-20231022112754.pgdump
openproject configure
But I get an error message, what can I do to fix this problem:
Launching installer for openproject...
chown: warning: '.' should be ':': ‘openproject.openproject’
chown: warning: '.' should be ':': ‘openproject.openproject’
chown: warning: '.' should be ':': ‘openproject.openproject’
Selected addons: legacy-installer openproject-edition postgres apache2 repositories memcached openproject
[legacy-installer] ./bin/configure
[openproject-edition] ./bin/configure
DONE
[postgres] ./bin/configure
Postgres connection OK
DONE
[apache2] ./bin/configure
DONE
[repositories] ./bin/configure
DONE
[memcached] ./bin/configure
DONE
[openproject] ./bin/configure
DONE
[legacy-installer] ./bin/preinstall
[openproject-edition] ./bin/preinstall
[postgres] ./bin/preinstall
INFO: autoinstall=install. A new PostgreSQL v13 server will be installed locally unless a conflicting installation is found.
INFO: existing installation found. Skipping to next step.
INFO: Checking connection to PostgreSQL server... psql: error: connection to server at "127.0.0.1", port 45432 failed: FATAL: password authentication failed for user "openproject"
connection to server at "127.0.0.1", port 45432 failed: FATAL: password authentication failed for user "openproject"
KO
ERROR: Connection KO. Aborting postgres installation. You should check the wizard configuration in /etc/openproject/installer.dat
It will be OK if I only run database restore command first (before attachment/conf/svn restore), but attachment/conf/svn restore is always necessery for me, I need help for migrating between 2 environment:
pg_restore --clean --if-exists --dbname $(openproject config:get DATABASE_URL) postgresql-dump-20231022112754.pgdump
openproject configure
Replies (1)
Hi,
I have a successful migration between two machines, you can have a reference in these top: