Installation - Postgresql credentials

Issues during installation and related to database
jnielandt
Posts: 2
Joined: Wed Oct 19, 2016 11:54 am

Installation - Postgresql credentials

Post by jnielandt » Wed Oct 19, 2016 2:08 pm

After installing the community server successfully i'm trying to install the document server on the same machine, using this guide:

http://helpcenter.onlyoffice.com/server ... ation.aspx

Everything works as expected, until the last step, when the actual installation occurs. Here, the command

Code: Select all

sudo apt-get install onlyoffice-documentserver
never prompts for a postgresql password. As I am installing everything under user 'root' (the install occurs in an LXC container), the scripts errors with the following messages:

Code: Select all

After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] 
Setting up onlyoffice-documentserver (4.1.5-1) ...
psql: FATAL:  password authentication failed for user "root"
FATAL:  password authentication failed for user "root"
psql: FATAL:  password authentication failed for user "root"
FATAL:  password authentication failed for user "root"
dpkg: error processing package onlyoffice-documentserver (--configure):
 subprocess installed post-installation script returned error exit status 1


Is there a way to specify which user the apt-get script uses when connecting to the postgresql database? I've tried predefining a root user in postgres to circumvent the problem, but this doesn't seem to work (I guess because there's no password for the user either?). At this point, I'm giving up trying to install the platform. I've tried the docker install, but that doesn't seem to work either within an LXC container (permissions problem). Can anyone give me a lift to the next problem? :)

Sserg
Posts: 1
Joined: Tue Nov 08, 2016 11:38 am

Re: Installation - Postgresql credentials

Post by Sserg » Tue Nov 08, 2016 11:41 am

I am having the exact same issue. Has anyone been able to fix this?

Maxim
Posts: 1751
Joined: Tue Oct 11, 2016 2:34 pm

Re: Installation - Postgresql credentials

Post by Maxim » Tue Nov 08, 2016 3:28 pm

Sserg wrote:I am having the exact same issue. Has anyone been able to fix this?
Hello!
Please specify your server's OS, what ONLYOFFICE installation you used (Enterprise Edition or Community Edition or smth else)....give us more information

Pavel.Lobashov
Posts: 12
Joined: Wed Sep 21, 2016 11:41 am

Re: Installation - Postgresql credentials

Post by Pavel.Lobashov » Tue Nov 08, 2016 3:29 pm

As mention in installation guide on this step you should be asked (it used `db_input`) for password
During the installation process, you will be asked to provide a password for the onlyoffice PostgreSQL user. Please enter the onlyoffice password that you have specified when configuring PostgreSQL.
And this password should be `onlyoffice` if you didn't change lines

Code: Select all

sudo -u postgres psql -c "CREATE DATABASE onlyoffice;"
sudo -u postgres psql -c "CREATE USER onlyoffice WITH password 'onlyoffice';"
sudo -u postgres psql -c "GRANT ALL privileges ON DATABASE onlyoffice TO onlyoffice;"

kabo
Posts: 16
Joined: Wed May 20, 2015 12:12 pm

Re: Installation - Postgresql credentials

Post by kabo » Sat Nov 26, 2016 1:02 am

I'm on Ubuntu 14.04, and I get the same error. I have installed postgresql and configured it as instructed in the documentation. I am not asked for a password during the installation.

Code: Select all

$ sudo apt -y install onlyoffice-documentserver
<...snip...>
Setting up onlyoffice-documentserver (4.1.8-1) ...
Adding user www-data to group onlyoffice
psql: FATAL:  password authentication failed for user "root"
FATAL:  password authentication failed for user "root"
psql: FATAL:  password authentication failed for user "root"
FATAL:  password authentication failed for user "root"
dpkg: error processing package onlyoffice-documentserver (--configure):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for libc-bin (2.19-0ubuntu6.9) ...
Errors were encountered while processing:
 onlyoffice-documentserver
E: Sub-process /usr/bin/dpkg returned an error code (1)

kabo
Posts: 16
Joined: Wed May 20, 2015 12:12 pm

Re: Installation - Postgresql credentials

Post by kabo » Sat Nov 26, 2016 1:05 am

Here's another guy with the same issue.
viewtopic.php?f=3&t=9291&p=12775

kabo
Posts: 16
Joined: Wed May 20, 2015 12:12 pm

Re: Installation - Postgresql credentials

Post by kabo » Sat Nov 26, 2016 3:10 am

OK, I managed to get it installed.

I ran

Code: Select all

sudo DEBCONF_DEBUG=developer dpkg --configure onlyoffice-documentserver
I noticed that the values for db-user and db-pwd were the values for the mysql. So I ran

Code: Select all

$ echo RESET onlyoffice/db-user | sudo debconf-communicate onlyoffice-documentserver
$ echo RESET onlyoffice/db-pwd | sudo debconf-communicate onlyoffice-documentserver
After that I ran

Code: Select all

sudo dpkg --configure onlyoffice-documentserver
entered the correct information, and got the message "Congratulations, the ONLYOFFICE DocumentServer has been installed successfully!" back :)

kabo
Posts: 16
Joined: Wed May 20, 2015 12:12 pm

Re: Installation - Postgresql credentials

Post by kabo » Sat Nov 26, 2016 3:58 am

Though I did get it installed, it didn't actually work.
I ended up installing the communityserver in one LXC and the documentserver in a separate LXC. That worked fine :)

Schroeffu
Posts: 6
Joined: Wed Dec 21, 2016 5:02 pm

Re: Installation - Postgresql credentials

Post by Schroeffu » Wed Dec 21, 2016 5:07 pm

I have exactly the same problem.

Debian 8,
Repo: deb http://download.onlyoffice.com/repo/debian squeeze main

Error with Debug:

DEBCONF_DEBUG=developer dpkg -D777 --configure onlyoffice-documentserver
[...]
debconf (developer): starting /var/lib/dpkg/info/onlyoffice-documentserver.postinst configure
debconf (developer): <-- GET onlyoffice/db-host
debconf (developer): --> 0 localhost
debconf (developer): <-- GET onlyoffice/db-user
debconf (developer): --> 0 onlyoffice
debconf (developer): <-- GET onlyoffice/db-pwd
debconf (developer): --> 0 onlyoffice
debconf (developer): <-- GET onlyoffice/db-name
debconf (developer): --> 0 onlyoffice
debconf (developer): <-- STOP
dpkg: error processing package onlyoffice-documentserver (--configure):
subprocess installed post-installation script returned error exit status 1
D000001: ensure_diversions: same, skipping
Errors were encountered while processing:
onlyoffice-documentserver

I have tried this RESET to db-name and db-pwd , then configure is asking me for the a password, but it still does not seems to work.

Maxim
Posts: 1751
Joined: Tue Oct 11, 2016 2:34 pm

Re: Installation - Postgresql credentials

Post by Maxim » Thu Dec 22, 2016 12:17 pm

Hello!
Developers have tested on Debian and no errors found out. Maybe we can help you remotely.

Post Reply