Nextcloud sometimes does not restart


#1

Hello,
I have Nextcloud app installed on Univention.
Sometimes when UCS starts Nextcloud is not reachable.
To make it running again I must stop and start it several times on control panel and/or restart UCS.
How can I solve this problem?
Where can I find a log?
Thanks,
Mario
PS: when will the Nextcloud app be updated?


#2

I am inside the nextcloud docker and in apache errror.log I see:

[Wed Dec 12 17:30:31.888496 2018] [:error] [pid 35] [client 172.17.42.1:45342] PHP Fatal error: Uncaught Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occured in driver: SQLSTATE[08006] [7] could not connect to server: Connection refused\n\tIs the server running on host “172.17.42.1” and accepting\n\tTCP/IP connections on port 5432? in /var/www/html/lib/private/DB/Connection.php:64\nStack trace:\n#0 /var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): OC\DB\Connection->connect()\n#1 /var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(389): Doctrine\DBAL\Connection->getDatabasePlatformVersion()\n#2 /var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(328): Doctrine\DBAL\Connection->detectDatabasePlatform([Wed Dec 12 17:30:31.888496 2018] [:error] [pid 35] [client 172.17.42.1:45342] PHP Fatal error: Uncaught Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occured in driver: SQLSTATE[08006] [7] could not connect to server: Connection refused\n\tIs the server running on host “172.17.42.1” and accepting\n\tTCP/IP connections on port 5432? in /var/www/html/lib/private/DB/Connection.php:64\nStack trace:\n#0 /var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): OC\DB\Connection->connect()\n#1 /var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(389): Doctrine\DBAL\Connection->getDatabasePlatformVersion()\n#2 /var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(328): Doctrine\DBAL\Connection->detectDatabasePlatform()\n#3 /var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(623): Doctrine\DBAL\Connection->getDatabasePlatform()\n#4 /var/www/html/lib/private/DB/Connection.php(151): Doctrine\DBAL\Connection->setTransactionIsolation(2)\n#5 /var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(172): OC\DB\Con in /var/www/html/lib/private/DB/Connection.php on line 64)\n#3 /var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(623): Doctrine\DBAL\Connection->getDatabasePlatform()\n#4 /var/www/html/lib/private/DB/Connection.php(151): Doctrine\DBAL\Connection->setTransactionIsolation(2)\n#5 /var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(172): OC\DB\Con in /var/www/html/lib/private/DB/Connection.php on line 64


#3

Ok I solved my self the problem.
I have seen that the docker uses postgresql on UCS machine (which may be a good thing: putting data on main debian and not on docker)
But the postgresql was down I have started it manually. Now nextcloud works again.
But why postgresql is not starting automatically?


#4

Hi, I had the same issue on a fairly slow system. DBMS crashed at boot because of a timeout at start.
See here: Kopano service not starting