My YunoHost server
Hardware: RPi 3B+
YunoHost version: 11.0.9.15
I have access to my server : Through SSH
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no
Description of my issue
After a Nextcloud upgrade (to v24), my Nextcloud instance is no more working:
Internal Server Error
The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.
I noticed the following error in “/var/log/nginx/serverName-error.log”:
$ sudo more /var/log/nginx/serverName-error.log
2022/10/09 18:53:51 [error] 1491#1491: *98 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTA
TE[HY000] [2002] Connection refused in /var/www/nextcloud/lib/private/DB/Connection.php:139
Stack trace:
#0 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1519): OC\DB\Connection->connect()
#1 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1041): Doctrine\DBAL\Connection->getWrappedConnection()
#2 /var/www/nextcloud/lib/private/DB/Connection.php(261): Doctrine\DBAL\Connection->executeQuery()
#3 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(345): OC\DB\Connection->executeQuery()
#4 /var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(281): Doctrine\DBAL\Query\QueryBuilder->execute()
#5 /var/www/nextcloud/lib/private/AppConfig.php(411): OC\DB\QueryBuilder\QueryBuilder->execute()
#6 /var/www/nextcloud/lib/private/AppConfig.php(176): OC\AppConfig->loadConfigValues()
#7 /var/www/nextcloud/lib/private/" while reading response header from upstream, client: 2a01:e0a:212:c4e0:3688:8408:e550:724a, server: serverName.fr, request: "PROPFIND /owncloud/remote.php/caldav/calendars/myUser/
personnel/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php8.0-fpm-nextcloud.sock:", host: "serverName.fr"
nextcloud.log contains: “PHP message: PHP Fatal error: Uncaught Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTA
TE[HY000] [2002] Connection refused in /var/www/nextcloud/lib/private/DB/Connection.php:139”
Full log:
{"reqId":"z6bzAx1Xe8tvbAP2IA0c","level":4,"time":"2022-10-09T17:22:31+00:00","remoteAddr":"2a01:e0a:212:c4e0:3688:8408:e550:724a","user":"etincelles","app":"webdav","method":"PROPFIND","url":"/owncloud/remote.php/dav/files/etincelles/","message":"Doctrine\\DBAL\\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] Connection refused","userAgent":"Mozilla/5.0 (Linux) mirall/3.4.2-1ubuntu1 (Nextcloud, ubuntu-5.15.0-48-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"24.0.4.1","exception":{"Exception":"Sabre\\DAV\\Exception\\ServiceUnavailable","Message":"Doctrine\\DBAL\\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] Connection refused","Code":0,"Trace":[{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Auth/Plugin.php","line":180,"function":"check","class":"OCA\\DAV\\Connector\\Sabre\\Auth","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Auth/Plugin.php","line":135,"function":"check","class":"Sabre\\DAV\\Auth\\Plugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"beforeMethod","class":"Sabre\\DAV\\Auth\\Plugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":456,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":358,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":166,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Auth.php","Line":161,"CustomMessage":"--"}}
{"reqId":"dEBdOSLLEKoRjupjYaAY","level":4,"time":"2022-10-09T17:23:33+00:00","remoteAddr":"2a01:e0a:212:c4e0:3688:8408:e550:724a","user":"user1","app":"webdav","method":"PROPFIND","url":"/owncloud/remote.php/dav/files/user1/","message":"Doctrine\\DBAL\\Exception\\ConnectionLost: An exception occurred while executing a query: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away","userAgent":"Mozilla/5.0 (Linux) mirall/3.4.2-1ubuntu1 (Nextcloud, ubuntu-5.15.0-48-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"24.0.4.1","exception":{"Exception":"Sabre\\DAV\\Exception\\ServiceUnavailable","Message":"Doctrine\\DBAL\\Exception\\ConnectionLost: An exception occurred while executing a query: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away","Code":0,"Trace":[{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"{closure}","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":456,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":75,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":168,"function":"handleException"}],"File":"/var/www/nextcloud/remote.php","Line":73,"CustomMessage":"--"}}
{"reqId":"2rUufEXMyhL5iSgCCnvP","level":4,"time":"2022-10-09T17:23:33+00:00","remoteAddr":"2a01:e0a:212:c4e0:3688:8408:e550:724a","user":"etincelles","app":"webdav","method":"PROPFIND","url":"/owncloud/remote.php/dav/files/etincelles/","message":"OC\\DB\\Exceptions\\DbalException: An exception occurred while executing a query: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away","userAgent":"Mozilla/5.0 (Linux) mirall/3.4.2-1ubuntu1 (Nextcloud, ubuntu-5.15.0-48-generic ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"24.0.4.1","exception":{"Exception":"Sabre\\DAV\\Exception\\ServiceUnavailable","Message":"OC\\DB\\Exceptions\\DbalException: An exception occurred while executing a query: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away","Code":0,"Trace":[{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"{closure}","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":456,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":75,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":168,"function":"handleException"}],"File":"/var/www/nextcloud/remote.php","Line":73,"CustomMessage":"--"}}
I don’t know if this is linked, but I also noticed that the service yunomdns failed to run:
https://paste.yunohost.org/oyififomeh
Any idea how I could fix that?
Thanks!