Try the fastest and simplest way to install ONLYOFFICE

psql authentication failed during installation

Issues during installation and related to database

psql authentication failed during installation

Postby sophie_jane » Sun Jul 16, 2017 2:24 am

i had to re-install onlyoffice-documentserver due to an issue, and now it won't install:

Code: Select all
psql: FATAL:  password authentication failed for user "onlyoffice"
FATAL:  password authentication failed for user "onlyoffice"
psql: FATAL:  password authentication failed for user "onlyoffice"
FATAL:  password authentication failed for user "onlyoffice"


The Postgres user onlyoffice still exists, I can login to psql using the password 'onlyoffice'. I tried re-granting access to the db, but I'm still getting that error. Why would I be able to login but onlyoffice cannot? Postgres is running on the same server as onlyoffice-documentserver. I'm not sure what to do at this point. I even tried removing my onlyoffice database, dropping the onlyoffice user, and re-creating each. I still get the authentication error. 'onlyoffice' is the password that is used to login with the onlyoffice user, correct?
Last edited by sophie_jane on Mon Jul 31, 2017 11:07 am, edited 2 times in total.
sophie_jane
 
Posts: 16
Joined: Mon May 29, 2017 2:57 pm

Re: psql authentication failed during installation

Postby Maxim » Tue Jul 18, 2017 8:06 am

Hello sophie_jane!
Try
Code: Select all
sudo apt purge onlyoffice-documentserver
Maxim
 
Posts: 1179
Joined: Tue Oct 11, 2016 2:34 pm

Re: psql authentication failed during installation

Postby sophie_jane » Wed Jul 19, 2017 11:15 am

I get the same error when trying to purge. I'll have to comment out the portion of the post-installation script that tries to connect to the database. I suspect I'm going to have to purge postgres too, if it gives me the same error during re-installation.
sophie_jane
 
Posts: 16
Joined: Mon May 29, 2017 2:57 pm

Re: psql authentication failed during installation

Postby sophie_jane » Fri Jul 21, 2017 10:37 am

I was able to purge onlyoffice-documentserver by commenting out the postgres-related functions in the onlyoffice-documentserver.postinst script. Then I had to manually drop the onlyoffice database and user. Upon reinstalling, I'm running into the same issue, postgres won't allow onlyoffice to authenticate with onlyoffice / onlyoffice. I confirmed there is a user onlyoffice with the password onlyoffice, who has privileges to modify the db onlyoffice. I can login to psql with the user onlyoffice, using the password onlyoffice. I don't understand this at all.
sophie_jane
 
Posts: 16
Joined: Mon May 29, 2017 2:57 pm

Re: psql authentication failed during installation

Postby sophie_jane » Tue Jul 25, 2017 10:44 pm

i found that the issue was onlyoffice-documentserver was authenticating with the wrong password. I have no clue how another password was set, but I was able to change it by following one of the posts here: viewtopic.php?f=4&t=8783
In particular, execute the following commands:
Code: Select all
sudo DEBCONF_DEBUG=developer dpkg --configure onlyoffice-documentserver


That command will show you the current configuration, including Postgresql credentials. To reset username and/or password, execute:

Code: Select all
echo RESET onlyoffice/db-user | sudo debconf-communicate onlyoffice-documentserver

Code: Select all
echo RESET onlyoffice/db-pwd | sudo debconf-communicate onlyoffice-documentserver


Finally, execute:
Code: Select all
sudo dpkg --configure onlyoffice-documentserver


For whatever reason, I still ran into unspecified issues (nodeJS was producing authentication errors but I couldn't determine what it was trying to authenticate against). So, I purged the install yet again and re-installed yet again. This time I was prompted to supply my Postgresql password. Documents now load once again, despite the fact that Onlyoffice claims there was errors during installation when I visit mydomain.com.

Since I end up having to re-install every time the package is upgraded, I've put upgrades of onlyoffice-documentserver on hold for now, by running:
Code: Select all
sudo apt-mark hold onlyoffice-documentserver
sophie_jane
 
Posts: 16
Joined: Mon May 29, 2017 2:57 pm

Re: psql authentication failed during installation [SOLVED]

Postby Maxim » Wed Jul 26, 2017 6:41 am

Hello sophie_jane!
Does it work correctly now?
Maxim
 
Posts: 1179
Joined: Tue Oct 11, 2016 2:34 pm

Re: psql authentication failed during installation [SOLVED]

Postby sophie_jane » Thu Jul 27, 2017 10:33 pm

It did for a few minutes, now it's back to failing authentication with Postgres. I assume that's what's going on, as it's getting a connection refused for port 5432. I can connect to it just fine and login with onlyoffice/onlyoffice. I was careful to set the correct password during configuration, so somehow it's being changed. Either that, or the connection is being refused for another reason. When I learn more, I will report my findings.

Is there a way to set the postgresql user and password without having to reconfigure and reinstall the package? I saw reference to some environmental variables that should do it, for example RABBITMQ_SERVER_PASS. Where should we place those, in /etc/profile? I suppose I can just export them for now to confirm they work.
sophie_jane
 
Posts: 16
Joined: Mon May 29, 2017 2:57 pm


Return to Installation issues

Who is online

Users browsing this forum: No registered users and 2 guests

cron