So I put the NextcloudPi into maintenance mode and backed up the “/var/www/nextcloud/config/config.php” file and the database at “var/lib/mysql”.
Afterwards I deleted the “config.php” and “mysql” and copied the “config.php” and "“mysql” from my old SD-Card there.
Then I launched the file scan with the line you told me sudo -u www-data php /var/www/nextcloud/occ files:scan -all
I restarted the RaspberryPi and get out of maintenance mode.
I geht this message now when navigating to the Nextcloudpage inside my network:
"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."
The NextcloudPi Panel shows me this:
NextCloudPi version |
v1.37.0 |
NextCloudPi image |
NextCloudPi_11-27-20 |
distribution |
Debian GNU/Linux 10 \n \l |
automount |
yes |
USB devices |
sda |
datadir |
/media/data/ncdata |
data in SD |
no |
data filesystem |
btrfs |
data disk usage |
194G/477G |
rootfs usage |
3.9G/118G |
swapfile |
/var/swap |
dbdir |
/var/lib/mysql |
Nextcloud check |
error |
HTTPD service |
up |
PHP service |
up |
MariaDB service |
down |
Redis service |
up |
Postfix service |
up |
internet check |
ok |
Did I do something wrong? Or overlooked something?
Should I have keeped the original “config.php” and only change the database location instead of replacing it with the “old” one (from my SD-Card) ?
The datadir location is correct and the SSD is mounted at that point.
The dbdir at /var/lib/mysql also is correct (with the replaced folder)
The nextcloud.log show this:
{“reqId”:“zT7Axls9gth86OfhnFzs”,“level”:3,“time”:“2020-11-27T23:24:35+00:00”,“remoteAddr”:"",“user”:“ncp”,“app”:“no app in context”,“method”:"",“url”:"–",“message”:{“Exception”:“OCP\AppF$
{“reqId”:“zT7Axls9gth86OfhnFzs”,“level”:3,“time”:“2020-11-27T23:24:35+00:00”,“remoteAddr”:”",“user”:“ncp”,“app”:“no app in context”,“method”:"",“url”:"–",“message”:{“Exception”:“OCP\AppF$
{“reqId”:“aggIm81bCNY0I08O4CYT”,“level”:1,“time”:“2021-07-16T18:07:07+00:00”,“remoteAddr”:”",“user”:"–",“app”:“updater”,“method”:"",“url”:"–",“message”:"\OC\Updater::maintenanceEnabled$
{“reqId”:“aggIm81bCNY0I08O4CYT”,“level”:0,“time”:“2021-07-16T18:07:07+00:00”,“remoteAddr”:"",“user”:"–",“app”:“core”,“method”:"",“url”:"–",“message”:“starting upgrade from 20.0.2.2 to 22$
{“reqId”:“aggIm81bCNY0I08O4CYT”,“level”:3,“time”:“2021-07-16T18:07:07+00:00”,“remoteAddr”:”",“user”:"–",“app”:“no app in context”,“method”:"",“url”:"–",“message”:“Updates between multipl$
{“reqId”:“aggIm81bCNY0I08O4CYT”,“level”:3,“time”:“2021-07-16T18:07:07+00:00”,“remoteAddr”:”",“user”:"–",“app”:“updater”,“method”:"",“url”:"–",“message”:"\OC\Updater::failure: Exception$
{“reqId”:“aggIm81bCNY0I08O4CYT”,“level”:3,“time”:“2021-07-16T18:07:07+00:00”,“remoteAddr”:"",“user”:"–",“app”:“updater”,“method”:"",“url”:"–",“message”:"\OC\Updater::updateEnd: Update $
{“reqId”:“aggIm81bCNY0I08O4CYT”,“level”:1,“time”:“2021-07-16T18:07:07+00:00”,“remoteAddr”:"",“user”:"–",“app”:“updater”,“method”:"",“url”:"–",“message”:"\OC\Updater::maintenanceActive:$
{“reqId”:“aggIm81bCNY0I08O4CYT”,“level”:1,“time”:“2021-07-16T18:07:07+00:00”,“remoteAddr”:"",“user”:"–",“app”:“updater”,“method”:"",“url”:"–",“message”:"\OC\Updater::resetLogLevel: Res$
{“reqId”:“YPHLqC6F5BEXNXV1RNiPKQAAQw0”,“level”:3,“time”:“2021-07-16T18:10:48+00:00”,“remoteAddr”:“192.168.178.58”,“user”:"–",“app”:“index”,“method”:“GET”,“url”:"/index.php/apps/accessibil$
{“reqId”:“fXyVOiBgXiunPsSwXtlu”,“level”:1,“time”:“2021-07-16T18:19:18+00:00”,“remoteAddr”:"",“user”:"–",“app”:“updater”,“method”:"",“url”:"–",“message”:"\OC\Updater::maintenanceEnabled$
{“reqId”:“fXyVOiBgXiunPsSwXtlu”,“level”:0,“time”:“2021-07-16T18:19:18+00:00”,“remoteAddr”:"",“user”:"–",“app”:“core”,“method”:"",“url”:"–",“message”:“starting upgrade from 20.0.2.2 to 22$
{“reqId”:“fXyVOiBgXiunPsSwXtlu”,“level”:3,“time”:“2021-07-16T18:19:18+00:00”,“remoteAddr”:”",“user”:"–",“app”:“no app in context”,“method”:"",“url”:"–",“message”:“Updates between multipl$
{“reqId”:“fXyVOiBgXiunPsSwXtlu”,“level”:3,“time”:“2021-07-16T18:19:18+00:00”,“remoteAddr”:”",“user”:"–",“app”:“updater”,“method”:"",“url”:"–",“message”:"\OC\Updater::failure: Exception$
{“reqId”:“fXyVOiBgXiunPsSwXtlu”,“level”:3,“time”:“2021-07-16T18:19:18+00:00”,“remoteAddr”:"",“user”:"–",“app”:“updater”,“method”:"",“url”:"–",“message”:"\OC\Updater::updateEnd: Update $
{“reqId”:“fXyVOiBgXiunPsSwXtlu”,“level”:1,“time”:“2021-07-16T18:19:18+00:00”,“remoteAddr”:"",“user”:"–",“app”:“updater”,“method”:"",“url”:"–",“message”:"\OC\Updater::maintenanceActive:$
{“reqId”:“fXyVOiBgXiunPsSwXtlu”,“level”:1,“time”:“2021-07-16T18:19:18+00:00”,“remoteAddr”:"",“user”:"–",“app”:“updater”,“method”:"",“url”:"–",“message”:"\OC\Updater::resetLogLevel: Res$
{“reqId”:“YPHTMewyhWbVGvSpc61QSwAAEAc”,“level”:1,“time”:“2021-07-16T18:42:57+00:00”,“remoteAddr”:“192.168.178.58”,“user”:"–",“app”:“updater”,“method”:“GET”,“url”:"/core/ajax/update.php?re$
{“reqId”:“YPHTMewyhWbVGvSpc61QSwAAEAc”,“level”:0,“time”:“2021-07-16T18:42:57+00:00”,“remoteAddr”:“192.168.178.58”,“user”:"–",“app”:“core”,“method”:“GET”,“url”:"/core/ajax/update.php?reque$
{“reqId”:“YPHTMewyhWbVGvSpc61QSwAAEAc”,“level”:1,“time”:“2021-07-16T18:42:57+00:00”,“remoteAddr”:“192.168.178.58”,“user”:"–",“app”:“no app in context”,“method”:“GET”,“url”:"/core/ajax/upd$
{“reqId”:“YPHTMewyhWbVGvSpc61QSwAAEAc”,“level”:1,“time”:“2021-07-16T18:42:57+00:00”,“remoteAddr”:“192.168.178.58”,“user”:"–",“app”:“updater”,“method”:“GET”,“url”:"/core/ajax/update.php?re$
{“reqId”:“YPHTMewyhWbVGvSpc61QSwAAEAc”,“level”:1,“time”:“2021-07-16T18:42:57+00:00”,“remoteAddr”:“192.168.178.58”,“user”:"–",“app”:“no app in context”,“method”:“GET”,“url”:"/core/ajax/upd$
{“reqId”:“YPHTMewyhWbVGvSpc61QSwAAEAc”,“level”:1,“time”:“2021-07-16T18:42:57+00:00”,“remoteAddr”:“192.168.178.58”,“user”:"–",“app”:“updater”,“method”:“GET”,“url”:"/core/ajax/update.php?re$
{“reqId”:“YPHTMewyhWbVGvSpc61QSwAAEAc”,“level”:1,“time”:“2021-07-16T18:42:57+00:00”,“remoteAddr”:“192.168.178.58”,“user”:"–",“app”:“no app in context”,“method”:“GET”,“url”:"/core/ajax/upd$
{“reqId”:“YPHTMewyhWbVGvSpc61QSwAAEAc”,“level”:1,“time”:“2021-07-16T18:42:57+00:00”,“remoteAddr”:“192.168.178.58”,“user”:"–",“app”:“updater”,“method”:“GET”,“url”:"/core/ajax/update.php?re$
{“reqId”:“YPHTMewyhWbVGvSpc61QSwAAEAc”,“level”:1,“time”:“2021-07-16T18:42:57+00:00”,“remoteAddr”:“192.168.178.58”,“user”:"–",“app”:“no app in context”,“method”:“GET”,“url”:"/core/ajax/upd$
{“reqId”:“YPHTMewyhWbVGvSpc61QSwAAEAc”,“level”:1,“time”:“2021-07-16T18:42:57+00:00”,“remoteAddr”:“192.168.178.58”,“user”:"–",“app”:“updater”,“method”:“GET”,“url”:"/core/ajax/update.php?re$
{“reqId”:“YPHTMewyhWbVGvSpc61QSwAAEAc”,“level”:1,“time”:“2021-07-16T18:42:57+00:00”,“remoteAddr”:“192.168.178.58”,“user”:"–",“app”:“no app in context”,“method”:“GET”,“url”:"/core/ajax/upd$
{“reqId”:“YPHTMewyhWbVGvSpc61QSwAAEAc”,“level”:1,“time”:“2021-07-16T18:42:57+00:00”,“remoteAddr”:“192.168.178.58”,“user”:"–",“app”:“updater”,“method”:“GET”,“url”:"/core/ajax/update.php?re$
{“reqId”:“YPHTMewyhWbVGvSpc61QSwAAEAc”,“level”:1,“time”:“2021-07-16T18:42:57+00:00”,“remoteAddr”:“192.168.178.58”,“user”:"–",“app”:“updater”,“method”:“GET”,“url”:"/core/ajax/update.php?re$
{“reqId”:“YPHTMewyhWbVGvSpc61QSwAAEAc”,“level”:1,“time”:“2021-07-16T18:42:58+00:00”,“remoteAddr”:“192.168.178.58”,“user”:"–",“app”:“updater”,“method”:“GET”,“url”:"/core/ajax/update.php?re$
{“reqId”:“YPHTMewyhWbVGvSpc61QSwAAEAc”,“level”:1,“time”:“2021-07-16T18:42:58+00:00”,“remoteAddr”:“192.168.178.58”,“user”:"–",“app”:“updater”,“method”:“GET”,“url”:"/core/ajax/update.php?re$
{“reqId”:“YPHTMewyhWbVGvSpc61QSwAAEAc”,“level”:1,“time”:“2021-07-16T18:42:59+00:00”,“remoteAddr”:“192.168.178.58”,“user”:"–",“app”:“updater”,“method”:“GET”,“url”:"/core/ajax/update.php?re$
{“reqId”:“YPHTMewyhWbVGvSpc61QSwAAEAc”,“level”:1,“time”:“2021-07-16T18:42:59+00:00”,“remoteAddr”:“192.168.178.58”,“user”:"–",“app”:“updater”,“method”:“GET”,“url”:"/core/ajax/update.php?re$
{“reqId”:“YPHTMewyhWbVGvSpc61QSwAAEAc”,“level”:1,“time”:“2021-07-16T18:43:00+00:00”,“remoteAddr”:“192.168.178.58”,“user”:"–",“app”:“no app in context”,“method”:“GET”,“url”:"/core/ajax/upd$
{“reqId”:“YPHTMewyhWbVGvSpc61QSwAAEAc”,“level”:1,“time”:“2021-07-16T18:43:00+00:00”,“remoteAddr”:“192.168.178.58”,“user”:"–",“app”:“updater”,“method”:“GET”,“url”:"/core/ajax/update.php?re$
{“reqId”:“YPHTMewyhWbVGvSpc61QSwAAEAc”,“level”:1,“time”:“2021-07-16T18:43:00+00:00”,“remoteAddr”:“192.168.178.58”,“user”:"–",“app”:“no app in context”,“method”:“GET”,“url”:"/core/ajax/upd$
{“reqId”:“YPHTMewyhWbVGvSpc61QSwAAEAc”,“level”:1,“time”:“2021-07-16T18:43:00+00:00”,“remoteAddr”:“192.168.178.58”,“user”:"–",“app”:“updater”,“method”:“GET”,“url”:"/core/ajax/update.php?re$
{“reqId”:“YPHTMewyhWbVGvSpc61QSwAAEAc”,“level”:1,“time”:“2021-07-16T18:43:00+00:00”,“remoteAddr”:“192.168.178.58”,“user”:"–",“app”:“no app in context”,“method”:“GET”,“url”:"/core/ajax/upd$
{“reqId”:“YPHTMewyhWbVGvSpc61QSwAAEAc”,“level”:1,“time”:“2021-07-16T18:43:00+00:00”,“remoteAddr”:“192.168.178.58”,“user”:"–",“app”:“updater”,“method”:“GET”,“url”:"/core/ajax/update.php?re$
{“reqId”:“YPHTMewyhWbVGvSpc61QSwAAEAc”,“level”:1,“time”:“2021-07-16T18:43:00+00:00”,“remoteAddr”:“192.168.178.58”,“user”:"–",“app”:“no app in context”,“method”:“GET”,“url”:"/core/ajax/upd$
{“reqId”:“YPHTMewyhWbVGvSpc61QSwAAEAc”,“level”:1,“time”:“2021-07-16T18:43:00+00:00”,“remoteAddr”:“192.168.178.58”,“user”:"–",“app”:“updater”,“method”:“GET”,“url”:"/core/ajax/update.php?re$
{“reqId”:“YPHTMewyhWbVGvSpc61QSwAAEAc”,“level”:1,“time”:“2021-07-16T18:43:00+00:00”,“remoteAddr”:“192.168.178.58”,“user”:"–",“app”:“no app in context”,“method”:“GET”,“url”:"/core/ajax/upd$
{“reqId”:“YPHTMewyhWbVGvSpc61QSwAAEAc”,“level”:1,“time”:“2021-07-16T18:43:00+00:00”,“remoteAddr”:“192.168.178.58”,“user”:"–",“app”:“updater”,“method”:“GET”,“url”:"/core/ajax/update.php?re$
{“reqId”:“YPHTMewyhWbVGvSpc61QSwAAEAc”,“level”:1,“time”:“2021-07-16T18:43:00+00:00”,“remoteAddr”:“192.168.178.58”,“user”:"–",“app”:“no app in context”,“method”:“GET”,“url”:"/core/ajax/upd$
Output of sudo -u www-data php /var/www/nextcloud/occ files:scan -all
:
An unhandled exception has been thrown:
Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurre d in the driver: SQLSTATE[HY000] [2002] No such file or directory in /var/www/ne xtcloud/lib/private/DB/Connection.php:85
Stack trace:
#0 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1486): OC\DB\Con nection->connect()
#1 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php(1014): Doctrine\ DBAL\Connection->getWrappedConnection()
#2 /var/www/nextcloud/lib/private/DB/Connection.php(226): Doctrine\DBAL\Connecti on->executeQuery(‘SELECT * FROM ...', Array, Array, NULL) #3 /var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(210): OC \DB\Connection->executeQuery('SELECT * FROM
…’, Array, Array)
#4 /var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php(287): Doctrin e\DBAL\Query\QueryBuilder->execute()
#5 /var/www/nextcloud/lib/private/AppConfig.php(345): OC\DB\QueryBuilder\QueryBu ilder->execute()
#6 /var/www/nextcloud/lib/private/AppConfig.php(110): OC\AppConfig->loadConfigVa lues()
#7 /var/www/nextcloud/lib/private/AppConfig.php(301): OC\AppConfig->getApps()
#8 /var/www/nextcloud/lib/private/legacy/OC_App.php(965): OC\AppConfig->getValue s(false, ‘installed_versi…’)
#9 /var/www/nextcloud/lib/private/Server.php(682): OC_App::getAppVersions()
#10 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(155) : OC\Server->OC{closure}(Object(OC\Server))
#11 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\ AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility{closure}(Object(P imple\Container))
#12 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(122) : Pimple\Container->offsetGet(‘OC\Memcache\Fac…’)
#13 /var/www/nextcloud/lib/private/ServerContainer.php(137): OC\AppFramework\Uti lity\SimpleContainer->query(‘OC\Memcache\Fac…’, false)
#14 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(56): OC\ServerContainer->query(‘OC\Memcache\Fac…’)
#15 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(177) : OC\AppFramework\Utility\SimpleContainer->get(‘OC\Memcache\Fac…’)
#16 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(155) : OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility{closure}(Obj ect(OC\Server))
#17 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(114): OC\ AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility{closure}(Object(P imple\Container))
#18 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(122) : Pimple\Container->offsetGet(‘OCP\ICacheFacto…’)
#19 /var/www/nextcloud/lib/private/ServerContainer.php(137): OC\AppFramework\Uti lity\SimpleContainer->query(‘OCP\ICacheFacto…’, false)
#20 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(56): OC\ServerContainer->query(‘OCP\ICacheFacto…’)
#21 /var/www/nextcloud/lib/private/Server.php(1031): OC\AppFramework\Utility\Sim pleContainer->get(‘OCP\ICacheFacto…’)
#22 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(155) : OC\Server->OC{closure}(Object(OC\Server))
#23 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\ AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility{closure}(Object(P imple\Container))
#24 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(122) : Pimple\Container->offsetGet(‘OCP\Lock\ILocki…’)
#25 /var/www/nextcloud/lib/private/ServerContainer.php(137): OC\AppFramework\Uti lity\SimpleContainer->query(‘OCP\Lock\ILocki…’, false)
#26 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(56): OC\ServerContainer->query(‘OCP\Lock\ILocki…’)
#27 /var/www/nextcloud/lib/private/Server.php(1990): OC\AppFramework\Utility\Sim pleContainer->get(‘OCP\Lock\ILocki…’)
#28 /var/www/nextcloud/lib/private/Files/View.php(119): OC\Server->getLockingPro vider()
#29 /var/www/nextcloud/lib/private/Server.php(430): OC\Files\View->__construct()
#30 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(155) : OC\Server->OC{closure}(Object(OC\Server))
#31 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\ AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility{closure}(Object(P imple\Container))
#32 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(122) : Pimple\Container->offsetGet(‘OC\Files\Node\H…’)
#33 /var/www/nextcloud/lib/private/ServerContainer.php(137): OC\AppFramework\Uti lity\SimpleContainer->query(‘OC\Files\Node\H…’, false)
#34 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(56): OC\ServerContainer->query(‘OC\Files\Node\H…’)
#35 /var/www/nextcloud/lib/private/Server.php(1353): OC\AppFramework\Utility\Sim pleContainer->get(‘OC\Files\Node\H…’)
#36 /var/www/nextcloud/lib/base.php(588): OC\Server->boot()
#37 /var/www/nextcloud/lib/base.php(1076): OC::init()
#38 /var/www/nextcloud/console.php(49): require_once(’/var/www/nextcl…’)
#39 /var/www/nextcloud/occ(11): require_once(’/var/www/nextcl…’)
#40 {main}