Upgraded nc and db docker container via Portainer Recreate button, get error 500

Updated NC to the newest version via Portainer’s Recreate button.
Didn’t change anything else.
After that update went through without any hiccups I get only ‘500 internal server error’

Log:

[Thu May 04 18:26:54.306611 2023] [mpm_prefork:notice] [pid 1] AH00170: caught SIGWINCH, shutting down gracefully

AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.24.0.2. Set the 'ServerName' directive globally to suppress this message

AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.24.0.2. Set the 'ServerName' directive globally to suppress this message

[Thu May 04 18:26:56.223848 2023] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.56 (Debian) PHP/8.1.18 configured -- resuming normal operations

[Thu May 04 18:26:56.223964 2023] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'

172.24.0.1 - - [04/May/2023:18:27:15 +0000] "GET / HTTP/1.1" 500 702 "-" "Mozilla/5.0 (Windows NT 10.0; rv:111.0) Gecko/20100101 Firefox/111.0"

172.24.0.1 - - [04/May/2023:18:27:16 +0000] "GET /favicon.ico HTTP/1.1" 500 702 "-" "Mozilla/5.0 (Windows NT 10.0; rv:111.0) Gecko/20100101 Firefox/111.0"

[Thu May 04 18:35:04.433882 2023] [mpm_prefork:notice] [pid 1] AH00170: caught SIGWINCH, shutting down gracefully

AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.13. Set the 'ServerName' directive globally to suppress this message

AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.13. Set the 'ServerName' directive globally to suppress this message

[Thu May 04 18:35:06.032098 2023] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.56 (Debian) PHP/8.1.18 configured -- resuming normal operations

[Thu May 04 18:35:06.032134 2023] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'

172.17.0.1 - - [04/May/2023:18:35:09 +0000] "GET / HTTP/1.1" 500 702 "-" "Mozilla/5.0 (Windows NT 10.0; rv:111.0) Gecko/20100101 Firefox/111.0"

172.17.0.1 - - [04/May/2023:18:35:09 +0000] "GET /favicon.ico HTTP/1.1" 500 702 "-" "Mozilla/5.0 (Windows NT 10.0; rv:111.0) Gecko/20100101 Firefox/111.0"

[Thu May 04 18:36:04.469861 2023] [mpm_prefork:notice] [pid 1] AH00170: caught SIGWINCH, shutting down gracefully

AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.13. Set the 'ServerName' directive globally to suppress this message

config.php

<?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' => 'xxxxxxxx',
  'passwordsalt' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
  'secret' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
  'trusted_domains' =>
  array (
    0 => 'nc.example.de',
    1 => '192.168.0.28',
    2 => '172.17.0.13',
    3 => 'nextcloud.local',
  ),
  'trusted_proxies' =>
  array (
    0 => '172.17.0.5',
    1 => '172.17.0.4',
  ),
  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'mysql',
  'version' => '26.0.1.1',
  'overwrite.cli.url' => 'https://nc.example.de',
  'dbname' => 'nextcloud',
  'dbhost' => 'db',
  'overwritehost ' => '192.168.0.28',
  'overwriteprotocol' => 'http',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'user',
  'dbpassword' => 'xxxxxxxxxxxxxxxx',
  'default_phone_region' => 'de',
  'installed' => true,
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'tls',
  'mail_sendmailmode' => 'smtp',
  'mail_smtpport' => '2525',
  'mail_smtphost' => 'mail.smtp2go.com',
  'mail_from_address' => 'admin',
  'mail_domain' => 'example.de',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtpname' => 'example.de',
  'mail_smtppassword' => 'xxxxxxxxxxxxxxxxxxxxxxxxx',
  'twofactor_enforced' => 'false',
  'loglevel' => 2,
  'maintenance' => false,
);

Relevant Screenshots:
image


The version.php output

<?php
$OC_Version = array(26,0,1,1);
$OC_VersionString = '26.0.1';
$OC_Edition = '';
$OC_Channel = 'stable';
$OC_VersionCanBeUpgradedFrom = array (
  'nextcloud' =>
  array (
    '25.0' => true,
    '26.0' => true,
  ),
  'owncloud' =>
  array (
    '10.11' => true,
  ),
);
$OC_Build = '2023-04-19T15:42:43+00:00 8cfcb8e2a2f9ba1bbe993161f00d7dcebf07708f';
$vendor = 'nextcloud';

Tried to change the networks and the config.php accordingly:

  'trusted_domains' =>
  array (
    0 => 'nc.example.de',
    1 => '192.168.0.28',
    2 => '172.24.0.2',
    3 => 'nextcloud.local',
  ),
  'trusted_proxies' =>
  array (
    0 => '172.24.0.2',
    1 => '172.24.0.3',
  ),

new logs:

2023-05-04T19:31:06.401839489Z 172.24.0.1 - - [04/May/2023:19:31:06 +0000] "GET / HTTP/1.1" 500 702 "-" "-"

2023-05-04T19:31:36.562749171Z 172.24.0.1 - - [04/May/2023:19:31:36 +0000] "HEAD / HTTP/1.1" 500 392 "-" "-"

2023-05-04T19:31:36.690486509Z 172.24.0.1 - - [04/May/2023:19:31:36 +0000] "GET / HTTP/1.1" 500 702 "-" "-"

2023-05-04T19:31:57.036842198Z 172.24.0.1 - - [04/May/2023:19:31:56 +0000] "HEAD / HTTP/1.1" 500 392 "-" "-"

2023-05-04T19:31:57.315335587Z 172.24.0.1 - - [04/May/2023:19:31:57 +0000] "GET / HTTP/1.1" 500 702 "-" "-"

2023-05-04T19:35:17.256557916Z [Thu May 04 19:35:17.256477 2023] [mpm_prefork:notice] [pid 1] AH00170: caught SIGWINCH, shutting down gracefully

2023-05-04T19:35:19.196870295Z AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.24.0.2. Set the 'ServerName' directive globally to suppress this message

2023-05-04T19:35:19.221117177Z AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.24.0.2. Set the 'ServerName' directive globally to suppress this message

2023-05-04T19:35:19.252571410Z [Thu May 04 19:35:19.252421 2023] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.56 (Debian) PHP/8.1.18 configured -- resuming normal operations

2023-05-04T19:35:19.252597901Z [Thu May 04 19:35:19.252473 2023] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'

2023-05-04T19:35:41.689299514Z 172.24.0.1 - - [04/May/2023:19:35:41 +0000] "GET / HTTP/1.1" 500 702 "-" "Mozilla/5.0 (Windows NT 10.0; rv:111.0) Gecko/20100101 Firefox/111.0"

2023-05-04T19:35:41.907298384Z 172.24.0.1 - - [04/May/2023:19:35:41 +0000] "GET /favicon.ico HTTP/1.1" 500 702 "-" "Mozilla/5.0 (Windows NT 10.0; rv:111.0) Gecko/20100101 Firefox/111.0"

2023-05-04T19:37:43.065080132Z 172.24.0.1 - Sabi [04/May/2023:19:37:42 +0000] "PROPFIND /remote.php/dav/files/Sabi/ HTTP/1.1" 500 702 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.24.1"

2023-05-04T19:42:53.699454607Z 172.24.0.1 - - [04/May/2023:19:42:53 +0000] "GET / HTTP/1.1" 500 702 "-" "Mozilla/5.0 (Windows NT 10.0; rv:111.0) Gecko/20100101 Firefox/111.0"

after that restarted both containers, but that didn’t help either. I am clueless

I also use portainer and also sometimes have problems with it…
Even when it does not look like a db problem, could you try to enter the ip address of the db instead of the name, please?
And you could also increase the log level to have a better understanding whats going on.

1 Like

hello @Huddeij please recover your system from backup and follow official upgrade procedure: GitHub - nextcloud/docker: ⛴ Docker image of Nextcloud I would not recommend using external upgrade tools as you completely loose control of the upgrade process. and please never ever use :latest docker tag as long you want avoid issues!

Blockquote
Even when it does not look like a db problem, could you try to enter the ip address of the db instead of the name, please?

That helped! I put in the ip address instead of ‘db’ in config.php,
in the row ‘dbhost’ =>
and restarted both containers and it works again!

Thank you very much ^^