Internal Server Error Redis? - Solved

[/details]

Nextcloud version (eg, 20.0.5): 20.0.8
Operating system and version (eg, Ubuntu 20.04): Debian 10 buster
Apache or nginx version (eg, Apache 2.4.25): Apache2.4.38
PHP version (eg, 7.4): 7.4.16

The issue you are facing:
Internal Server Error

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

1.apt dist-upgrade

The output of your Nextcloud log in Admin > Logging:

{"reqId":"dHCi18dcllimcfHujUCc","level":1,"time":"2021-03-23T13:10:01+00:00","remoteAddr":"","user":"--","app":"cli","method":"","url":"--","message":"Memcache \\OC\\Memcache\\Redis not available for distributed cache","userAgent":"--","version":"20.0.8.1"}
{"reqId":"dHCi18dcllimcfHujUCc","level":1,"time":"2021-03-23T13:10:01+00:00","remoteAddr":"","user":"--","app":"passwords","method":"","url":"--","message":"Passwords runs /var/www/html/nextcloud/cron.php in global mode","userAgent":"--","version":"20.0.8.1"}
{"reqId":"KkiSh0pFnYAyOMdOImXk","level":1,"time":"2021-03-23T13:10:19+00:00","remoteAddr":"","user":"--","app":"cli","method":"","url":"--","message":"Memcache \\OC\\Memcache\\Redis not available for local cache","userAgent":"--","version":"20.0.8.1"}
{"reqId":"KkiSh0pFnYAyOMdOImXk","level":1,"time":"2021-03-23T13:10:19+00:00","remoteAddr":"","user":"--","app":"cli","method":"","url":"--","message":"Memcache \\OC\\Memcache\\Redis not available for distributed cache","userAgent":"--","version":"20.0.8.1"}
{"reqId":"KkiSh0pFnYAyOMdOImXk","level":1,"time":"2021-03-23T13:10:20+00:00","remoteAddr":"","user":"--","app":"passwords","method":"","url":"--","message":"Passwords runs occ in global mode","userAgent":"--","version":"20.0.8.1"}
{"reqId":"qOhRctiG1bAFBVVBFE6o","level":1,"time":"2021-03-23T13:10:45+00:00","remoteAddr":"","user":"--","app":"cli","method":"","url":"--","message":"Memcache \\OC\\Memcache\\Redis not available for local cache","userAgent":"--","version":"20.0.8.1"}
{"reqId":"qOhRctiG1bAFBVVBFE6o","level":1,"time":"2021-03-23T13:10:45+00:00","remoteAddr":"","user":"--","app":"cli","method":"","url":"--","message":"Memcache \\OC\\Memcache\\Redis not available for distributed cache","userAgent":"--","version":"20.0.8.1"}
{"reqId":"qOhRctiG1bAFBVVBFE6o","level":1,"time":"2021-03-23T13:10:46+00:00","remoteAddr":"","user":"--","app":"passwords","method":"","url":"--","message":"Passwords runs occ in global mode","userAgent":"--","version":"20.0.8.1"}
{"reqId":"G9hcolumWnSpupsy13BX","level":1,"time":"2021-03-23T13:15:01+00:00","remoteAddr":"","user":"--","app":"cli","method":"","url":"--","message":"Memcache \\OC\\Memcache\\Redis not available for local cache","userAgent":"--","version":"20.0.8.1"}
{"reqId":"G9hcolumWnSpupsy13BX","level":1,"time":"2021-03-23T13:15:01+00:00","remoteAddr":"","user":"--","app":"cli","method":"","url":"--","message":"Memcache \\OC\\Memcache\\Redis not available for distributed cache","userAgent":"--","version":"20.0.8.1"}
{"reqId":"G9hcolumWnSpupsy13BX","level":1,"time":"2021-03-23T13:15:01+00:00","remoteAddr":"","user":"--","app":"passwords","method":"","url":"--","message":"Passwords runs /var/www/html/nextcloud/cron.php in global mode","userAgent":"--","version":"20.0.8.1"}
{"reqId":"tKhRMNorT2vpZ8rmgHCP","level":1,"time":"2021-03-23T13:20:01+00:00","remoteAddr":"","user":"--","app":"cli","method":"","url":"--","message":"Memcache \\OC\\Memcache\\Redis not available for local cache","userAgent":"--","version":"20.0.8.1"}
{"reqId":"tKhRMNorT2vpZ8rmgHCP","level":1,"time":"2021-03-23T13:20:01+00:00","remoteAddr":"","user":"--","app":"cli","method":"","url":"--","message":"Memcache \\OC\\Memcache\\Redis not available for distributed cache","userAgent":"--","version":"20.0.8.1"}
{"reqId":"tKhRMNorT2vpZ8rmgHCP","level":1,"time":"2021-03-23T13:20:01+00:00","remoteAddr":"","user":"--","app":"spreed","method":"","url":"--","message":"Checked if Matterbridge instances are running correctly.","userAgent":"--","version":"20.0.8.1"}
{"reqId":"tKhRMNorT2vpZ8rmgHCP","level":1,"time":"2021-03-23T13:20:01+00:00","remoteAddr":"","user":"--","app":"passwords","method":"","url":"--","message":"Passwords runs /var/www/html/nextcloud/cron.php in global mode","userAgent":"--","version":"20.0.8.1"}
{"reqId":"8trHX1iaGHRHTrHFESXk","level":1,"time":"2021-03-23T13:25:01+00:00","remoteAddr":"","user":"--","app":"cli","method":"","url":"--","message":"Memcache \\OC\\Memcache\\Redis not available for local cache","userAgent":"--","version":"20.0.8.1"}
{"reqId":"8trHX1iaGHRHTrHFESXk","level":1,"time":"2021-03-23T13:25:01+00:00","remoteAddr":"","user":"--","app":"cli","method":"","url":"--","message":"Memcache \\OC\\Memcache\\Redis not available for distributed cache","userAgent":"--","version":"20.0.8.1"}

PASTE HERE

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

PASTE HERE
<?php
$CONFIG = array (
  'instanceid' => 'XXXXXX',
  'passwordsalt' => 'XXXXXX',
  'secret' => 'XXXXXX',
  'trusted_domains' => 
  array (
    0 => 'XXXXXX',
  ),
  'datadirectory' => '/var/www/html/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '20.0.8.1',
  'overwrite.cli.url' => 'http://XXXXXX/nextcloud',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => 'XXXXXX',
  'installed' => true,
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'ssl',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'XXXXXX',
  'mail_domain' => 'XXXXXX',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtphost' => 'XXXXXX',
  'mail_smtpport' => '465',
  'mail_smtpauth' => 1,
  'mail_smtpname' => 'XXXXXX',
  'mail_smtppassword' => 'XXXXXX',
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 1,
  'sharing.interal_shares_accepted' => true,
  'integrity.check.disabled' => true,
  'redis' => 
  array (
    'host' => 'localhost',
    'port' => 6379,
  ),
);


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

PASTE HERE

[Tue Mar 23 00:00:01.797260 2021] [core:notice] [pid 2892] AH00094: Command line: '/usr/sbin/apache2'
[Tue Mar 23 04:07:58.214824 2021] [php7:error] [pid 4685] [client 45.146.165.157:42748] script '/var/www/html/index.php' not found or unable to stat
[Tue Mar 23 04:51:13.701524 2021] [php7:error] [pid 4685] [client 83.135.90.43:40333] PHP Fatal error:  Uncaught OC\\HintException: [0]: Memcache \\OC\\Memcache\\Redis not available for local cache (Is the matching PHP module installed and enabled?)\n\n  thrown in /var/www/html/nextcloud/lib/private/Memcache/Factory.php on line 98
[Tue Mar 23 08:25:00.837865 2021] [php7:error] [pid 4739] [client 83.135.90.43:39391] PHP Fatal error:  Uncaught OC\\HintException: [0]: Memcache \\OC\\Memcache\\Redis not available for local cache (Is the matching PHP module installed and enabled?)\n\n  thrown in /var/www/html/nextcloud/lib/private/Memcache/Factory.php on line 98
[Tue Mar 23 11:27:10.152628 2021] [mpm_prefork:notice] [pid 2892] AH00169: caught SIGTERM, shutting down
[Tue Mar 23 11:27:10.256796 2021] [mpm_prefork:notice] [pid 19197] AH00163: Apache/2.4.38 (Debian) OpenSSL/1.1.1d configured -- resuming normal operations
[Tue Mar 23 11:27:10.256856 2021] [core:notice] [pid 19197] AH00094: Command line: '/usr/sbin/apache2'
[Tue Mar 23 11:27:55.626127 2021] [mpm_prefork:notice] [pid 19197] AH00169: caught SIGTERM, shutting down
[Tue Mar 23 11:27:55.734339 2021] [mpm_prefork:notice] [pid 19701] AH00163: Apache/2.4.38 (Debian) OpenSSL/1.1.1d configured -- resuming normal operations
[Tue Mar 23 11:27:55.734413 2021] [core:notice] [pid 19701] AH00094: Command line: '/usr/sbin/apache2'
[Tue Mar 23 12:26:27.258161 2021] [php7:error] [pid 19708] [client 178.62.35.96:40178] script '/var/www/html/wp-login.php' not found or unable to stat
[Tue Mar 23 12:43:18.436799 2021] [mpm_prefork:notice] [pid 19701] AH00169: caught SIGTERM, shutting down
[Tue Mar 23 12:43:18.527288 2021] [mpm_prefork:notice] [pid 20821] AH00163: Apache/2.4.38 (Debian) OpenSSL/1.1.1d configured -- resuming normal operations
[Tue Mar 23 12:43:18.527333 2021] [core:notice] [pid 20821] AH00094: Command line: '/usr/sbin/apache2'
[Tue Mar 23 12:46:12.465276 2021] [mpm_prefork:notice] [pid 20821] AH00171: Graceful restart requested, doing restart
[Tue Mar 23 12:46:12.498117 2021] [mpm_prefork:notice] [pid 20821] AH00163: Apache/2.4.38 (Debian) OpenSSL/1.1.1d configured -- resuming normal operations
[Tue Mar 23 12:46:12.498138 2021] [core:notice] [pid 20821] AH00094: Command line: '/usr/sbin/apache2'
[Tue Mar 23 13:51:38.458574 2021] [mpm_prefork:notice] [pid 20821] AH00169: caught SIGTERM, shutting down
[Tue Mar 23 13:51:38.541819 2021] [mpm_prefork:notice] [pid 22194] AH00163: Apache/2.4.38 (Debian) OpenSSL/1.1.1d configured -- resuming normal operations
[Tue Mar 23 13:51:38.541862 2021] [core:notice] [pid 22194] AH00094: Command line: '/usr/sbin/apache2'
[Tue Mar 23 13:59:54.732679 2021] [mpm_prefork:notice] [pid 22194] AH00171: Graceful restart requested, doing restart
[Tue Mar 23 13:59:54.758859 2021] [mpm_prefork:notice] [pid 22194] AH00163: Apache/2.4.38 (Debian) OpenSSL/1.1.1d configured -- resuming normal operations
[Tue Mar 23 13:59:54.758879 2021] [core:notice] [pid 22194] AH00094: Command line: '/usr/sbin/apache2'
[Tue Mar 23 14:05:40.329032 2021] [mpm_prefork:notice] [pid 22194] AH00171: Graceful restart requested, doing restart
[Tue Mar 23 14:05:40.356670 2021] [mpm_prefork:notice] [pid 22194] AH00163: Apache/2.4.38 (Debian) OpenSSL/1.1.1d configured -- resuming normal operations
[Tue Mar 23 14:05:40.356689 2021] [core:notice] [pid 22194] AH00094: Command line: '/usr/sbin/apache2'



I tried to reinstall redis but i can make it work.. 
Any hints?

Is Redis running? What is the output of:
sudo systemctl status redis-server

and:

(type as root from CLI): redis-cli -h 127.0.0.1 -p 6379 -a <your-redis-password>

(The Redis console should show) redis 127.0.0.1:6379>
Type: PING
The answer should be: PONG

If above is TRUE, correct your entry for Redis inside NC’s conf-file:

  'redis' => 
  array (
    'host' => '127.0.0.1',
    'port' => 6379,
    'timeout' => 0,
    'password' => '<your-redis-password>',
    'dbindex' => 0,
  ),
2 Likes

Thank you. That might be a part of the problem.
Redis is not found.

I reinstalled it for the third time. Now it is working!

Glad to hear that you got it sorted out and found a solution to the problem you’ve encountered :+1:t4:

1 Like