[Solved] Configuration memory caching breaks NC to display WebUI

Hi,
I want to apply the recommendations for memory caching documented here.

Therefore I installed packages

php7-apcu-5.1.12-r1
php7-redis-4.1.1-r0

and added this to config.php:

'memcache.local' => '\OC\Memcache\APCu',
'memcache.locking' => '\OC\Memcache\Redis',
 'redis' => array(
      'host' => 'localhost',
      'port' => 6379,
       ),

This is logged in nextcloud.log:

{"reqId":"fjpoZKC4jO71U0V1pPLJ","level":3,"time":"2018-10-13T10:11:19+00:00","remoteAddr":"192.168.1.60","user":"admin","app":"index","method":"GET","url":"\/settings\/admin\/overview","message":{"Exception":"RedisException","Message":"Connection refused","Code":0,"Trace":[{"file":"\/var\/www\/nextcloud\/lib\/private\/RedisFactory.php","line":84,"function":"connect","class":"Redis","type":"->","args":["localhost",6379,0]},{"file":"\/var\/www\/nextcloud\/lib\/private\/RedisFactory.php","line":100,"function":"create","class":"OC\\RedisFactory","type":"->","args":[]},{"file":"\/var\/www\/nextcloud\/lib\/private\/Memcache\/Redis.php","line":42,"function":"getInstance","class":"OC\\RedisFactory","type":"->","args":[]},{"file":"\/var\/www\/nextcloud\/lib\/private\/Memcache\/Factory.php","line":136,"function":"__construct","class":"OC\\Memcache\\Redis","type":"->","args":["3f6dd8e2683b7700c5cb8515b159fe41\/lock"]},{"file":"\/var\/www\/nextcloud\/lib\/private\/Server.php","line":849,"function":"createLocking","class":"OC\\Memcache\\Factory","type":"->","args":["lock"]},{"file":"\/var\/www\/nextcloud\/3rdparty\/pimple\/pimple\/src\/Pimple\/Container.php","line":118,"function":"OC\\{closure}","class":"OC\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"\/var\/www\/nextcloud\/lib\/private\/AppFramework\/Utility\/SimpleContainer.php","line":117,"function":"offsetGet","class":"Pimple\\Container","type":"->","args":["OCP\\Lock\\ILockingProvider"]},{"file":"\/var\/www\/nextcloud\/lib\/private\/ServerContainer.php","line":132,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["OCP\\Lock\\ILockingProvider"]},{"file":"\/var\/www\/nextcloud\/lib\/private\/AppFramework\/Utility\/SimpleContainer.php","line":165,"function":"query","class":"OC\\ServerContainer","type":"->","args":["OCP\\Lock\\ILockingProvider"]},{"file":"\/var\/www\/nextcloud\/3rdparty\/pimple\/pimple\/src\/Pimple\/Container.php","line":114,"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"\/var\/www\/nextcloud\/lib\/private\/AppFramework\/Utility\/SimpleContainer.php","line":117,"function":"offsetGet","class":"Pimple\\Container","type":"->","args":["LockingProvider"]},{"file":"\/var\/www\/nextcloud\/lib\/private\/ServerContainer.php","line":132,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["LockingProvider"]},{"file":"\/var\/www\/nextcloud\/lib\/private\/Server.php","line":1784,"function":"query","class":"OC\\ServerContainer","type":"->","args":["LockingProvider"]},{"file":"\/var\/www\/nextcloud\/lib\/private\/Files\/View.php","line":115,"function":"getLockingProvider","class":"OC\\Server","type":"->","args":[]},{"file":"\/var\/www\/nextcloud\/lib\/private\/Server.php","line":214,"function":"__construct","class":"OC\\Files\\View","type":"->","args":[]},{"file":"\/var\/www\/nextcloud\/3rdparty\/pimple\/pimple\/src\/Pimple\/Container.php","line":118,"function":"OC\\{closure}","class":"OC\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"\/var\/www\/nextcloud\/lib\/private\/AppFramework\/Utility\/SimpleContainer.php","line":117,"function":"offsetGet","class":"Pimple\\Container","type":"->","args":["EncryptionManager"]},{"file":"\/var\/www\/nextcloud\/lib\/private\/ServerContainer.php","line":132,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["EncryptionManager"]},{"file":"\/var\/www\/nextcloud\/lib\/private\/Server.php","line":1257,"function":"query","class":"OC\\ServerContainer","type":"->","args":["EncryptionManager"]},{"file":"\/var\/www\/nextcloud\/lib\/base.php","line":845,"function":"getEncryptionManager","class":"OC\\Server","type":"->","args":[]},{"file":"\/var\/www\/nextcloud\/lib\/base.php","line":730,"function":"registerEncryptionWrapper","class":"OC","type":"::","args":[]},{"file":"\/var\/www\/nextcloud\/lib\/base.php","line":1068,"function":"init","class":"OC","type":"::","args":[]},{"file":"\/var\/www\/nextcloud\/index.php","line":40,"args":["\/var\/www\/nextcloud\/lib\/base.php"],"function":"require_once"}],"File":"\/var\/www\/nextcloud\/lib\/private\/RedisFactory.php","Line":84,"CustomMessage":"--"},"userAgent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/69.0.3497.100 Safari\/537.36","version":"14.0.3.0"}

What is causing this error?

I have this configuration in my config for NC 14.0.3:

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

Works fine, and is also recommended in the docu you mentioned.

I fixed the issue. There was one package missing on my server.

However, NC is not working when redis is configured to listen on an Unix socket:

{"reqId":"73fsH6ZLgPduVwN61Wf3","level":3,"time":"2018-10-13T12:28:24+00:00","remoteAddr":"192.168.1.60","user":"admin","app":"index","method":"GET","url":"\/settings\/admin\/overview","message":{"Exception":"RedisException","Message":"Permission denied","Code":0,"Trace":[{"file":"\/var\/www\/nextcloud\/lib\/private\/RedisFactory.php","line":84,"function":"connect","class":"Redis","type":"->","args":["\/run\/redis\/redis.sock",0,0]},{"file":"\/var\/www\/nextcloud\/lib\/private\/RedisFactory.php","line":100,"function":"create","class":"OC\\RedisFactory","type":"->","args":[]},{"file":"\/var\/www\/nextcloud\/lib\/private\/Memcache\/Redis.php","line":42,"function":"getInstance","class":"OC\\RedisFactory","type":"->","args":[]},{"file":"\/var\/www\/nextcloud\/lib\/private\/Memcache\/Factory.php","line":136,"function":"__construct","class":"OC\\Memcache\\Redis","type":"->","args":["3f6dd8e2683b7700c5cb8515b159fe41\/lock"]},{"file":"\/var\/www\/nextcloud\/lib\/private\/Server.php","line":849,"function":"createLocking","class":"OC\\Memcache\\Factory","type":"->","args":["lock"]},{"file":"\/var\/www\/nextcloud\/3rdparty\/pimple\/pimple\/src\/Pimple\/Container.php","line":118,"function":"OC\\{closure}","class":"OC\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"\/var\/www\/nextcloud\/lib\/private\/AppFramework\/Utility\/SimpleContainer.php","line":117,"function":"offsetGet","class":"Pimple\\Container","type":"->","args":["OCP\\Lock\\ILockingProvider"]},{"file":"\/var\/www\/nextcloud\/lib\/private\/ServerContainer.php","line":132,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["OCP\\Lock\\ILockingProvider"]},{"file":"\/var\/www\/nextcloud\/lib\/private\/AppFramework\/Utility\/SimpleContainer.php","line":165,"function":"query","class":"OC\\ServerContainer","type":"->","args":["OCP\\Lock\\ILockingProvider"]},{"file":"\/var\/www\/nextcloud\/3rdparty\/pimple\/pimple\/src\/Pimple\/Container.php","line":114,"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"\/var\/www\/nextcloud\/lib\/private\/AppFramework\/Utility\/SimpleContainer.php","line":117,"function":"offsetGet","class":"Pimple\\Container","type":"->","args":["LockingProvider"]},{"file":"\/var\/www\/nextcloud\/lib\/private\/ServerContainer.php","line":132,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["LockingProvider"]},{"file":"\/var\/www\/nextcloud\/lib\/private\/Server.php","line":1784,"function":"query","class":"OC\\ServerContainer","type":"->","args":["LockingProvider"]},{"file":"\/var\/www\/nextcloud\/lib\/private\/Files\/View.php","line":115,"function":"getLockingProvider","class":"OC\\Server","type":"->","args":[]},{"file":"\/var\/www\/nextcloud\/lib\/private\/Server.php","line":214,"function":"__construct","class":"OC\\Files\\View","type":"->","args":[]},{"file":"\/var\/www\/nextcloud\/3rdparty\/pimple\/pimple\/src\/Pimple\/Container.php","line":118,"function":"OC\\{closure}","class":"OC\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"\/var\/www\/nextcloud\/lib\/private\/AppFramework\/Utility\/SimpleContainer.php","line":117,"function":"offsetGet","class":"Pimple\\Container","type":"->","args":["EncryptionManager"]},{"file":"\/var\/www\/nextcloud\/lib\/private\/ServerContainer.php","line":132,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["EncryptionManager"]},{"file":"\/var\/www\/nextcloud\/lib\/private\/Server.php","line":1257,"function":"query","class":"OC\\ServerContainer","type":"->","args":["EncryptionManager"]},{"file":"\/var\/www\/nextcloud\/lib\/base.php","line":845,"function":"getEncryptionManager","class":"OC\\Server","type":"->","args":[]},{"file":"\/var\/www\/nextcloud\/lib\/base.php","line":730,"function":"registerEncryptionWrapper","class":"OC","type":"::","args":[]},{"file":"\/var\/www\/nextcloud\/lib\/base.php","line":1068,"function":"init","class":"OC","type":"::","args":[]},{"file":"\/var\/www\/nextcloud\/index.php","line":40,"args":["\/var\/www\/nextcloud\/lib\/base.php"],"function":"require_once"}],"File":"\/var\/www\/nextcloud\/lib\/private\/RedisFactory.php","Line":84,"CustomMessage":"--"},"userAgent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/69.0.3497.100 Safari\/537.36","version":"14.0.3.0"}

This is the config.php used:

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

Add HTTP-user (e.g. www-data) to group “redis”.