New Install failed - postgresql password authentication failed for user "xwiki" (xwiki-tomcat9-pgsql)

Hello all,

I have decided to install Xwiki. I am using a digitalocean droplet: Standard / 2 GB / 1 vCPU / 50 GB Ubuntu 18.04.3 (LTS) x64.

I root in and do a:
apt-get update
apt-get upgrade
then follow https://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Installation/InstallationViaAPT/

I decided to install the xwiki-tomcat9-pgsql package.
so I # apt-get install xwiki-tomcat9-pgsql and it runs through the traps…

I see a line in red on the putty window:
Ver Cluster Port Status Owner Data directory Log file
10 main 5432 down postgres /var/lib/postgresql/10/main /var/log/postgresql/postgresql-10-main.log

And I look into that logfile and see:
2020-04-24 03:01:47.298 UTC [17438] LOG: listening on IPv4 address “127.0.0.1”, port 5432
2020-04-24 03:01:47.300 UTC [17438] LOG: listening on Unix socket “/var/run/postgresql/.s.PGSQL.5432”
2020-04-24 03:01:47.327 UTC [17448] LOG: database system was shut down at 2020-04-24 03:01:45 UTC
2020-04-24 03:01:47.335 UTC [17438] LOG: database system is ready to accept connections
2020-04-24 03:01:47.882 UTC [17457] [unknown]@[unknown] LOG: incomplete startup packet
2020-04-24 03:02:46.687 UTC [20495] xwiki@template1 FATAL: password authentication failed for user “xwiki”
2020-04-24 03:02:46.687 UTC [20495] xwiki@template1 DETAIL: Role “xwiki” does not exist.
Connection matched pg_hba.conf line 92: “host all all 127.0.0.1/32 md5”
2020-04-24 03:02:46.691 UTC [20496] xwiki@template1 FATAL: password authentication failed for user “xwiki”
2020-04-24 03:02:46.691 UTC [20496] xwiki@template1 DETAIL: Role “xwiki” does not exist.
Connection matched pg_hba.conf line 92: “host all all 127.0.0.1/32 md5”
2020-04-24 03:02:46.856 UTC [20549] postgres@template1 ERROR: role “xwiki” does not exist
2020-04-24 03:02:46.856 UTC [20549] postgres@template1 STATEMENT: ALTER USER “xwiki”
2020-04-24 03:02:47.241 UTC [20659] postgres@xwiki FATAL: database “xwiki” does not exist
/var/log/postgresql/postgresql-10-main.log (END)

So, I am posting in case there is an easy fix, as I am still playing around and can re-install. And if I destroy droplet and start with the xwiki-tomcat8-pgsql, it appears to work.

Thanks for any assistance.

I am looking forward to working with Xwiki and joining the community!

-Robclay

Not sure what can be the cause. This part (creating the database and the user) is actually done by Debian dbconfig, maybe you changed some configuration in postgres which made impossible for dbconfig to do its job.

Would be great if you could create an issue on Loading... with all the details you can think of to reproduce this at least, will be a good way to track progress on this issue or indicate the solution if it’s a setup problem.

Thanks for the reply -

This part (creating the database and the user) is actually done by Debian dbconfig, maybe you changed some configuration in postgres which made impossible for dbconfig to do its job.

I just followed the process… i.e. all I did was
apt-get install xwiki-tomcat9-pgsql
and hit “Enter” for any of the prompts during the install.

But I will post on JIRA as you suggest. Thanks!

  • Robert

It’s not related to how you installed XWiki but how Postgres is configured on this server/distribution (Potsgresql is a dependency, it’s not something provided by the XWiki package).

I just duplicated this on:

https://jira.xwiki.org/browse/XWIKI-17249

and Oh! So… it could be an ubuntu / digital ocean thing.

What’s weird is that the Tomcat8 version works. (xwiki-tomcat8-pgsql)

Very strange indeed, should not make any difference for postgres.

Thanks, I will try to reproduce and debug this ASAP.