Nextcloud version: 17.0.1 (As per Version.php $OC_VersionString = ‘17.0.1’; )
Operating system and version: Ubuntu 19.10
Apache: Apache/2.4.41 (Ubuntu)
PHP version (eg, 7.1): 7.2.24
Note (phpinfo(); shows Ubuntu 19.04 even though I have now updated it to 19.10)
The issue you are facing:
I updated my NextCloud instance to latest version and also updated my Ubuntu from 19.04 to 19.10.
Post that update I faced “Internal Server Error” when trying to visit my Nextcloud instance from Browser. After much of searching online, I realised that it was something to do with my Caching. So I disabled redis caching that was on my nextcloud/config/Config.php
‘memcache.local’ => ‘\OC\Memcache\Redis’,
‘memcache.distributed’ => ‘\OC\Memcache\Redis’,
‘memcache.locking’ => ‘\OC\Memcache\Redis’,
‘redis’ => [
‘host’ => ‘localhost’,
‘port’ => 6379,
],
Then my website was loading properly.
I then proceeded to reconfigure my memcache based on documentation provided here https://docs.nextcloud.com/server/15/admin_manual/configuration_server/caching_configuration.html
However, I was getting the same error “Internal Server Error” again. So I decided to just use APCU. So i reconfigured my config.php to this
// ‘memcache.local’ => ‘\OC\Memcache\Redis’,
//‘memcache.distributed’ => ‘\OC\Memcache\Redis’,
//‘memcache.locking’ => ‘\OC\Memcache\Redis’,
//‘redis’ => [
// ‘host’ => ‘localhost’,
// ‘port’ => 6379,
//],
//Above lines (redis memcache) are commented for testing APCu below
//
‘memcache.local’ => ‘\OC\Memcache\APCu’,
However, the error persisted. So I removed all the lines including the commented ones.
Now my config file looks like this
<?php
$CONFIG = array (
'instanceid' => 'CONFIDENTIAL',
'passwordsalt' => 'CONFIDENTIAL',
'secret' => 'CONFIDENTIAL',
'trusted_domains' =>
array (
0 => 'INTERNAL-IP',
1 => 'cloud.mihirsolanki.in',
),
'datadirectory' => '/home/mhrsolanki2020/SolankiCloudData/',
'dbtype' => 'mysql',
'version' => '17.0.1.1',
'overwrite.cli.url' => 'http://cloud.mihirsolanki.in/SolankiCloud',
'dbname' => 'CONFIDENTIAL',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'CONFIDENTIAL',
'mysql.utf8mb4' => true,
'dbuser' => 'CONFIDENTIAL',
'dbpassword' => 'CONFIDENTIAL',
'installed' => true,
'htaccess.RewriteBase' => '/',
'twofactor_enforced' => 'false',
'twofactor_enforced_groups' =>
array (
0 => 'admin',
),
'twofactor_enforced_excluded_groups' =>
array (
),
'mail_smtpmode' => 'smtp',
'mail_smtpsecure' => 'ssl',
'mail_sendmailmode' => 'smtp',
'mail_from_address' => 'CONFIDENTIAL',
'mail_domain' => 'mihirsolanki.in',
'mail_smtpauthtype' => 'LOGIN',
'mail_smtpauth' => 1,
'mail_smtphost' => 'CONFIDENTIAL',
'mail_smtpport' => 'CONFIDENTIAL',
'mail_smtpname' => 'CONFIDENTIAL',
'mail_smtppassword' => 'CONFIDENTIAL',
'maintenance' => false,
'updater.secret' => 'CONFIDENTIAL',
'theme' => '',
'loglevel' => 2,
);
Now after deleting those lines, the webpage is just blank.
Is this the first time you’ve seen this error? (Y/N): Yes
Steps to replicate it:
- Update ubuntu from 19.04 to 19.10
- Update NextCloud to latest version
- Try accessing NextCloud from Broswer
The output of your Nextcloud log in Admin > Logging:
Logging is 'loglevel' => 2
(According to https://docs.nextcloud.com/server/17/admin_manual/configuration_server/logging_configuration.html it is at "WARN" level)
The output of your Apache/var/log/apache2
:
How i Extracted the logs :`
Step1: I stopped the apache server
Step 2: I moved these 3 files to a backup folder
1. errors.log
2. access.log
3. other_vhosts_access.log
Step 3: I started my apache server
Step 4: I accessed my website (nextcloud instance)
Step 5: Stopped my apache server
Step 6: Copied the three log files
errors.log
[Sat Nov 30 13:25:32.423013 2019] [mpm_prefork:notice] [pid 3949] AH00163: Apache/2.4.41 (Ubuntu) OpenSSL/1.1.1c configured -- resuming normal operations
[Sat Nov 30 13:25:32.423190 2019] [core:notice] [pid 3949] AH00094: Command line: '/usr/sbin/apache2'
[Sat Nov 30 13:25:41.672934 2019] [mpm_prefork:notice] [pid 3949] AH00169: caught SIGTERM, shutting down
access.log
EMPTY
other_vhosts_access.log
cloud.mihirsolanki.in:443 183.87.41.84 - - [30/Nov/2019:13:25:38 +0530] "GET / HTTP/1.1" 500 4179 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:70.0) Gecko/20100101 Firefox/70.0"
Update 1:
As suggested by j-ed in the answer below, I tried enabling the redis cache again by inserting the following lines in my code
'memcache.local' => '\OC\Memcache\APCu',
'memcache.distributed' => '\OC\Memcache\Redis',
'memcache.locking' => '\OC\Memcache\Redis',
'redis' => [
'host' => 'localhost',
'port' => 6379,
],
However, there are no changes in logs. I am getting the same logs as noted above.