Nextcloud returns Internal Server Error

Since yesterday my NCP is no longer working. The sync client says

Error downloading – server replied: Internal Server Error

Going to the webpage just returns an empty page without any information.

It is not an update issue since the NCP was already updated a while ago and was working.

Anyone know what may be wrong?

Thanks in advance

You need to check your logfiles (/var/log/(apache)). Usually, the server gives you more details on what might be wrong.

Thank you for your response.

I have looked into the apache log and it seems there is an issue with the certificate
[Mon Oct 29 13:40:08.075659 2018] [ssl:warn] [pid 633:tid 1995570448] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the s$
[Mon Oct 29 13:40:09.069946 2018] [ssl:warn] [pid 1005:tid 1995570448] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the $
[Mon Oct 29 13:40:10.005250 2018] [mpm_event:notice] [pid 1005:tid 1995570448] AH00489: Apache/2.4.25 (Raspbian) OpenSSL/1.0.2l configured – resuming normal$
[Mon Oct 29 13:40:10.005467 2018] [core:notice] [pid 1005:tid 1995570448] AH00094: Command line: β€˜/usr/sbin/apache2’

The NC error log is too big to paste here, but it contains mostly the same error anyways.
[Mon Oct 29 15:32:49.761332 2018] [proxy_fcgi:error] [pid 1069:tid 1623172128] [client 131.94.186.12:1186] AH01071: Got error β€˜PHP message: PHP Fatal error: Uncaught Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [2002] Connection refused in /var/www/nextcloud/lib/private/DB/Connection.php:64\nStack trace:\n#0 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): OC\DB\Connection->connect()\n#1 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(389): Doctrine\DBAL\Connection->getDatabasePlatformVersion()\n#2 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(328): Doctrine\DBAL\Connection->detectDatabasePlatform()\n#3 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(623): Doctrine\DBAL\Connection->getDatabasePlatform()\n#4 /var/www/nextcloud/lib/private/DB/Connection.php(151): Doctrine\DBAL\Connection->setTransactionIsolation(2)\n#5 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(172): OC\DB\Connection->__construct(Array, Object(Doctrine\DBAL\…\nPHP message: PHP Fatal error: Uncaught Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [2002] Connection refused in /var/www/nextcloud/lib/private/DB/Connection.php:64\nStack trace:\n#0 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): OC\DB\Connection->connect()\n#1 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(389): Doctrine\DBAL\Connection->getDatabasePlatformVersion()\n#2 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(328): Doctrine\DBAL\Connection->detectDatabasePlatform()\n#3 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(623): Doctrine\DBAL\Connection->getDatabasePlatform()\n#4 /var/www/nextcloud/lib/private/DB/Connection.php(151): Doctrine\DBAL\Connection->setTransactionIsolation(2)\n#5 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(172): OC\DB\Connection->__construct(Array, Object(Doctrine\DBAL\…\n’

Just after rebooting, I got this error:
[Mon Oct 29 13:40:08.074234 2018] [ssl:warn] [pid 633:tid 1995570448] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name

I did not change the certificate so I don’t know why this is suddenly supposed to be a problem now.

As for the nc-error I have no idea what is going on there, I would greatly appreciate any help.

Hi!

I ran into the same problem when updating from NC 15 to 16.
How did you resolve the problem?

Greetings,
Alex