Nextcloud stopped working after update to v29

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 29.0.5): 29.0.1.1
Operating system and version (eg, Ubuntu 24.04): docker hub latest tag
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.61 (Debian)
PHP version (eg, 8.3): PHP 8.2.22

The issue you are facing:
When updating from 28 to 29.0.5, the nextcloud server stopped working. Update was successful, but never came back to life. On version 28 it was a perfectly working instance.
I’m using Portainer, but I made a mistake to reinitialize the stack, so cannot check the update logs.
Mysql instance is running fine and is accessible from the app.

On the web interface I see this message:

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.

occ gives a bunch of errors about the database and is unusable:

occ log

An unhandled exception has been thrown:
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘nextcloud.oc_appconfig’ doesn’t exist in /var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php:130
Stack trace:
#0 /var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php(130): PDOStatement->execute(NULL)
#1 /var/www/html/3rdparty/doctrine/dbal/src/Connection.php(1099): Doctrine\DBAL\Driver\PDO\Statement->execute()
#2 /var/www/html/lib/private/DB/Connection.php(333): Doctrine\DBAL\Connection->executeQuery(‘SELECT appid,…’, Array, Array, NULL)
#3 /var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(344): OC\DB\Connection->executeQuery(‘SELECT appid,…’, Array, Array, NULL)
#4 /var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(384): Doctrine\DBAL\Query\QueryBuilder->executeQuery()
#5 /var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php(280): Doctrine\DBAL\Query\QueryBuilder->execute()
#6 /var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php(293): OC\DB\QueryBuilder\QueryBuilder->execute()
#7 /var/www/html/lib/private/AppConfig.php(1246): OC\DB\QueryBuilder\QueryBuilder->executeQuery()
#8 /var/www/html/lib/private/AppConfig.php(264): OC\AppConfig->loadConfig(false)
#9 /var/www/html/lib/private/legacy/OC_App.php(736): OC\AppConfig->searchValues(‘installed_versi…’)
#10 /var/www/html/lib/private/Server.php(694): OC_App::getAppVersions()
#11 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(175): OC\Server->OC{closure}(Object(OC\Server))
#12 /var/www/html/3rdparty/pimple/pimple/src/Pimple/Container.php(122): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility{closure}(Object(Pimple\Container))
#13 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(142): Pimple\Container->offsetGet(‘OC\Memcache\Fac…’)
#14 /var/www/html/lib/private/ServerContainer.php(173): OC\AppFramework\Utility\SimpleContainer->query(‘OC\Memcache\Fac…’, true)
#15 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(64): OC\ServerContainer->query(‘OC\Memcache\Fac…’)
#16 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(197): OC\AppFramework\Utility\SimpleContainer->get(‘OC\Memcache\Fac…’)
#17 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(175): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility{closure}(Object(OC\Server))
#18 /var/www/html/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility{closure}(Object(Pimple\Container))
#19 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(142): Pimple\Container->offsetGet(‘OCP\ICacheFacto…’)
#20 /var/www/html/lib/private/ServerContainer.php(173): OC\AppFramework\Utility\SimpleContainer->query(‘OCP\ICacheFacto…’, true)
#21 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(64): OC\ServerContainer->query(‘OCP\ICacheFacto…’)
#22 /var/www/html/lib/private/Server.php(1094): OC\AppFramework\Utility\SimpleContainer->get(‘OCP\ICacheFacto…’)
#23 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(175): OC\Server->OC{closure}(Object(OC\Server))
#24 /var/www/html/3rdparty/pimple/pimple/src/Pimple/Container.php(122): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility{closure}(Object(Pimple\Container))
#25 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(142): Pimple\Container->offsetGet(‘OCP\Lock\ILocki…’)
#26 /var/www/html/lib/private/ServerContainer.php(173): OC\AppFramework\Utility\SimpleContainer->query(‘OCP\Lock\ILocki…’, true)
#27 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(64): OC\ServerContainer->query(‘OCP\Lock\ILocki…’)
#28 /var/www/html/lib/private/Files/View.php(110): OC\AppFramework\Utility\SimpleContainer->get(‘OCP\Lock\ILocki…’)
#29 /var/www/html/lib/private/Server.php(482): OC\Files\View->__construct()
#30 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(175): OC\Server->OC{closure}(Object(OC\Server))
#31 /var/www/html/3rdparty/pimple/pimple/src/Pimple/Container.php(122): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility{closure}(Object(Pimple\Container))
#32 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(142): Pimple\Container->offsetGet(‘OC\Files\Node\H…’)
#33 /var/www/html/lib/private/ServerContainer.php(173): OC\AppFramework\Utility\SimpleContainer->query(‘OC\Files\Node\H…’, true)
#34 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(64): OC\ServerContainer->query(‘OC\Files\Node\H…’)
#35 /var/www/html/lib/private/Server.php(1445): OC\AppFramework\Utility\SimpleContainer->get(‘OC\Files\Node\H…’)
#36 /var/www/html/lib/base.php(644): OC\Server->boot()
#37 /var/www/html/lib/base.php(1184): OC::init()
#38 /var/www/html/console.php(48): require_once(‘/var/www/html/l…’)
#39 /var/www/html/occ(11): require_once(‘/var/www/html/c…’)
#40 {main}

Next Doctrine\DBAL\Driver\PDO\Exception: SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘nextcloud.oc_appconfig’ doesn’t exist in /var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Exception.php:28
Stack trace:
#0 /var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php(132): Doctrine\DBAL\Driver\PDO\Exception::new(Object(PDOException))
#1 /var/www/html/3rdparty/doctrine/dbal/src/Connection.php(1099): Doctrine\DBAL\Driver\PDO\Statement->execute()
#2 /var/www/html/lib/private/DB/Connection.php(333): Doctrine\DBAL\Connection->executeQuery(‘SELECT appid,…’, Array, Array, NULL)
#3 /var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(344): OC\DB\Connection->executeQuery(‘SELECT appid,…’, Array, Array, NULL)
#4 /var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(384): Doctrine\DBAL\Query\QueryBuilder->executeQuery()
#5 /var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php(280): Doctrine\DBAL\Query\QueryBuilder->execute()
#6 /var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php(293): OC\DB\QueryBuilder\QueryBuilder->execute()
#7 /var/www/html/lib/private/AppConfig.php(1246): OC\DB\QueryBuilder\QueryBuilder->executeQuery()
#8 /var/www/html/lib/private/AppConfig.php(264): OC\AppConfig->loadConfig(false)
#9 /var/www/html/lib/private/legacy/OC_App.php(736): OC\AppConfig->searchValues(‘installed_versi…’)
#10 /var/www/html/lib/private/Server.php(694): OC_App::getAppVersions()
#11 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(175): OC\Server->OC{closure}(Object(OC\Server))
#12 /var/www/html/3rdparty/pimple/pimple/src/Pimple/Container.php(122): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility{closure}(Object(Pimple\Container))
#13 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(142): Pimple\Container->offsetGet(‘OC\Memcache\Fac…’)
#14 /var/www/html/lib/private/ServerContainer.php(173): OC\AppFramework\Utility\SimpleContainer->query(‘OC\Memcache\Fac…’, true)
#15 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(64): OC\ServerContainer->query(‘OC\Memcache\Fac…’)
#16 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(197): OC\AppFramework\Utility\SimpleContainer->get(‘OC\Memcache\Fac…’)
#17 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(175): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility{closure}(Object(OC\Server))
#18 /var/www/html/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility{closure}(Object(Pimple\Container))
#19 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(142): Pimple\Container->offsetGet(‘OCP\ICacheFacto…’)
#20 /var/www/html/lib/private/ServerContainer.php(173): OC\AppFramework\Utility\SimpleContainer->query(‘OCP\ICacheFacto…’, true)
#21 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(64): OC\ServerContainer->query(‘OCP\ICacheFacto…’)
#22 /var/www/html/lib/private/Server.php(1094): OC\AppFramework\Utility\SimpleContainer->get(‘OCP\ICacheFacto…’)
#23 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(175): OC\Server->OC{closure}(Object(OC\Server))
#24 /var/www/html/3rdparty/pimple/pimple/src/Pimple/Container.php(122): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility{closure}(Object(Pimple\Container))
#25 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(142): Pimple\Container->offsetGet(‘OCP\Lock\ILocki…’)
#26 /var/www/html/lib/private/ServerContainer.php(173): OC\AppFramework\Utility\SimpleContainer->query(‘OCP\Lock\ILocki…’, true)
#27 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(64): OC\ServerContainer->query(‘OCP\Lock\ILocki…’)
#28 /var/www/html/lib/private/Files/View.php(110): OC\AppFramework\Utility\SimpleContainer->get(‘OCP\Lock\ILocki…’)
#29 /var/www/html/lib/private/Server.php(482): OC\Files\View->__construct()
#30 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(175): OC\Server->OC{closure}(Object(OC\Server))
#31 /var/www/html/3rdparty/pimple/pimple/src/Pimple/Container.php(122): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility{closure}(Object(Pimple\Container))
#32 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(142): Pimple\Container->offsetGet(‘OC\Files\Node\H…’)
#33 /var/www/html/lib/private/ServerContainer.php(173): OC\AppFramework\Utility\SimpleContainer->query(‘OC\Files\Node\H…’, true)
#34 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(64): OC\ServerContainer->query(‘OC\Files\Node\H…’)
#35 /var/www/html/lib/private/Server.php(1445): OC\AppFramework\Utility\SimpleContainer->get(‘OC\Files\Node\H…’)
#36 /var/www/html/lib/base.php(644): OC\Server->boot()
#37 /var/www/html/lib/base.php(1184): OC::init()
#38 /var/www/html/console.php(48): require_once(‘/var/www/html/l…’)
#39 /var/www/html/occ(11): require_once(‘/var/www/html/c…’)
#40 {main}

Next Doctrine\DBAL\Exception\TableNotFoundException: An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘nextcloud.oc_appconfig’ doesn’t exist in /var/www/html/3rdparty/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php:49
Stack trace:
#0 /var/www/html/3rdparty/doctrine/dbal/src/Connection.php(1943): Doctrine\DBAL\Driver\API\MySQL\ExceptionConverter->convert(Object(Doctrine\DBAL\Driver\PDO\Exception), Object(Doctrine\DBAL\Query))
#1 /var/www/html/3rdparty/doctrine/dbal/src/Connection.php(1885): Doctrine\DBAL\Connection->handleDriverException(Object(Doctrine\DBAL\Driver\PDO\Exception), Object(Doctrine\DBAL\Query))
#2 /var/www/html/3rdparty/doctrine/dbal/src/Connection.php(1106): Doctrine\DBAL\Connection->convertExceptionDuringQuery(Object(Doctrine\DBAL\Driver\PDO\Exception), ‘SELECT appid,…’, Array, Array)
#3 /var/www/html/lib/private/DB/Connection.php(333): Doctrine\DBAL\Connection->executeQuery(‘SELECT appid,…’, Array, Array, NULL)
#4 /var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(344): OC\DB\Connection->executeQuery(‘SELECT appid,…’, Array, Array, NULL)
#5 /var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(384): Doctrine\DBAL\Query\QueryBuilder->executeQuery()
#6 /var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php(280): Doctrine\DBAL\Query\QueryBuilder->execute()
#7 /var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php(293): OC\DB\QueryBuilder\QueryBuilder->execute()
#8 /var/www/html/lib/private/AppConfig.php(1246): OC\DB\QueryBuilder\QueryBuilder->executeQuery()
#9 /var/www/html/lib/private/AppConfig.php(264): OC\AppConfig->loadConfig(false)
#10 /var/www/html/lib/private/legacy/OC_App.php(736): OC\AppConfig->searchValues(‘installed_versi…’)
#11 /var/www/html/lib/private/Server.php(694): OC_App::getAppVersions()
#12 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(175): OC\Server->OC{closure}(Object(OC\Server))
#13 /var/www/html/3rdparty/pimple/pimple/src/Pimple/Container.php(122): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility{closure}(Object(Pimple\Container))
#14 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(142): Pimple\Container->offsetGet(‘OC\Memcache\Fac…’)
#15 /var/www/html/lib/private/ServerContainer.php(173): OC\AppFramework\Utility\SimpleContainer->query(‘OC\Memcache\Fac…’, true)
#16 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(64): OC\ServerContainer->query(‘OC\Memcache\Fac…’)
#17 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(197): OC\AppFramework\Utility\SimpleContainer->get(‘OC\Memcache\Fac…’)
#18 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(175): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility{closure}(Object(OC\Server))
#19 /var/www/html/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility{closure}(Object(Pimple\Container))
#20 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(142): Pimple\Container->offsetGet(‘OCP\ICacheFacto…’)
#21 /var/www/html/lib/private/ServerContainer.php(173): OC\AppFramework\Utility\SimpleContainer->query(‘OCP\ICacheFacto…’, true)
#22 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(64): OC\ServerContainer->query(‘OCP\ICacheFacto…’)
#23 /var/www/html/lib/private/Server.php(1094): OC\AppFramework\Utility\SimpleContainer->get(‘OCP\ICacheFacto…’)
#24 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(175): OC\Server->OC{closure}(Object(OC\Server))
#25 /var/www/html/3rdparty/pimple/pimple/src/Pimple/Container.php(122): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility{closure}(Object(Pimple\Container))
#26 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(142): Pimple\Container->offsetGet(‘OCP\Lock\ILocki…’)
#27 /var/www/html/lib/private/ServerContainer.php(173): OC\AppFramework\Utility\SimpleContainer->query(‘OCP\Lock\ILocki…’, true)
#28 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(64): OC\ServerContainer->query(‘OCP\Lock\ILocki…’)
#29 /var/www/html/lib/private/Files/View.php(110): OC\AppFramework\Utility\SimpleContainer->get(‘OCP\Lock\ILocki…’)
#30 /var/www/html/lib/private/Server.php(482): OC\Files\View->__construct()
#31 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(175): OC\Server->OC{closure}(Object(OC\Server))
#32 /var/www/html/3rdparty/pimple/pimple/src/Pimple/Container.php(122): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility{closure}(Object(Pimple\Container))
#33 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(142): Pimple\Container->offsetGet(‘OC\Files\Node\H…’)
#34 /var/www/html/lib/private/ServerContainer.php(173): OC\AppFramework\Utility\SimpleContainer->query(‘OC\Files\Node\H…’, true)
#35 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(64): OC\ServerContainer->query(‘OC\Files\Node\H…’)
#36 /var/www/html/lib/private/Server.php(1445): OC\AppFramework\Utility\SimpleContainer->get(‘OC\Files\Node\H…’)
#37 /var/www/html/lib/base.php(644): OC\Server->boot()
#38 /var/www/html/lib/base.php(1184): OC::init()
#39 /var/www/html/console.php(48): require_once(‘/var/www/html/l…’)
#40 /var/www/html/occ(11): require_once(‘/var/www/html/c…’)
#41 {main}

Next OC\DB\Exceptions\DbalException: An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘nextcloud.oc_appconfig’ doesn’t exist in /var/www/html/lib/private/DB/Exceptions/DbalException.php:71
Stack trace:
#0 /var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php(295): OC\DB\Exceptions\DbalException::wrap(Object(Doctrine\DBAL\Exception\TableNotFoundException))
#1 /var/www/html/lib/private/AppConfig.php(1246): OC\DB\QueryBuilder\QueryBuilder->executeQuery()
#2 /var/www/html/lib/private/AppConfig.php(264): OC\AppConfig->loadConfig(false)
#3 /var/www/html/lib/private/legacy/OC_App.php(736): OC\AppConfig->searchValues(‘installed_versi…’)
#4 /var/www/html/lib/private/Server.php(694): OC_App::getAppVersions()
#5 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(175): OC\Server->OC{closure}(Object(OC\Server))
#6 /var/www/html/3rdparty/pimple/pimple/src/Pimple/Container.php(122): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility{closure}(Object(Pimple\Container))
#7 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(142): Pimple\Container->offsetGet(‘OC\Memcache\Fac…’)
#8 /var/www/html/lib/private/ServerContainer.php(173): OC\AppFramework\Utility\SimpleContainer->query(‘OC\Memcache\Fac…’, true)
#9 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(64): OC\ServerContainer->query(‘OC\Memcache\Fac…’)
#10 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(197): OC\AppFramework\Utility\SimpleContainer->get(‘OC\Memcache\Fac…’)
#11 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(175): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility{closure}(Object(OC\Server))
#12 /var/www/html/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility{closure}(Object(Pimple\Container))
#13 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(142): Pimple\Container->offsetGet(‘OCP\ICacheFacto…’)
#14 /var/www/html/lib/private/ServerContainer.php(173): OC\AppFramework\Utility\SimpleContainer->query(‘OCP\ICacheFacto…’, true)
#15 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(64): OC\ServerContainer->query(‘OCP\ICacheFacto…’)
#16 /var/www/html/lib/private/Server.php(1094): OC\AppFramework\Utility\SimpleContainer->get(‘OCP\ICacheFacto…’)
#17 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(175): OC\Server->OC{closure}(Object(OC\Server))
#18 /var/www/html/3rdparty/pimple/pimple/src/Pimple/Container.php(122): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility{closure}(Object(Pimple\Container))
#19 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(142): Pimple\Container->offsetGet(‘OCP\Lock\ILocki…’)
#20 /var/www/html/lib/private/ServerContainer.php(173): OC\AppFramework\Utility\SimpleContainer->query(‘OCP\Lock\ILocki…’, true)
#21 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(64): OC\ServerContainer->query(‘OCP\Lock\ILocki…’)
#22 /var/www/html/lib/private/Files/View.php(110): OC\AppFramework\Utility\SimpleContainer->get(‘OCP\Lock\ILocki…’)
#23 /var/www/html/lib/private/Server.php(482): OC\Files\View->__construct()
#24 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(175): OC\Server->OC{closure}(Object(OC\Server))
#25 /var/www/html/3rdparty/pimple/pimple/src/Pimple/Container.php(122): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility{closure}(Object(Pimple\Container))
#26 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(142): Pimple\Container->offsetGet(‘OC\Files\Node\H…’)
#27 /var/www/html/lib/private/ServerContainer.php(173): OC\AppFramework\Utility\SimpleContainer->query(‘OC\Files\Node\H…’, true)
#28 /var/www/html/lib/private/AppFramework/Utility/SimpleContainer.php(64): OC\ServerContainer->query(‘OC\Files\Node\H…’)
#29 /var/www/html/lib/private/Server.php(1445): OC\AppFramework\Utility\SimpleContainer->get(‘OC\Files\Node\H…’)
#30 /var/www/html/lib/base.php(644): OC\Server->boot()
#31 /var/www/html/lib/base.php(1184): OC::init()
#32 /var/www/html/console.php(48): require_once(‘/var/www/html/l…’)
#33 /var/www/html/occ(11): require_once(‘/var/www/html/c…’)

Is this the first time you’ve seen this error? (Y/N):Y

Steps to replicate it:

  1. Update from 28 to 29 (probably an isolated case)

The output of your Nextcloud log in Admin > Logging:

Cannot access NC admin panel

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'htaccess.RewriteBase' => '/',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/var/www/html/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 => 
    array (
      'path' => '/var/www/html/custom_apps',
      'url' => '/custom_apps',
      'writable' => true,
    ),
  ),
  'instanceid' => '',
  'passwordsalt' => '',
  'secret' => '',
  'overwriteprotocol' => 'https',
  'trusted_domains' => 
  array (
    0 => '192.168.3.6:8080',
    1 => 'mydomain',
  ),
  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'mysql',
  'version' => '29.0.1.1',
  'overwrite.cli.url' => 'http://192.168.3.6:8080',
  'dbname' => 'nextcloud',
  'dbhost' => 'db',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => '',
  'installed' => true,
  'maintenance' => false,
  'loglevel' => 5,
  'theme' => '',
  'maintenance_window_start' => 1,
  'default_phone_region' => 'BG',
);

The output of your Apache/nginx/system log in /var/log/____:

No errors were found

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

Cannot find nextcloud.log

I’m using Portainer, but I made a mistake to reinitialize the stack, so cannot check the update logs.

You can check your nextcloud.log directly for details (at least for the db migrations and app upgrades that occur after the image updates the code).

'version' => '29.0.1.1',

Your config says you’re on 29.0.1. Are you sure about the version numbers and upgrade?

From the minimal occ log output posted, it sounds a bit like an empty database.

Please also:

  • post your Compose file for your Nextcloud stack (i.e. including database container)
  • set your loglevel to something reasonable (i.e. 2 rather than 5 so that you can actually see things that go wrong in your logs)
2 Likes

Hello again, after some more in-depth research I found that the DB is completely gone.
Here is the proof:

MariaDB [(none)]> USE nextcloud;
Database changed
MariaDB [nextcloud]> SHOW TABLES;
Empty set (0.000 sec)

So I have tried to recreate the database, but still - the same errors from the above posted OCC log appear and I’m unable to do it.

Nextcloud admin manual

Have you determined why? Perhaps your db container lacks a persistent storage volume? Again, post your Compose.

So I have tried to recreate the database, but still - the same errors from the above posted OCC log appear and I’m unable to do it.

Recreate how? Restoring from backup?

1 Like

I did some upgrades using this compose file and they were successful.
Stupid me started the update, then loaded the NC web interface and tried to load NCs admin panel. This may be the reason that the DB is gone, don’t know.
I don’t have a database backup.
Here is my docker compose:

version: '3'

services:
  db:
    image: mariadb:10.6
    restart: always
    command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW
    volumes:

      - /mnt/data/nextcloud/mysql_db:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
      - MYSQL_PASSWORD=${MYSQL_PASSWORD}
      - MYSQL_DATABASE=${MYSQL_DATABASE}
      - MYSQL_USER=${MYSQL_USER}
      - NEXTCLOUD_UPDATE=1

    env_file:
      - stack.env

  app:
    image: nextcloud:apache
    restart: always
    ports:
      - 8080:80
    links:
      - db
      - redis
    volumes:
      - /mnt/data/nextcloud:/var/www/html
    environment:
      - MYSQL_PASSWORD=${MYSQL_PASSWORD}
      - MYSQL_DATABASE=${MYSQL_DATABASE}
      - MYSQL_USER=${MYSQL_USER}
      - MYSQL_HOST=${MYSQL_HOST}
      - REDIS_HOST=${REDIS_HOST}
      - REDIS_PORT=${REDIS_PORT}
      - REDIS_HOST_PASSWORD=${REDIS_HOST_PASSWORD}
    depends_on:
      - db
      - redis
    env_file:
      - stack.env

  cron:
    image: nextcloud:apache
    restart: always
    volumes:
      - /mnt/data/nextcloud:/var/www/html
    entrypoint: /cron.sh
    depends_on:
      - app
      - db

  redis:
    container_name: ncredis
    image: redis
    restart: unless-stopped
    command: redis-server --requirepass ${REDIS_HOST_PASSWORD}
    expose:
      - 6379
    env_file:
      - stack.env
   

The reason your db is likely gone is because your volume mounts overlap between your containers. You placed your db’s container’s data volume within Nextcloud container’s /var/www/html folder.

More details: If you mount something like, in your case, /mnt/data/nextcloud:/var/www/html, Nextcloud expects to have full control over this folder. It appears you placed your db container’s volume underneath this same volume:

I would suggest something more like the following, based on your provided config. This keeps your respective container’s volumes independent.

This for your Nextcloud container’s data:

/mnt/data/nextcloud-html:/var/www/html

This for your db container’s data:

/mnt/data/nextcloud-db:/var/lib/mysql

P.S. Don’t forget to update the volume cron container to match to app container when/if you make the above change.

2 Likes

Nice suggestion, I’ll fix the paths.
I’m still unable to rebuild the database, so that the NC instance is in working condition. Any thoughts on that? I don’t need the calendars, contacts etc., just a working instance.

EDIT: Problem solved. Just did a fresh installation, then copied my data folder to my new account and did occ files rescan.

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.