Internal Server Error after Install

I am still kinda new to this topic. During a “clean” reinstall of nextcloud and mariadb i get an internal server error. Everything looks good during the install, but after i get a timeout during the initial setup the internal error pops up. The config file show that the install went trough and all the data was created in the right folder.
I was looking for a solution in the forums but nothing seems to work.

Error:

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 nextcloud logs show this:

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextcloud.oc_appconfig' doesn't exist in /app/www/public/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php:130
Stack trace:
#0 /app/www/public/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php(130): PDOStatement->execute()
#1 /app/www/public/3rdparty/doctrine/dbal/src/Connection.php(1099): Doctrine\DBAL\Driver\PDO\Statement->execute()
#2 /app/www/public/lib/private/DB/Connection.php(333): Doctrine\DBAL\Connection->executeQuery()
#3 /app/www/public/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(344): OC\DB\Connection->executeQuery()
#4 /app/www/public/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(384): Doctrine\DBAL\Query\QueryBuilder->executeQuery()
#5 /app/www/public/lib/private/DB/QueryBuilder/QueryBuilder.php(280): Doctrine\DBAL\Query\QueryBuilder->execute()
#6 /app/www/public/lib/private/DB/QueryBuilder/QueryBuilder.php(293): OC\DB\QueryBuilder\QueryBuilder->execute()
#7 /app/www/public/lib/private/AppConfig.php(1246): OC\DB\QueryBuilder\QueryBuilder->executeQuery()
#8 /app/www/public/lib/private/AppConfig.php(264): OC\AppConfig->loadConfig()
#9 /app/www/public/lib/private/legacy/OC_App.php(736): OC\AppConfig->searchValues()
#10 /app/www/public/lib/private/Server.php(694): OC_App::getAppVersions()
#11 /app/www/public/lib/private/AppFramework/Utility/SimpleContainer.php(175): OC\Server->OC\{closure}()
#12 /app/www/public/3rdparty/pimple/pimple/src/Pimple/Container.php(122): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#13 /app/www/public/lib/private/AppFramework/Utility/SimpleContainer.php(142): Pimple\Container->offsetGet()
#14 /app/www/public/lib/private/ServerContainer.php(173): OC\AppFramework\Utility\SimpleContainer->query()
#15 /app/www/public/lib/private/AppFramework/Utility/SimpleContainer.php(64): OC\ServerContainer->query()
#16 /app/www/public/lib/private/AppFramework/Utility/SimpleContainer.php(197): OC\AppFramework\Utility\SimpleContainer->get()
#17 /app/www/public/lib/private/AppFramework/Utility/SimpleContainer.php(175): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#18 /app/www/public/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#19 /app/www/public/lib/private/AppFramework/Utility/SimpleContainer.php(142): Pimple\Container->offsetGet()
#20 /app/www/public/lib/private/ServerContainer.php(173): OC\AppFramework\Utility\SimpleContainer->query()
#21 /app/www/public/lib/private/AppFramework/Utility/SimpleContainer.php(64): OC\ServerContainer->query()
#22 /app/www/public/lib/private/Server.php(1094): OC\AppFramework\Utility\SimpleContainer->get()
#23 /app/www/public/lib/private/AppFramework/Utility/SimpleContainer.php(175): OC\Server->OC\{closure}()
#24 /app/www/public/3rdparty/pimple/pimple/src/Pimple/Container.php(122): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#25 /app/www/public/lib/private/AppFramework/Utility/SimpleContainer.php(142): Pimple\Container->offsetGet()
#26 /app/www/public/lib/private/ServerContainer.php(173): OC\AppFramework\Utility\SimpleContainer->query()
#27 /app/www/public/lib/private/AppFramework/Utility/SimpleContainer.php(64): OC\ServerContainer->query()
#28 /app/www/public/lib/private/Files/View.php(110): OC\AppFramework\Utility\SimpleContainer->get()
#29 /app/www/public/lib/private/Server.php(482): OC\Files\View->__construct()
#30 /app/www/public/lib/private/AppFramework/Utility/SimpleContainer.php(175): OC\Server->OC\{closure}()
#31 /app/www/public/3rdparty/pimple/pimple/src/Pimple/Container.php(122): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#32 /app/www/public/lib/private/AppFramework/Utility/SimpleContainer.php(142): Pimple\Container->offsetGet()
#33 /app/www/public/lib/private/ServerContainer.php(173): OC\AppFramework\Utility\SimpleContainer->query()
#34 /app/www/public/lib/private/AppFramework/Utility/SimpleContainer.php(64): OC\ServerContainer->query()
#35 /app/www/public/lib/private/Server.php(1445): OC\AppFramework\Utility\SimpleContainer->get()
#36 /app/www/public/lib/base.php(644): OC\Server->boot()
#37 /app/www/public/lib/base.php(1184): OC::init()
#38 /app/www/public/cron.php(58): require_once('...')
#39 {main}

Next Doctrine\DBAL\Driver\PDO\Exception: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextcloud.oc_appconfig' doesn't exist in /app/www/public/3rdparty/doctrine/dbal/src/Driver/PDO/Exception.php:28
Stack trace:
#0 /app/www/public/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php(132): Doctrine\DBAL\Driver\PDO\Exception::new()
#1 /app/www/public/3rdparty/doctrine/dbal/src/Connection.php(1099): Doctrine\DBAL\Driver\PDO\Statement->execute()
#2 /app/www/public/lib/private/DB/Connection.php(333): Doctrine\DBAL\Connection->executeQuery()
#3 /app/www/public/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(344): OC\DB\Connection->executeQuery()
#4 /app/www/public/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(384): Doctrine\DBAL\Query\QueryBuilder->executeQuery()
#5 /app/www/public/lib/private/DB/QueryBuilder/QueryBuilder.php(280): Doctrine\DBAL\Query\QueryBuilder->execute()
#6 /app/www/public/lib/private/DB/QueryBuilder/QueryBuilder.php(293): OC\DB\QueryBuilder\QueryBuilder->execute()
#7 /app/www/public/lib/private/AppConfig.php(1246): OC\DB\QueryBuilder\QueryBuilder->executeQuery()
#8 /app/www/public/lib/private/AppConfig.php(264): OC\AppConfig->loadConfig()
#9 /app/www/public/lib/private/legacy/OC_App.php(736): OC\AppConfig->searchValues()
#10 /app/www/public/lib/private/Server.php(694): OC_App::getAppVersions()
#11 /app/www/public/lib/private/AppFramework/Utility/SimpleContainer.php(175): OC\Server->OC\{closure}()
#12 /app/www/public/3rdparty/pimple/pimple/src/Pimple/Container.php(122): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#13 /app/www/public/lib/private/AppFramework/Utility/SimpleContainer.php(142): Pimple\Container->offsetGet()
#14 /app/www/public/lib/private/ServerContainer.php(173): OC\AppFramework\Utility\SimpleContainer->query()
#15 /app/www/public/lib/private/AppFramework/Utility/SimpleContainer.php(64): OC\ServerContainer->query()
#16 /app/www/public/lib/private/AppFramework/Utility/SimpleContainer.php(197): OC\AppFramework\Utility\SimpleContainer->get()
#17 /app/www/public/lib/private/AppFramework/Utility/SimpleContainer.php(175): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#18 /app/www/public/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#19 /app/www/public/lib/private/AppFramework/Utility/SimpleContainer.php(142): Pimple\Container->offsetGet()
#20 /app/www/public/lib/private/ServerContainer.php(173): OC\AppFramework\Utility\SimpleContainer->query()
#21 /app/www/public/lib/private/AppFramework/Utility/SimpleContainer.php(64): OC\ServerContainer->query()
#22 /app/www/public/lib/private/Server.php(1094): OC\AppFramework\Utility\SimpleContainer->get()
#23 /app/www/public/lib/private/AppFramework/Utility/SimpleContainer.php(175): OC\Server->OC\{closure}()
#24 /app/www/public/3rdparty/pimple/pimple/src/Pimple/Container.php(122): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#25 /app/www/public/lib/private/AppFramework/Utility/SimpleContainer.php(142): Pimple\Container->offsetGet()
#26 /app/www/public/lib/private/ServerContainer.php(173): OC\AppFramework\Utility\SimpleContainer->query()
#27 /app/www/public/lib/private/AppFramework/Utility/SimpleContainer.php(64): OC\ServerContainer->query()
#28 /app/www/public/lib/private/Files/View.php(110): OC\AppFramework\Utility\SimpleContainer->get()
#29 /app/www/public/lib/private/Server.php(482): OC\Files\View->__construct()
#30 /app/www/public/lib/private/AppFramework/Utility/SimpleContainer.php(175): OC\Server->OC\{closure}()
#31 /app/www/public/3rdparty/pimple/pimple/src/Pimple/Container.php(122): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#32 /app/www/public/lib/private/AppFramework/Utility/SimpleContainer.php(142): Pimple\Container->offsetGet()
#33 /app/www/public/lib/private/ServerContainer.php(173): OC\AppFramework\Utility\SimpleContainer->query()
#34 /app/www/public/lib/private/AppFramework/Utility/SimpleContainer.php(64): OC\ServerContainer->query()
#35 /app/www/public/lib/private/Server.php(1445): OC\AppFramework\Utility\SimpleContainer->get()
#36 /app/www/public/lib/base.php(644): OC\Server->boot()
#37 /app/www/public/lib/base.php(1184): OC::init()
#38 /app/www/public/cron.php(58): require_once('...')
#39 {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 /app/www/public/3rdparty/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php:49
Stack trace:
#0 /app/www/public/3rdparty/doctrine/dbal/src/Connection.php(1943): Doctrine\DBAL\Driver\API\MySQL\ExceptionConverter->convert()
#1 /app/www/public/3rdparty/doctrine/dbal/src/Connection.php(1885): Doctrine\DBAL\Connection->handleDriverException()
#2 /app/www/public/3rdparty/doctrine/dbal/src/Connection.php(1106): Doctrine\DBAL\Connection->convertExceptionDuringQuery()
#3 /app/www/public/lib/private/DB/Connection.php(333): Doctrine\DBAL\Connection->executeQuery()
#4 /app/www/public/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(344): OC\DB\Connection->executeQuery()
#5 /app/www/public/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(384): Doctrine\DBAL\Query\QueryBuilder->executeQuery()
#6 /app/www/public/lib/private/DB/QueryBuilder/QueryBuilder.php(280): Doctrine\DBAL\Query\QueryBuilder->execute()
#7 /app/www/public/lib/private/DB/QueryBuilder/QueryBuilder.php(293): OC\DB\QueryBuilder\QueryBuilder->execute()
#8 /app/www/public/lib/private/AppConfig.php(1246): OC\DB\QueryBuilder\QueryBuilder->executeQuery()
#9 /app/www/public/lib/private/AppConfig.php(264): OC\AppConfig->loadConfig()
#10 /app/www/public/lib/private/legacy/OC_App.php(736): OC\AppConfig->searchValues()
#11 /app/www/public/lib/private/Server.php(694): OC_App::getAppVersions()
#12 /app/www/public/lib/private/AppFramework/Utility/SimpleContainer.php(175): OC\Server->OC\{closure}()
#13 /app/www/public/3rdparty/pimple/pimple/src/Pimple/Container.php(122): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#14 /app/www/public/lib/private/AppFramework/Utility/SimpleContainer.php(142): Pimple\Container->offsetGet()
#15 /app/www/public/lib/private/ServerContainer.php(173): OC\AppFramework\Utility\SimpleContainer->query()
#16 /app/www/public/lib/private/AppFramework/Utility/SimpleContainer.php(64): OC\ServerContainer->query()
#17 /app/www/public/lib/private/AppFramework/Utility/SimpleContainer.php(197): OC\AppFramework\Utility\SimpleContainer->get()
#18 /app/www/public/lib/private/AppFramework/Utility/SimpleContainer.php(175): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#19 /app/www/public/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#20 /app/www/public/lib/private/AppFramework/Utility/SimpleContainer.php(142): Pimple\Container->offsetGet()
#21 /app/www/public/lib/private/ServerContainer.php(173): OC\AppFramework\Utility\SimpleContainer->query()
#22 /app/www/public/lib/private/AppFramework/Utility/SimpleContainer.php(64): OC\ServerContainer->query()
#23 /app/www/public/lib/private/Server.php(1094): OC\AppFramework\Utility\SimpleContainer->get()
#24 /app/www/public/lib/private/AppFramework/Utility/SimpleContainer.php(175): OC\Server->OC\{closure}()
#25 /app/www/public/3rdparty/pimple/pimple/src/Pimple/Container.php(122): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#26 /app/www/public/lib/private/AppFramework/Utility/SimpleContainer.php(142): Pimple\Container->offsetGet()
#27 /app/www/public/lib/private/ServerContainer.php(173): OC\AppFramework\Utility\SimpleContainer->query()
#28 /app/www/public/lib/private/AppFramework/Utility/SimpleContainer.php(64): OC\ServerContainer->query()
#29 /app/www/public/lib/private/Files/View.php(110): OC\AppFramework\Utility\SimpleContainer->get()
#30 /app/www/public/lib/private/Server.php(482): OC\Files\View->__construct()
#31 /app/www/public/lib/private/AppFramework/Utility/SimpleContainer.php(175): OC\Server->OC\{closure}()
#32 /app/www/public/3rdparty/pimple/pimple/src/Pimple/Container.php(122): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#33 /app/www/public/lib/private/AppFramework/Utility/SimpleContainer.php(142): Pimple\Container->offsetGet()
#34 /app/www/public/lib/private/ServerContainer.php(173): OC\AppFramework\Utility\SimpleContainer->query()
#35 /app/www/public/lib/private/AppFramework/Utility/SimpleContainer.php(64): OC\ServerContainer->query()
#36 /app/www/public/lib/private/Server.php(1445): OC\AppFramework\Utility\SimpleContainer->get()
#37 /app/www/public/lib/base.php(644): OC\Server->boot()
#38 /app/www/public/lib/base.php(1184): OC::init()
#39 /app/www/public/cron.php(58): require_once('...')
#40 {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 /app/www/public/lib/private/DB/Exceptions/DbalException.php:71
Stack trace:
#0 /app/www/public/lib/private/DB/QueryBuilder/QueryBuilder.php(295): OC\DB\Exceptions\DbalException::wrap()
#1 /app/www/public/lib/private/AppConfig.php(1246): OC\DB\QueryBuilder\QueryBuilder->executeQuery()
#2 /app/www/public/lib/private/AppConfig.php(264): OC\AppConfig->loadConfig()
#3 /app/www/public/lib/private/legacy/OC_App.php(736): OC\AppConfig->searchValues()
#4 /app/www/public/lib/private/Server.php(694): OC_App::getAppVersions()
#5 /app/www/public/lib/private/AppFramework/Utility/SimpleContainer.php(175): OC\Server->OC\{closure}()
#6 /app/www/public/3rdparty/pimple/pimple/src/Pimple/Container.php(122): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#7 /app/www/public/lib/private/AppFramework/Utility/SimpleContainer.php(142): Pimple\Container->offsetGet()
#8 /app/www/public/lib/private/ServerContainer.php(173): OC\AppFramework\Utility\SimpleContainer->query()
#9 /app/www/public/lib/private/AppFramework/Utility/SimpleContainer.php(64): OC\ServerContainer->query()
#10 /app/www/public/lib/private/AppFramework/Utility/SimpleContainer.php(197): OC\AppFramework\Utility\SimpleContainer->get()
#11 /app/www/public/lib/private/AppFramework/Utility/SimpleContainer.php(175): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#12 /app/www/public/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#13 /app/www/public/lib/private/AppFramework/Utility/SimpleContainer.php(142): Pimple\Container->offsetGet()
#14 /app/www/public/lib/private/ServerContainer.php(173): OC\AppFramework\Utility\SimpleContainer->query()
#15 /app/www/public/lib/private/AppFramework/Utility/SimpleContainer.php(64): OC\ServerContainer->query()
#16 /app/www/public/lib/private/Server.php(1094): OC\AppFramework\Utility\SimpleContainer->get()
#17 /app/www/public/lib/private/AppFramework/Utility/SimpleContainer.php(175): OC\Server->OC\{closure}()
#18 /app/www/public/3rdparty/pimple/pimple/src/Pimple/Container.php(122): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#19 /app/www/public/lib/private/AppFramework/Utility/SimpleContainer.php(142): Pimple\Container->offsetGet()
#20 /app/www/public/lib/private/ServerContainer.php(173): OC\AppFramework\Utility\SimpleContainer->query()
#21 /app/www/public/lib/private/AppFramework/Utility/SimpleContainer.php(64): OC\ServerContainer->query()
#22 /app/www/public/lib/private/Files/View.php(110): OC\AppFramework\Utility\SimpleContainer->get()
#23 /app/www/public/lib/private/Server.php(482): OC\Files\View->__construct()
#24 /app/www/public/lib/private/AppFramework/Utility/SimpleContainer.php(175): OC\Server->OC\{closure}()
#25 /app/www/public/3rdparty/pimple/pimple/src/Pimple/Container.php(122): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#26 /app/www/public/lib/private/AppFramework/Utility/SimpleContainer.php(142): Pimple\Container->offsetGet()
#27 /app/www/public/lib/private/ServerContainer.php(173): OC\AppFramework\Utility\SimpleContainer->query()
#28 /app/www/public/lib/private/AppFramework/Utility/SimpleContainer.php(64): OC\ServerContainer->query()
#29 /app/www/public/lib/private/Server.php(1445): OC\AppFramework\Utility\SimpleContainer->get()
#30 /app/www/public/lib/base.php(644): OC\Server->boot()
#31 /app/www/public/lib/base.php(1184): OC::init()
#32 /app/www/public/cron.php(58): require_once('...')
#33 {main}

Installation:
OS: Unraid 6.12.13
image: Docker
(did install it trough the app-store)
DB: MariaDB

config:

<?php
$CONFIG = array (
  'datadirectory' => '/data',
  'instanceid' => 'id',
  'passwordsalt' => '...',
  'secret' => '...',
  'trusted_domains' => 
  array (
    0 => 'ip:port',
  ),
  'dbtype' => 'mysql',
  'version' => '29.0.5.1',
  'overwrite.cli.url' => 'https://ip:port',
  'dbname' => 'nextcloud',
  'dbhost' => 'ip:dbport',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'user',
  'dbpassword' => 'securepassword',
  'installed' => true,
);

i would really appreciate if someone can tell me whats wrong. I can’t make sense of it right now.
If some additional information is needed, i am happy to provide.

1 Like

Try to manually set the version you’re pulling to 28.0.9 and try installing from that, as described here
The 29 version has a bug that immediately fails after the initial setup with the error you describe.

28 will boot right up. :slight_smile:
I had the same issue

2 Likes

29.0.6 has been published which fixes this now too.