Impossible to install nextcloud?

Hi there, I’m trying to install nextcloud app from the app store. Install always works fine, but the join script 50nextcloud never goes through.
At first it stuck because I manually had to create an LDAP-Container “univention/saml-serviceprovider”, as i learned from this post:

Now I’m stuck with this error: “Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[08006] [7] connection to server at “172.17.42.1”, port 5432 failed: FATAL: Passwort-Authentifizierung für Benutzer »nextcloud« fehlgeschlagen”

I can’t spot any help for this error. Which database? Where to create this user?

My gerenal question is: Is it really that hard to install nextcloud, or am I missing some prerequisites? What am I doing wrong? Is there any manual about what steps need to be done to get this to work? Any help appreciated!

Thanks!
Chears,
Roland

Hi Roland, I have the same problem.
After uninstalling and clean Nextcloud, I want to install a fresh Nextcloud.

I got the same error:
An unhandled exception has been thrown:
Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[08006] [7] connection to server at “172.17.42.1”, port 5432 failed: Connection refused

The joinscript nextcloud50 did’t run successfully.

I went in the Nextcloud dockler conainer with
univention-app shell nextcloud

apt-get install telnet
telnet 172.17.42.1 5432
Trying 172.17.42.1…
telnet: Unable to connect to remote host: Connection refused

So the docker container can’t access the Univention Postgres DB

Back on the UCS console
netstat -nlp | grep 5432
shows an empty result

The problem is in the file /etc/postgresql/11/main/postgresql.conf
listen_addresses = ‘’

change it to
listen_addresses = ‘*’

After a restart of postgres
service postgresql restart

netstat -nlp | grep 5432
tcp 0 0 0.0.0.0:5432 0.0.0.0:* LISTEN 1035/postgres
tcp6 0 0 :::5432 :::* LISTEN 1035/postgres
unix 2 [ ACC ] STREAM HÖRT 24707 1035/postgres /var/run/postgresql/.s.PGSQL.5432

The ports are open

Now the joinscript nextcloud50 works as it should

Best regards
Stephan

Hello Stephan,

thanks a lot for the obvious solution, I lacked the time to investigate the issue, but that sounds good. For now I’m living with an alternate solution (nextcloud) on a different host, not UCS, but I will put the original idea in place and install nextcloud on UCS, so thanks for your post! I wonder why no one bothers tu correct the join-script. I thought the idea of UCS was to keep things quick, neat and easy… with those errors in the join-script it actually is much easier to install nextcloud on any common linux dristribution via cli.

Cheers,
Roland

Mastodon