Nextcloud version (eg, 20.0.5): ‘23’
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04
Apache or nginx version (eg, Apache 2.4.25): nginx 1.21.5
PHP version (eg, 7.4): 8.0.14
The issue you are facing:
Nextcloud inaccessible with internal server error 500 every time the host is rebooted for any reason. It started some time when the containers were all in earlier versions and has persisted until now. Most recently, I rebooted while expanding LVM. It occasionally seems to start working again after a reboot or docker-compose up for no reason I can tell. I haven’t been able to get much information from logs. Apologies and thank you in advance, I’m very new to docker, proxies, and NC. I’m not even sure the logs I’m providing are right…
Is this the first time you’ve seen this error? (Y/N): N
Steps to replicate it:
- Reboot Server
Nextcloud log:
sudo docker logs nextcloud-app
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.18.0.5. Set the 'ServerName' directive globally to suppress this message
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.18.0.5. Set the 'ServerName' directive globally to suppress this message
[Fri Dec 31 22:21:20.143397 2021] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.51 (Debian) PHP/8.0.14 configured -- resuming normal operations
[Fri Dec 31 22:21:20.143420 2021] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
[Fri Dec 31 22:25:55.546887 2021] [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.18.0.5. Set the 'ServerName' directive globally to suppress this message
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.18.0.5. Set the 'ServerName' directive globally to suppress this message
[Fri Dec 31 22:26:39.802918 2021] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.51 (Debian) PHP/8.0.14 configured -- resuming normal operations
[Fri Dec 31 22:26:39.802939 2021] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
[Fri Dec 31 22:39:48.694182 2021] [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.18.0.5. Set the 'ServerName' directive globally to suppress this message
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.18.0.5. Set the 'ServerName' directive globally to suppress this message
[Fri Dec 31 22:40:32.317318 2021] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.51 (Debian) PHP/8.0.14 configured -- resuming normal operations
[Fri Dec 31 22:40:32.317431 2021] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
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' => 'oc8b0f2fhqxu',
'passwordsalt' => 'salt',
'secret' => 'secret',
'trusted_domains' =>
array (
0 => 'lan ip:port',
1 => 'nextcloud.example.com',
2 => 'localhost',
),
'datadirectory' => '/var/www/html/data',
'dbtype' => 'mysql',
'version' => '22.0.0.11',
'overwrite.cli.url' => 'https://nextcloud.example.com',
'overwritehost' => 'nextcloud.example.com',
'overwriteprotocol' => 'https',
'dbname' => 'nextcloud',
'dbhost' => 'db',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'user',
'dbpassword' => 'secret',
'installed' => true,
'mail_from_address' => 'me',
'mail_smtpmode' => 'smtp',
'mail_sendmailmode' => 'smtp',
'mail_domain' => 'example.com',
'mail_smtpsecure' => 'ssl',
'mail_smtpauthtype' => 'LOGIN',
'mail_smtpauth' => 1,
'mail_smtphost' => 'smtp.email.com',
'mail_smtpname' => 'me@example.com',
'mail_smtppassword' => ' secret',
'twofactor_enforced' => 'true',
'twofactor_enforced_groups' =>
array (
),
'twofactor_enforced_excluded_groups' =>
array (
),
'mail_smtpport' => 'smtpport',
'mail_smtpstreamoptions' =>
array (
'ssl' =>
array (
'allow_self_signed' => true,
'verify_peer' => false,
'verify_peer_name' => false,
),
),
'maintenance' => false,
'filelocking.enabled' => false,
'updater.secret' => 'secret',
);
nginx container:
Warning: A custom dhparam.pem file was provided. Best practice is to use standardized RFC7919 DHE groups instead.
forego | starting dockergen.1 on port 5000
forego | starting nginx.1 on port 5100
nginx.1 | 2021/12/31 22:40:31 [notice] 19#19: using the "epoll" event method
nginx.1 | 2021/12/31 22:40:31 [notice] 19#19: nginx/1.21.5
nginx.1 | 2021/12/31 22:40:31 [notice] 19#19: built by gcc 10.3.1 20211027 (Alpine 10.3.1_git20211027)
nginx.1 | 2021/12/31 22:40:31 [notice] 19#19: OS: Linux 5.4.0-91-generic
nginx.1 | 2021/12/31 22:40:31 [notice] 19#19: getrlimit(RLIMIT_NOFILE): 1048576:1048576
nginx.1 | 2021/12/31 22:40:31 [notice] 19#19: start worker processes
nginx.1 | 2021/12/31 22:40:31 [notice] 19#19: start worker process 24
nginx.1 | 2021/12/31 22:40:31 [notice] 19#19: start worker process 25
dockergen.1 | 2021/12/31 22:40:31 Contents of /etc/nginx/conf.d/default.conf did not change. Skipping notification 'nginx -s reload'
dockergen.1 | 2021/12/31 22:40:31 Watching docker events
dockergen.1 | 2021/12/31 22:40:31 Contents of /etc/nginx/conf.d/default.conf did not change. Skipping notification 'nginx -s reload'
nginx.1 | 2021/12/31 22:40:32 [notice] 19#19: signal 1 (SIGHUP) received from 28, reconfiguring
nginx.1 | 2021/12/31 22:40:32 [notice] 19#19: reconfiguring
nginx.1 | 2021/12/31 22:40:32 [notice] 19#19: using the "epoll" event method
nginx.1 | 2021/12/31 22:40:32 [notice] 19#19: start worker processes
nginx.1 | 2021/12/31 22:40:32 [notice] 19#19: start worker process 41
nginx.1 | 2021/12/31 22:40:32 [notice] 19#19: start worker process 42
nginx.1 | 2021/12/31 22:40:32 [notice] 24#24: gracefully shutting down
nginx.1 | 2021/12/31 22:40:32 [notice] 24#24: exiting
nginx.1 | 2021/12/31 22:40:32 [notice] 24#24: exit
nginx.1 | 2021/12/31 22:40:32 [notice] 25#25: gracefully shutting down
nginx.1 | 2021/12/31 22:40:32 [notice] 25#25: exiting
nginx.1 | 2021/12/31 22:40:32 [notice] 25#25: exit
nginx.1 | 2021/12/31 22:40:32 [notice] 19#19: signal 17 (SIGCHLD) received from 25
nginx.1 | 2021/12/31 22:40:32 [notice] 19#19: worker process 25 exited with code 0
nginx.1 | 2021/12/31 22:40:32 [notice] 19#19: signal 29 (SIGIO) received
nginx.1 | 2021/12/31 22:40:32 [notice] 19#19: signal 17 (SIGCHLD) received from 24
nginx.1 | 2021/12/31 22:40:32 [notice] 19#19: worker process 24 exited with code 0
nginx.1 | 2021/12/31 22:40:32 [notice] 19#19: signal 29 (SIGIO) received
nginx.1 | 2021/12/31 22:40:32 [notice] 19#19: signal 1 (SIGHUP) received from 43, reconfiguring
nginx.1 | 2021/12/31 22:40:32 [notice] 19#19: reconfiguring
nginx.1 | 2021/12/31 22:40:32 [notice] 19#19: using the "epoll" event method
nginx.1 | 2021/12/31 22:40:32 [notice] 19#19: start worker processes
nginx.1 | 2021/12/31 22:40:32 [notice] 19#19: start worker process 55
nginx.1 | 2021/12/31 22:40:32 [notice] 19#19: start worker process 56
nginx.1 | 2021/12/31 22:40:32 [notice] 42#42: gracefully shutting down
nginx.1 | 2021/12/31 22:40:32 [notice] 41#41: gracefully shutting down
nginx.1 | 2021/12/31 22:40:32 [notice] 41#41: exiting
nginx.1 | 2021/12/31 22:40:32 [notice] 42#42: exiting
nginx.1 | 2021/12/31 22:40:32 [notice] 41#41: exit
nginx.1 | 2021/12/31 22:40:32 [notice] 42#42: exit
nginx.1 | 2021/12/31 22:40:32 [notice] 19#19: signal 17 (SIGCHLD) received from 42
nginx.1 | 2021/12/31 22:40:32 [notice] 19#19: worker process 42 exited with code 0
nginx.1 | 2021/12/31 22:40:32 [notice] 19#19: signal 29 (SIGIO) received
nginx.1 | 2021/12/31 22:40:32 [notice] 19#19: signal 17 (SIGCHLD) received from 41
nginx.1 | 2021/12/31 22:40:32 [notice] 19#19: worker process 41 exited with code 0
nginx.1 | 2021/12/31 22:40:32 [notice] 19#19: signal 29 (SIGIO) received
nginx.1 | nextcloud.example.com LANIP - - [31/Dec/2021:22:50:55 +0000] "GET / HTTP/2.0" 500 177 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0" "-"
(more 500's like above)