Internal Server Error, missing table after 22.2.3 update

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, 20.0.5): 22.2.3snap1
Operating system and version (eg, Ubuntu 20.04): Ubuntu 16.04
Apache or nginx version (eg, Apache 2.4.25): managed under the snap
PHP version (eg, 7.4): managed under the snap

The issue you are facing: Currently seeing “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.”

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

Steps to replicate it:

  1. Install 22.2.3snap1 from 22.0.5snap1

The output of your Nextcloud log in Admin > Logging:

Can't get to UI in order to get this.

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

<?php 
$CONFIG = array (
  'apps_paths' =>
  array (
    0 =>
    array (
      'path' => '/snap/nextcloud/current/htdocs/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 =>
    array (
      'path' => '/var/snap/nextcloud/current/nextcloud/extra-apps',
      'url' => '/extra-apps',
      'writable' => true,
    ),
  ),
  'supportedDatabases' =>
  array (
    0 => 'mysql',
  ),
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => '/tmp/sockets/redis.sock',
    'port' => 0,
  ),
  'passwordsalt' => 'X',
  'secret' => 'X',
  'trusted_domains' =>
  array (
    0 => 'localhost',
    1 => 'X',
  ),
  'datadirectory' => '/var/snap/nextcloud/common/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '22.2.0.2',
  'overwrite.cli.url' => 'http://localhost',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost:/tmp/sockets/mysql.sock',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => 'X',
  'installed' => true,
  'instanceid' => 'X',
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 0,
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'tls',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'help',
  'mail_domain' => 'X',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'X',
  'mail_smtpport' => '587',
  'mail_smtpname' => 'X',
  'mail_smtppassword' => 'X!',
  'ldapIgnoreNamingRules' => false,
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
);

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

[Sat Nov 20 16:25:29.255283 2021] [core:error] [pid 27426:tid 139688123799296] [client 45.146.164.110:49382] AH10244: invalid URI path (/cgi-bin/.%2e/.%2e/.%2e/.%2e/bin/sh) 
[Sat Nov 20 19:33:08.693191 2021] [mpm_event:notice] [pid 23284:tid 139688791110848] AH00491: caught SIGTERM, shutting down
[Tue Nov 23 00:35:18.974665 2021] [ssl:warn] [pid 3821:tid 139794283992256] AH01909: 127.0.1.1:443:0 server certificate does NOT include an ID which matches the server name
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
[Tue Nov 23 00:35:18.976700 2021] [ssl:warn] [pid 3821:tid 139794283992256] AH01909: 127.0.1.1:443:0 server certificate does NOT include an ID which matches the server name
[Tue Nov 23 00:35:18.976838 2021] [lbmethod_heartbeat:notice] [pid 3821:tid 139794283992256] AH02282: No slotmem from mod_heartmonitor
[Tue Nov 23 00:35:18.977376 2021] [mpm_event:notice] [pid 3821:tid 139794283992256] AH00489: Apache/2.4.51 (Unix) OpenSSL/1.1.1 configured -- resuming normal operations
[Tue Nov 23 00:35:18.977392 2021] [core:notice] [pid 3821:tid 139794283992256] AH00094: Command line: 'httpd -d /snap/nextcloud/28586 -D EnableHTTPS -D EnableHSTS -D FOREGROUND'
[Tue Nov 23 00:35:18.980460 2021] [unixd:alert] [pid 3824:tid 139794283992256] AH02155: getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive
[Tue Nov 23 00:35:18.980460 2021] [unixd:alert] [pid 3823:tid 139794283992256] AH02155: getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive
[Tue Nov 23 00:35:18.980459 2021] [unixd:alert] [pid 3825:tid 139794283992256] AH02155: getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive
[Tue Nov 23 00:35:19.979032 2021] [unixd:alert] [pid 4066:tid 139794283992256] AH02155: getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive
[Tue Nov 23 00:35:26.289351 2021] [core:warn] [pid 3821:tid 139794283992256] AH00045: child process 3823 still did not exit, sending a SIGTERM
[Tue Nov 23 00:35:26.289391 2021] [core:warn] [pid 3821:tid 139794283992256] AH00045: child process 3825 still did not exit, sending a SIGTERM
[Tue Nov 23 00:35:28.291283 2021] [core:warn] [pid 3821:tid 139794283992256] AH00045: child process 3823 still did not exit, sending a SIGTERM
[Tue Nov 23 00:35:28.291317 2021] [core:warn] [pid 3821:tid 139794283992256] AH00045: child process 3825 still did not exit, sending a SIGTERM
[Tue Nov 23 00:35:30.293387 2021] [core:warn] [pid 3821:tid 139794283992256] AH00045: child process 3823 still did not exit, sending a SIGTERM
[Tue Nov 23 00:35:30.293423 2021] [core:warn] [pid 3821:tid 139794283992256] AH00045: child process 3825 still did not exit, sending a SIGTERM
[Tue Nov 23 00:35:32.295505 2021] [core:error] [pid 3821:tid 139794283992256] AH00046: child process 3823 still did not exit, sending a SIGKILL
[Tue Nov 23 00:35:32.295546 2021] [core:error] [pid 3821:tid 139794283992256] AH00046: child process 3825 still did not exit, sending a SIGKILL
[Tue Nov 23 00:35:33.296647 2021] [mpm_event:notice] [pid 3821:tid 139794283992256] AH00491: caught SIGTERM, shutting down
[Tue Nov 23 18:59:16.851238 2021] [ssl:warn] [pid 19311:tid 139931710641344] AH01909: 127.0.1.1:443:0 server certificate does NOT include an ID which matches the server name
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
[Tue Nov 23 18:59:16.900029 2021] [ssl:warn] [pid 19311:tid 139931710641344] AH01909: 127.0.1.1:443:0 server certificate does NOT include an ID which matches the server name
[Tue Nov 23 18:59:16.900157 2021] [lbmethod_heartbeat:notice] [pid 19311:tid 139931710641344] AH02282: No slotmem from mod_heartmonitor
[Tue Nov 23 18:59:16.900759 2021] [mpm_event:notice] [pid 19311:tid 139931710641344] AH00489: Apache/2.4.51 (Unix) OpenSSL/1.1.1 configured -- resuming normal operations
[Tue Nov 23 18:59:16.900777 2021] [core:notice] [pid 19311:tid 139931710641344] AH00094: Command line: 'httpd -d /snap/nextcloud/28586 -D EnableHTTPS -D EnableHSTS -D FOREGROUND'
[Tue Nov 23 18:59:16.901735 2021] [unixd:alert] [pid 19314:tid 139931710641344] AH02155: getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive
[Tue Nov 23 18:59:16.901738 2021] [unixd:alert] [pid 19313:tid 139931710641344] AH02155: getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User dir:
[Tue Nov 23 18:59:16.901739 2021] [unixd:alert] [pid 19312:tid 139931710641344] AH02155: getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive 
[Tue Nov 23 18:59:17.902646 2021] [unixd:alert] [pid 19599:tid 139931710641344] AH02155: getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive
[Tue Nov 23 19:16:24.214164 2021] [mpm_event:notice] [pid 19311:tid 139931710641344] AH00491: caught SIGTERM, shutting down

Oddly the database appears to be empty and when I run snap logs nextcloud I see the following message:

2021-11-23T19:20:32Z nextcloud.apache[19748]: #38 /snap/nextcloud/28654/htdocs/lib/base.php(1089): OC::init()

2021-11-23T19:20:32Z nextcloud.apache[19748]: #39 /snap/nextcloud/28654/htdocs/console.php(48): require_once('...')

2021-11-23T19:20:32Z nextcloud.apache[19748]: #40 /snap/nextcloud/28654/htdocs/occ(11): require_once('...')

2021-11-23T19:20:32Z nextcloud.apache[19748]: #41 {main}All set! Running httpd...

2021-11-23T19:20:32Z nextcloud.apache[19748]: Certificates have been activated: using HTTPS only

2021-11-23T19:20:32Z nextcloud.apache[19748]: Certificates look to be in order: enabling HSTS

2021-11-23T19:20:32Z nextcloud.apache[19748]: HTTP compression is disabled

2021-11-23T19:20:32Z nextcloud.apache[19748]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message

2021-11-23T19:20:33Z nextcloud.nextcloud-fixer[19658]: done

2021-11-23T19:20:33Z nextcloud.nextcloud-fixer[19658]: Waiting for Nextcloud to be installed...

but the command “Waiting for Nextcloud to be installed” does not finish.

php errors show the following:

#39 /snap/nextcloud/28586/htdocs/ocs/v2.php(23): require_once('...') 
#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 /snap/nextcloud/28586/htdocs/3rdparty/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php:47
Stack trace:
#0 /snap/nextcloud/28586/htdocs/3rdparty/doctrine/dbal/src/Connection.php(1728): Doctrine\DBAL\Driver\API\MySQL\ExceptionConverter->convert()
#1 /snap/nextcloud/28586/htdocs/3rdparty/doctrine/dbal/src/Connection.php(1667): Doctrine\DBAL\Connection->handleDriverException()
#2 /snap/nextcloud/28586/htdocs/3rdparty/doctrine/dbal/src/Connection.php(1040): Doctrine\DBAL\Connection->convertExceptionDuringQuery()
#3 /snap/nextcloud/28586/htdocs/lib/private/DB/Connection.php(231): Doctrine\DBAL\Connection->executeQuery()

Any help would be greatly appreciated - thank you.