'memcache.local' => '\OC\Memcache\Redis', throws misconfiguration

Hi

I am trying to use Redis and memcache instead of apcu because I suspect apcu is responsible for all the

php7.1 [core:notice] AH00052: child pid exit signal Segmentation fault

errors I have been getting which renders my server offline. So I want to try my caching without it

This works at least I think it does

 'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '/var/run/redis/redis-server.sock',
    'port' => 0,
  ),
  'cache_path' => '/var/www/nextcloud/data/usercache',

but if I add this line as recommended by the documentation about caching

'memcache.local' => '\OC\Memcache\Redis',

I get

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.


ps ax | grep redis
   8555 ?        Ssl    0:00 /usr/bin/redis-server 127.0.0.1:0


Server Version: Apache/2.4.34 (Debian) OpenSSL/1.1.0h mod_wsgi/4.5.17 Python/2.7

PHP Version 7.1.20-1

Hi,

When you use redis in socket mode (/var/run/redis/redis-server.sock), then only one “connection” is possible. That means, that you can either use

‘memcache.locking’ => ‘\OC\Memcache\Redis’,

OR

‘memcache.local’ => ‘\OC\Memcache\Redis’,

If you want to try Redis for both, you need to switch to TCP mode with a defined port. That can and needs to be changed in the redis.conf.

Please keep in mind to change the following settings in the nextcloud config.php accordingly afterwards:

array (
    'host' => '/var/run/redis/redis-server.sock',
    'port' => 0,
  ),

Thanks, that makes sense, I wish this info was in the doc :frowning: The reason I am using the the socket is that the tcp did not work, not sure why.

Also I just deleted other lines and I am keeping this only

'memcache.local' => '\\OC\\Memcache\\Redis', 

I still get the misconfiguration error :frowning:

Maybe ‘memcache.local’ => ‘\OC\Memcache\Redis’, does not work with socket at all?

You can use both locking and local on the same unix socket. I just updated a script for Debian that I wrote that does this. Ideally you run a socket for each instance as Redis does not thread like some other caches do. In practice I have not seen this necessary as of yet.

If you post your config.php (remove passwords) maybe we can help you out. This is part of my config.php. It works very well.

),
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'filelocking.enabled' => true,
  'redis' =>
  array (
    'host' => '/var/run/redis/redis.sock',
    'port' => 0,
    'timeout' => 0.0,
    'password' => 'i_removed_my_password_from_here',
  ),
2 Likes

Thanks for the reply.

Redis conf
https://paste.debian.net/hidden/a21b115b/

Nextcloud config

$CONFIG = array (                                                                                                                                                                           
    'instanceid' => 'xxxxxxxx',                                                                                                                                                          
    'passwordsalt' => 'xxxx',                                                                                                                                       
    'datadirectory' => '/media/drive/nextcloud/data',                                                                                                                                      
    'dbtype' => 'mysql',                                                                                                                                                                      
    'dbname' => 'nextcloud',                                                                                                                                                                 
    'dbuser' => 'xxxx',                                                                                                                                                                     
    'dbpassword' => 'xxx',                                                                                                                                                       
    'dbhost' => 'localhost:3306',                                                                                                                                                             
    'dbtableprefix' => 'oc_',                                                                                                                                                                 
    'version' => '13.0.5.2',                                                                                                                                                                  
    'installed' => true,                                                                                                                                                                      
    'maxZipInputSize' => 0,                                                                                                                                                                   
    'allowZipDownload' => true,                                                                                                                                                               
    'theme' => '',                                                                                                                                                                            
    'maintenance' => false,                                                                                                                                                                   
         /*'memcache.local' => '\\OC\\Memcache\\APCu',*/                                                                                                                                           
        /*'memcache.local' => '\\OC\\Memcache\\Redis',*/ 
    'forcessl' => true,                                                                                                                                                                       
    'memcache.locking' => '\\OC\\Memcache\\Redis',                                                                                                                                            
    'redis' =>                                                                                                                                                                                
    array (                                                                                                                                                                                   
      'host' => '/var/run/redis/redis-server.sock',                                                                                                                                           
      'port' => 0,                                                                                                                                                                            
    ),                                                                                                                                                                                        
    'cache_path' => '/var/www/nextcloud/data/usercache',                                                                                                                                      
    'trusted_domains' =>                                                                                                                                                                      
    'loglevel' => 0,                                                                                                                                                                          
    'mail_smtpmode' => 'php',                                                                                                                                                                 
    'mail_smtpname' => 'xxxx',                                                                                                                                                            
    'secret' => 'xxxxxxxx',                                                                                                                           
    'trashbin_retention_obligation' => 'auto',                                                                                                                                                
    'overwrite.cli.url' => 'https://xxxxxxxxxxx/xxxx',                                                                                                                          
    'ldapIgnoreNamingRules' => false,                                                                                                                                                         
    'ldapProviderFactory' => '\\OCA\\User_LDAP\\LDAPProviderFactory',                                                                                                                         
    'updater.release.channel' => 'stable',                                                                                                                                                    
    'preview_libreoffice_path' => '/usr/bin/libreoffice',                                                                                                                                     
    'enable_previews' => true,                                                                                                                                                                
  );

Looking a little closer I see you are segfaulting. It also looks like you are using Debian experimental/testing (Sid/Buster). Errors like this are expected in those branches.

You can try connecting to your redis socket like sudo redis-cli -s /var/run/redis/redis.sock then typing “info” just to see whats up with Redis. Does not look like you are protecting that socket with a password.

You might want to try ls /var/run/redis/ and see if your socket is really called “redis-server.sock” Mine is called redis.sock and change the config.php to reflect the correct name.

1 Like

redis-server.sock exists and it is the one used in the nc config

please see the results, I am not much of a dev type so I do not know if all this loook good or not

redis-cli -s /var/run/redis/redis-server.sock

https://paste.debian.net/hidden/e1a8dad9/

Redis seems to be fine. Your cloud does not look like it is using it though. Just to make sure Redis is really working lets try it out.

redis-cli -s /var/run/redis/redis.sock
set whatup “Not sure what to say here...boo”
get whatup

If that returns the msg your Redis it working. Can delete that key with

del whatup

You can even benchmark your Redis with something like

redis-benchmark -n 1000000 -t set,get -P 16 -s /var/run/redis/redis.sock

If that all works out we need to bridge NextCloud with Redis. Let me know how the above works out for you.

2 Likes

Set, get and delete works.

Here is the benchmark

redis-benchmark -n 1000000 -t set,get -P 16 -s /var/run/redis/redis-server.sock 
====== SET ======
  1000000 requests completed in 1.34 seconds
  50 parallel clients
  3 bytes payload
  keep alive: 1

58.19% <= 1 milliseconds
99.76% <= 2 milliseconds
100.00% <= 2 milliseconds
745156.50 requests per second

====== GET ======
  1000000 requests completed in 1.10 seconds
  50 parallel clients
  3 bytes payload
  keep alive: 1

89.56% <= 1 milliseconds
99.92% <= 2 milliseconds
100.00% <= 2 milliseconds
907441.00 requests per second

Its working all right! Gotta love that speed! Should not be to hard to get sorted but I really need to get some sleep first. Had about 1k LOC of code to write tonight and now its about 3am @.@. In the mean time you can try backing up your original config.php and replacing the relevant part to

),
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'filelocking.enabled' => true,
  'redis' =>
  array (
    'host' => '/var/run/redis/redis.sock',
    'port' => 0,
    'timeout' => 0.0,
  ),

Also might want to look at the logs under /var/log/redis/redis-server.log and look for errors or warnings. in the meantime.

—You can most likely disregard this post, see the post below—

Thank you so much for all this help. Please get a rest. I appreciate your help. I am not a dev so it ishard to wrap my head around this.

same error after pasting your conf lines in to NC conf :frowning:

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 webserver log.

Redis works (with the redis.sock, I changed it in the conf)

32157:M 20 Aug 20:42:00.523 * DB loaded from disk: 0.000 seconds
32157:M 20 Aug 20:42:00.523 * The server is now ready to accept connections at /var/run/redis/redis.sock

I am using the exact like you pasted in your post above.

edit: apache error was bogus I think, must be a syntax.

nextcloud.log, there might be something here but hard to read :frowning:

ework\\\\Utility\\\\SimpleContainer->query('AppManager')\\n#17 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Server.php(1684): OC\\\\ServerContainer->query('AppManager')\\n#18 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/legacy\\\/app.php(332): OC\\\\Server->getAppManager()\\n#19 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/legacy\\\/app.php(113): OC_App::getEnabledApps()\\n#20 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/base.php(662): OC_App::loadApps(Array)\\n#21 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/base.php(1081): OC::init()\\n#22 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/status.php(36): require_once('\\\/media\\\/DRIVE\\\/...')\\n#23 {main}\",\"File\":\"\\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Memcache\\\/Factory.php\",\"Line\":97,\"Hint\":\"Is the matching PHP module installed and enabled?\"}","userAgent":"Mozilla\/5.0 (Linux) mirall\/2.3.3 (Nextcloud)","version":"13.0.5.2"}
{"reqId":"FGyePRDBx5WAuioDzHYI","level":3,"time":"2018-08-21T01:53:10+00:00","remoteAddr":"192.168.5.113","user":"--","app":"remote","method":"GET","url":"\/NCPRIV\/status.php","message":"Exception: {\"Exception\":\"OC\\\\HintException\",\"Message\":\"Memcache \\\\OC\\\\Memcache\\\\Redis not available for local cache\",\"Code\":0,\"Trace\":\"#0 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Server.php(503): OC\\\\Memcache\\\\Factory->__construct('c67d4d2e6c3824e...', Object(OC\\\\Log), '\\\\\\\\OC\\\\\\\\Memcache\\\\\\\\Re...', '\\\\\\\\OC\\\\\\\\Memcache\\\\\\\\Re...', '\\\\\\\\OC\\\\\\\\Memcache\\\\\\\\Re...')\\n#1 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/pimple\\\/pimple\\\/src\\\/Pimple\\\/Container.php(113): OC\\\\Server->OC\\\\{closure}(*** sensitive parameters replaced ***)\\n#2 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/AppFramework\\\/Utility\\\/SimpleContainer.php(116): Pimple\\\\Container->offsetGet('OC\\\\\\\\Memcache\\\\\\\\Fac...')\\n#3 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/ServerContainer.php(132): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->query('OC\\\\\\\\Memcache\\\\\\\\Fac...')\\n#4 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/AppFramework\\\/Utility\\\/SimpleContainer.php(164): OC\\\\ServerContainer->query('OC\\\\\\\\Memcache\\\\\\\\Fac...')\\n#5 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/pimple\\\/pimple\\\/src\\\/Pimple\\\/Container.php(109): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->OC\\\\AppFramework\\\\Utility\\\\{closure}(*** sensitive parameters replaced ***)\\n#6 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/AppFramework\\\/Utility\\\/SimpleContainer.php(116): Pimple\\\\Container->offsetGet('MemCacheFactory')\\n#7 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/ServerContainer.php(132): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->query('MemCacheFactory')\\n#8 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Server.php(1492): OC\\\\ServerContainer->query('MemCacheFactory')\\n#9 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Server.php(691): OC\\\\Server->getMemCacheFactory()\\n#10 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/pimple\\\/pimple\\\/src\\\/Pimple\\\/Container.php(113): OC\\\\Server->OC\\\\{closure}(*** sensitive parameters replaced ***)\\n#11 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/AppFramework\\\/Utility\\\/SimpleContainer.php(116): Pimple\\\\Container->offsetGet('OC\\\\\\\\App\\\\\\\\AppManag...')\\n#12 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/ServerContainer.php(132): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->query('OC\\\\\\\\App\\\\\\\\AppManag...')\\n#13 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/AppFramework\\\/Utility\\\/SimpleContainer.php(164): OC\\\\ServerContainer->query('OC\\\\\\\\App\\\\\\\\AppManag...')\\n#14 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/pimple\\\/pimple\\\/src\\\/Pimple\\\/Container.php(109): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->OC\\\\AppFramework\\\\Utility\\\\{closure}(*** sensitive parameters replaced ***)\\n#15 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/AppFramework\\\/Utility\\\/SimpleContainer.php(116): Pimple\\\\Container->offsetGet('AppManager')\\n#16 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/ServerContainer.php(132): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->query('AppManager')\\n#17 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Server.php(1684): OC\\\\ServerContainer->query('AppManager')\\n#18 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/legacy\\\/app.php(332): OC\\\\Server->getAppManager()\\n#19 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/legacy\\\/app.php(113): OC_App::getEnabledApps()\\n#20 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/base.php(662): OC_App::loadApps(Array)\\n#21 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/base.php(1081): OC::init()\\n#22 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/status.php(36): require_once('\\\/media\\\/DRIVE\\\/...')\\n#23 {main}\",\"File\":\"\\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Memcache\\\/Factory.php\",\"Line\":97,\"Hint\":\"Is the matching PHP module installed and enabled?\"}","userAgent":"Mozilla\/5.0 (Linux) mirall\/2.3.3 (Nextcloud)","version":"13.0.5.2"}
{"reqId":"HhJ9bW2483QGhCaY9NF0","level":3,"time":"2018-08-21T01:53:15+00:00","remoteAddr":"192.168.5.106","user":"--","app":"remote","method":"GET","url":"\/NCPRIV\/status.php","message":"Exception: {\"Exception\":\"OC\\\\HintException\",\"Message\":\"Memcache \\\\OC\\\\Memcache\\\\Redis not available for local cache\",\"Code\":0,\"Trace\":\"#0 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Server.php(503): OC\\\\Memcache\\\\Factory->__construct('c67d4d2e6c3824e...', Object(OC\\\\Log), '\\\\\\\\OC\\\\\\\\Memcache\\\\\\\\Re...', '\\\\\\\\OC\\\\\\\\Memcache\\\\\\\\Re...', '\\\\\\\\OC\\\\\\\\Memcache\\\\\\\\Re...')\\n#1 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/pimple\\\/pimple\\\/src\\\/Pimple\\\/Container.php(113): OC\\\\Server->OC\\\\{closure}(*** sensitive parameters replaced ***)\\n#2 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/AppFramework\\\/Utility\\\/SimpleContainer.php(116): Pimple\\\\Container->offsetGet('OC\\\\\\\\Memcache\\\\\\\\Fac...')\\n#3 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/ServerContainer.php(132): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->query('OC\\\\\\\\Memcache\\\\\\\\Fac...')\\n#4 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/AppFramework\\\/Utility\\\/SimpleContainer.php(164): OC\\\\ServerContainer->query('OC\\\\\\\\Memcache\\\\\\\\Fac...')\\n#5 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/pimple\\\/pimple\\\/src\\\/Pimple\\\/Container.php(109): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->OC\\\\AppFramework\\\\Utility\\\\{closure}(*** sensitive parameters replaced ***)\\n#6 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/AppFramework\\\/Utility\\\/SimpleContainer.php(116): Pimple\\\\Container->offsetGet('MemCacheFactory')\\n#7 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/ServerContainer.php(132): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->query('MemCacheFactory')\\n#8 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Server.php(1492): OC\\\\ServerContainer->query('MemCacheFactory')\\n#9 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Server.php(691): OC\\\\Server->getMemCacheFactory()\\n#10 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/pimple\\\/pimple\\\/src\\\/Pimple\\\/Container.php(113): OC\\\\Server->OC\\\\{closure}(*** sensitive parameters replaced ***)\\n#11 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/AppFramework\\\/Utility\\\/SimpleContainer.php(116): Pimple\\\\Container->offsetGet('OC\\\\\\\\App\\\\\\\\AppManag...')\\n#12 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/ServerContainer.php(132): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->query('OC\\\\\\\\App\\\\\\\\AppManag...')\\n#13 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/AppFramework\\\/Utility\\\/SimpleContainer.php(164): OC\\\\ServerContainer->query('OC\\\\\\\\App\\\\\\\\AppManag...')\\n#14 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/pimple\\\/pimple\\\/src\\\/Pimple\\\/Container.php(109): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->OC\\\\AppFramework\\\\Utility\\\\{closure}(*** sensitive parameters replaced ***)\\n#15 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/AppFramework\\\/Utility\\\/SimpleContainer.php(116): Pimple\\\\Container->offsetGet('AppManager')\\n#16 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/ServerContainer.php(132): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->query('AppManager')\\n#17 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Server.php(1684): OC\\\\ServerContainer->query('AppManager')\\n#18 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/legacy\\\/app.php(332): OC\\\\Server->getAppManager()\\n#19 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/legacy\\\/app.php(113): OC_App::getEnabledApps()\\n#20 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/base.php(662): OC_App::loadApps(Array)\\n#21 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/base.php(1081): OC::init()\\n#22 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/status.php(36): require_once('\\\/media\\\/DRIVE\\\/...')\\n#23 {main}\",\"File\":\"\\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Memcache\\\/Factory.php\",\"Line\":97,\"Hint\":\"Is the matching PHP module installed and enabled?\"}","userAgent":"Mozilla\/5.0 (Linux) mirall\/2.3.3 (Nextcloud)","version":"13.0.5.2"}

and this maybe? I think maybe my issue is with memcache rather than redis? I have php-memcache installed :frowning:

{"reqId":"Tyrl5MQZbR2nttizoaZK","level":3,"time":"2018-08-21T02:09:15+00:00","remoteAddr":"192.168.5.106","user":"--","app":"remote","method":"GET","url":"\/NCPRIV\/status.php","message":"Exception: {\"Exception\":\"OC\\\\HintException\",\"Message\":\"Memcache \\\\OC\\\\Memcache\\\\Redis not available for local cache\",\"Code\":0,\"Trace\":\"#0 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Server.php(503): OC\\\\Memcache\\\\Factory->__construct('c67d4d2e6c3824e...', Object(OC\\\\Log), '\\\\\\\\OC\\\\\\\\Memcache\\\\\\\\Re...', '\\\\\\\\OC\\\\\\\\Memcache\\\\\\\\Re...', '\\\\\\\\OC\\\\\\\\Memcache\\\\\\\\Re...')\\n#1 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/pimple\\\/pimple\\\/src\\\/Pimple\\\/Container.php(113): OC\\\\Server->OC\\\\{closure}(*** sensitive parameters replaced ***)\\n#2 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/AppFramework\\\/Utility\\\/SimpleContainer.php(116): Pimple\\\\Container->offsetGet('OC\\\\\\\\Memcache\\\\\\\\Fac...')\\n#3 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/ServerContainer.php(132): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->query('OC\\\\\\\\Memcache\\\\\\\\Fac...')\\n#4 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/AppFramework\\\/Utility\\\/SimpleContainer.php(164): OC\\\\ServerContainer->query('OC\\\\\\\\Memcache\\\\\\\\Fac...')\\n#5 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/pimple\\\/pimple\\\/src\\\/Pimple\\\/Container.php(109): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->OC\\\\AppFramework\\\\Utility\\\\{closure}(*** sensitive parameters replaced ***)\\n#6 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/AppFramework\\\/Utility\\\/SimpleContainer.php(116): Pimple\\\\Container->offsetGet('MemCacheFactory')\\n#7 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/ServerContainer.php(132): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->query('MemCacheFactory')\\n#8 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Server.php(1492): OC\\\\ServerContainer->query('MemCacheFactory')\\n#9 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Server.php(691): OC\\\\Server->getMemCacheFactory()\\n#10 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/pimple\\\/pimple\\\/src\\\/Pimple\\\/Container.php(113): OC\\\\Server->OC\\\\{closure}(*** sensitive parameters replaced ***)\\n#11 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/AppFramework\\\/Utility\\\/SimpleContainer.php(116): Pimple\\\\Container->offsetGet('OC\\\\\\\\App\\\\\\\\AppManag...')\\n#12 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/ServerContainer.php(132): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->query('OC\\\\\\\\App\\\\\\\\AppManag...')\\n#13 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/AppFramework\\\/Utility\\\/SimpleContainer.php(164): OC\\\\ServerContainer->query('OC\\\\\\\\App\\\\\\\\AppManag...')\\n#14 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/pimple\\\/pimple\\\/src\\\/Pimple\\\/Container.php(109): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->OC\\\\AppFramework\\\\Utility\\\\{closure}(*** sensitive parameters replaced ***)\\n#15 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/AppFramework\\\/Utility\\\/SimpleContainer.php(116): Pimple\\\\Container->offsetGet('AppManager')\\n#16 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/ServerContainer.php(132): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->query('AppManager')\\n#17 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Server.php(1684): OC\\\\ServerContainer->query('AppManager')\\n#18 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/legacy\\\/app.php(332): OC\\\\Server->getAppManager()\\n#19 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/legacy\\\/app.php(113): OC_App::getEnabledApps()\\n#20 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/base.php(662): OC_App::loadApps(Array)\\n#21 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/base.php(1081): OC::init()\\n#22 \\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/status.php(36): require_once('\\\/media\\\/DRIVE\\\/...')\\n#23 {main}\",\"File\":\"\\\/media\\\/DRIVE\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Memcache\\\/Factory.php\",\"Line\":97,\"Hint\":\"Is the matching PHP module installed and enabled?\"}","userAgent":"Mozilla\/5.0 (Linux) mirall\/2.3.3 (Nextcloud)","version":"13.0.5.2"}

And here is from phpinfo

memcache

memcache support enabled
Version 3.0.9-dev
Revision $Revision$
Directive Local Value Master Value
memcache.allow_failover 1 1
memcache.chunk_size 32768 32768
memcache.compress_threshold 20000 20000
memcache.default_port 11211 11211
memcache.hash_function crc32 crc32
memcache.hash_strategy consistent consistent
memcache.lock_timeout 15 15
memcache.max_failover_attempts 20 20
memcache.protocol ascii ascii
memcache.redundancy 1 1
memcache.session_redundancy 2 2

Ok I think I got it, meaning that the lines from @onryo does not give me internal errror page anymore. I think I was missing the php redis extension :frowning:

This page helped me, in case someone else has the same issue.
https://serverpilot.io/docs/how-to-install-the-php-redis-extension

Now how can I test that it works with Nextcloud?

Also I still seem to have some issues with memcache/redis see the log below

edit: I can get rid of PHP Startup: Unable to load dynamic library '\/usr\/lib\/php\/20160303\/memcached.so by commenting out the memcache.so in the php.ini but I cant find a way to address Memcache \\OC\\Memcache\\Redis not available for local cache",

{“reqId”:“xSum3j2NOI0NawGI8xy8”,“level”:3,“time”:“2018-08-21T02:32:29+00:00”,“remoteAddr”:“192.168.5.113”,“user”:“USER”,“app”:“PHP”,“method”:“PROPFIND”,“url”:"/NEXTCLOUD/remote.php/dav/files/USER/",“message”:“PHP Startup: Unable to load dynamic library ‘/usr/lib/php/20160303/memcached.so’ - /usr/lib/php/20160303/memcached.so: undefined symbol: php_json_decode_ex at Unknown#0”,“userAgent”:“Mozilla/5.0 (Linux) mirall/2.3.3 (Nextcloud)”,“version”:“13.0.5.2”}

{“reqId”:“xOEa3YRI9RAITJjetpH6”,“level”:1,“time”:“2018-08-21T02:32:30+00:00”,“remoteAddr”:"",“user”:"–",“app”:“cli”,“method”:"–",“url”:"–",“message”:“Memcache \OC\Memcache\Redis not available for local cache”,“userAgent”:"–",“version”:“13.0.5.2”}

{“reqId”:“xOEa3YRI9RAITJjetpH6”,“level”:1,“time”:“2018-08-21T02:32:30+00:00”,“remoteAddr”:"",“user”:"–",“app”:“cli”,“method”:"–",“url”:"–",“message”:“Memcache \OC\Memcache\Redis not available for distributed cache”,“userAgent”:"–",“version”:“13.0.5.2”}

{“reqId”:“xOEa3YRI9RAITJjetpH6”,“level”:1,“time”:“2018-08-21T02:32:31+00:00”,“remoteAddr”:"",“user”:"–",“app”:“admin_audit”,“method”:"–",“url”:"–",“message”:“Console command executed: preview:generate-all -vvv”,“userAgent”:"–",“version”:“13.0.5.2”}

{“reqId”:“rTnBVF5wV8iAISJEsNsF”,“level”:3,“time”:“2018-08-21T02:32:32+00:00”,“remoteAddr”:“192.168.1.110”,“user”:“USER”,“app”:“PHP”,“method”:“PROPFIND”,“url”:"/NEXTCLOUD/remote.php/dav/files/USER/",“message”:“PHP Startup: Unable to load dynamic library ‘/usr/lib/php/20160303/memcached.so’ - /usr/lib/php/20160303/memcached.so: undefined symbol: php_json_decode_ex at Unknown#0”,“userAgent”:“Mozilla/5.0 (Linux) mirall/2.3.3 (Nextcloud)”,“version”:“13.0.5.2”}

{“reqId”:“zk076ZQXIPIlxcqHFMqX”,“level”:3,“time”:“2018-08-21T02:32:32+00:00”,“remoteAddr”:“192.168.5.113”,“user”:“USER”,“app”:“PHP”,“method”:“GET”,“url”:"/NEXTCLOUD/ocs/v2.php/apps/notifications/api/v2/notifications",“message”:“PHP Startup: Unable to load dynamic library ‘/usr/lib/php/20160303/memcached.so’ - /usr/lib/php/20160303/memcached.so: undefined symbol: php_json_decode_ex at Unknown#0”,“userAgent”:“Mozilla/5.0 (X11; Linux x86_64; rv:56.0) Gecko/20100101 Firefox/56.0”,“version”:“13.0.5.2”}

If you want to test that your Redis cache is actually working with your cloud you can use the cmd “monitor”

redis-cli -s /var/run/redis/redis.sock
monitor

Now you will see live what is going on. Just do something with nextcloud and you will see the cache working.

Since both Redis and Memcached are both written in C using both at the same time might result in segfaults.

Test if Redis, Memecached or both are loaded.

php -m |grep 'redis\|mem'

Hopefully only Redis shows up. If you don’t see Redis then we enable it. In

/etc/php/7.0/mods-available/redis.ini
you should have

extension=redis.so

If it is not there then add it. If memcached is enabled you should be able to disable it with

phpdismod memcached

Restart everything just be be sure.

2 Likes

Hi

Thanks for te reply

Redis monitor seems to be showing activities. Does it show activities for the locking and local cache? Since one of my main issue was trying to enable the local cache for Nextcloud using Redis.

Here is the issue for

php -m |grep 'redis\|mem'
PHP 7.2.8-2 (cli) (built: Aug  2 2018 04:09:06) ( NTS )

My php cli is not what apache uses which is 7.1.2 I do not know how I can fix that. So the result is, maybe not trustable?

php -m |grep 'redis\|mem'
memcache
memcached

This exists for 7.0 but not for 7.1. Shall I add it to 7.1 as well? I actually added extension=redis.so to 7.1/apache/php.ini and cli/php.ini, not sure if I did it the wrong way.

/etc/php/7.0/mods-available/redis.ini
you should have

extension=redis.so

“monitor” will show all activity. By looking at the sets and gets you should be able to see what it what.

Do you see Redis here?

php -r "print_r(get_loaded_extensions());"

Adding stuff to the php.ini works but things can get sloppy. A better idea is to add

extension=redis.so
to
/etc/php/7.1/mods-available/redis.ini

and remove any reference to 7.0. I suspect that you have both memcache and memcached as one was automatically added to

/etc/php/7.x/mods-available/memcached

when you installed it and the other was something you might have added to the php.ini. Try to disable them with

phpdismod name_of_extensions_to_disable

then deleting any references of memcached you might have manually made.

Hi @onryo

I’m following this thread very curiously and learned a lot. I always thought I use redis for file locking already and wanted to optimize my server a bit with your suggestions and with your debian script (which you posted in another thread).
Now I learned and got surprised that my redis server is not used by Nextcloud. I missed the php module for redis and started to perform the steps I missed so far. Unfortunately Nextcloud stops working and throws an error message as well, as soon as I enable the redis php module and have redis configured for file locking in the nc config.php.

Maybe you can advise how to solve that issue - hopefully.

My config.php:

  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => '/var/lib/redis/redis.sock',
    'port' => 0,
    'timeout' => 0.0,
    'password' => '<mypw>',
  ),

Web server user added to redis group:

redis:x:995:http

redis.sock permissions:

# ll /var/lib/redis/
total 4.0K
drwx------  2 redis http  40 Aug 21 21:17 .
drwxr-xr-x 23 root  root 331 Aug 21 00:00 ..
-rw-r--r--  1 redis http  93 Aug 21 21:17 dump.rdb
srwxrwx---  1 redis http   0 Aug 21 21:17 redis.sock

open_basedir in the php.ini is configured accordingly to allow access to the redis socket.

And now I have the following error message in nextcloud.log:

{"reqId":"D...A","level":3,"time":"2018-08-21T20:53:54+02:00","remoteAddr":"192.168.1.10","user":"--","app":"core","method":"GET","url":"\/apps\/files\/?dir=\/&fileid=17","message":"Exception: {\"Exception\":\"RedisException\",\"Message\":\"Redis server went away\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Memcache\\\/Redis.php(103): Redis->setnx('612bb2973660487...', 0)\\n#1 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Lock\\\/MemcacheLockingProvider.php(77): OC\\\\Memcache\\\\Redis->add('files\\\/b58fb0ae5...', 0)\\n#2 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Files\\\/Storage\\\/Common.php(709): OC\\\\Lock\\\\MemcacheLockingProvider->acquireLock('files\\\/b58fb0ae5...', 2)\\n#3 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Wrapper.php(592): OC\\\\Files\\\\Storage\\\\Common->acquireLock('scanner::appdat...', 2, Object(OC\\\\Lock\\\\MemcacheLockingProvider))\\n#4 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Wrapper.php(592): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Wrapper->acquireLock('scanner::appdat...', 2, Object(OC\\\\Lock\\\\MemcacheLockingProvider))\\n#5 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Wrapper.php(592): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Wrapper->acquireLock('scanner::appdat...', 2, Object(OC\\\\Lock\\\\MemcacheLockingProvider))\\n#6 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Files\\\/Cache\\\/Scanner.php(331): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Wrapper->acquireLock('scanner::appdat...', 2, Object(OC\\\\Lock\\\\MemcacheLockingProvider))\\n#7 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Files\\\/View.php(1326): OC\\\\Files\\\\Cache\\\\Scanner->scan('appdata_oc4679w...', false)\\n#8 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Files\\\/View.php(1369): OC\\\\Files\\\\View->getCacheEntry(Object(OCA\\\\FilesAccessControl\\\\StorageWrapper), 'appdata_oc4679w...', '\\\/appdata_oc4679...')\\n#9 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Files\\\/Node\\\/Root.php(198): OC\\\\Files\\\\View->getFileInfo('\\\/appdata_oc4679...')\\n#10 [internal function]: OC\\\\Files\\\\Node\\\\Root->get('\\\/appdata_oc4679...')\\n#11 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Files\\\/Node\\\/LazyRoot.php(64): call_user_func_array(Array, Array)\\n#12 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Files\\\/Node\\\/LazyRoot.php(141): OC\\\\Files\\\\Node\\\\LazyRoot->__call('get', Array)\\n#13 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Files\\\/AppData\\\/AppData.php(79): OC\\\\Files\\\\Node\\\\LazyRoot->get('appdata_oc4679w...')\\n#14 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Files\\\/AppData\\\/AppData.php(105): OC\\\\Files\\\\AppData\\\\AppData->getAppDataFolder()\\n#15 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Template\\\/JSCombiner.php(94): OC\\\\Files\\\\AppData\\\\AppData->getFolder('core')\\n#16 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Template\\\/JSResourceLocator.php(113): OC\\\\Template\\\\JSCombiner->process('\\\/var\\\/www\\\/nextcl...', 'core\\\/js\\\/merged-...', 'core')\\n#17 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Template\\\/JSResourceLocator.php(69): OC\\\\Template\\\\JSResourceLocator->cacheAndAppendCombineJsonIfExist('\\\/var\\\/www\\\/nextcl...', 'core\\\/js\\\/merged-...')\\n#18 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Template\\\/ResourceLocator.php(78): OC\\\\Template\\\\JSResourceLocator->doFind('js\\\/merged-templ...')\\n#19 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/TemplateLayout.php(306): OC\\\\Template\\\\ResourceLocator->find(Array)\\n#20 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/TemplateLayout.php(146): OC\\\\TemplateLayout::findJavascriptFiles(Array)\\n#21 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/legacy\\\/template.php(207): OC\\\\TemplateLayout->__construct('error', '')\\n#22 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Template\\\/Base.php(132): OC_Template->fetchPage()\\n#23 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/legacy\\\/template.php(351): OC\\\\Template\\\\Base->printPage()\\n#24 \\\/var\\\/www\\\/nextcloud\\\/index.php(70): OC_Template::printExceptionErrorPage(Object(OCP\\\\AppFramework\\\\QueryException))\\n#25 {main}\",\"File\":\"\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Memcache\\\/Redis.php\",\"Line\":103}","userAgent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko\/20100101 Firefox\/61.0","version":"13.0.5.2"}
{"reqId":"xy...b","level":3,"time":"2018-08-21T20:54:11+02:00","remoteAddr":"192.168.1.10","user":"--","app":"remote","method":"GET","url":"\/status.php","message":"Exception: {\"Exception\":\"OCP\\\\AppFramework\\\\QueryException\",\"Message\":\"Could not resolve clientService! Class clientService does not exist\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/AppFramework\\\/Utility\\\/SimpleContainer.php(118): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->resolve('clientService')\\n#1 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/ServerContainer.php(132): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->query('clientService')\\n#2 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/AppFramework\\\/Utility\\\/SimpleContainer.php(74): OC\\\\ServerContainer->query('clientService')\\n#3 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/AppFramework\\\/Utility\\\/SimpleContainer.php(97): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->buildClass(Object(ReflectionClass))\\n#4 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/AppFramework\\\/Utility\\\/SimpleContainer.php(118): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->resolve('OC\\\\\\\\App\\\\\\\\AppStore...')\\n#5 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/ServerContainer.php(132): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->query('OC\\\\\\\\App\\\\\\\\AppStore...')\\n#6 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Server.php(1472): OC\\\\ServerContainer->query('OC\\\\\\\\App\\\\\\\\AppStore...')\\n#7 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/Server.php(1143): OC\\\\Server->getAppFetcher()\\n#8 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/pimple\\\/pimple\\\/src\\\/Pimple\\\/Container.php(113): OC\\\\Server->OC\\\\{closure}(*** sensitive parameters replaced ***)\\n#9 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/AppFramework\\\/Utility\\\/SimpleContainer.php(116): Pimple\\\\Container->offsetGet('OC\\\\\\\\Installer')\\n#10 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/ServerContainer.php(132): OC\\\\AppFramework\\\\Utility\\\\SimpleContainer->query('OC\\\\\\\\Installer')\\n#11 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/legacy\\\/util.php(734): OC\\\\ServerContainer->query('OC\\\\\\\\Installer')\\n#12 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/base.php(675): OC_Util::checkServer(Object(OC\\\\SystemConfig))\\n#13 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/base.php(1081): OC::init()\\n#14 \\\/var\\\/www\\\/nextcloud\\\/status.php(36): require_once('\\\/var\\\/www\\\/nextcl...')\\n#15 {main}\",\"File\":\"\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/AppFramework\\\/Utility\\\/SimpleContainer.php\",\"Line\":103}","userAgent":"Mozilla\/5.0 (Windows) mirall\/2.3.3 (build 1) (Nextcloud)","version":"13.0.5.2"}


Edit:
The problem is solved. It took me days to figure out that the redis.sock should not be placed in the directory /var/lib/redis.
The webserver process just can’t read and access the file there. After moving the file to /var/run/redis and adapting the ownership (drwxr-xr-x 2 redis redis 60 Aug 25 02:16 redis), NC was finally able to access and use redis.

I won’t delete this post here, in case somebody has the same issue and stumbles across this thread.
Sorry for the noise anyway.

此错误是因为没有安装phpredis模块,安装下扩展模块就可以了
安装文档:https://blog.jinchuang.org/1469.html

安装完添加此参数:config.php

‘memcache.local’ => ‘\OC\Memcache\Redis’,
‘redis’ =>
array (
‘host’ => ‘127.0.0.1’,
‘port’ => 6379,
‘dbindex’ => 1,
‘timeout’ => 1.5,
),