Redis not detected

Support intro

Installed Redis on server, configured nextcloud to use it, its appears not to be able to detect it.

Nextcloud version _ 24.0.4
Operating system and version Ubuntu 22.04.1 LTS
Apache or nginx version Apache/2.4.54 (Ubuntu) nginx/1.23.1
PHP version 8.1

The issue you are facing:

Redis is installed and working, however NextCloud doesn’t seem to see it:
No memory cache has been configured. To enhance performance, please configure a memcache, if available. Further information can be found in the documentation :arrow_upper_right:.
Is this the first time you’ve seen this error? (Y/N):Y

Steps to replicate it:

  1. Install Redis Server + PHP Modules

  2. Configure nextcloud using:
    ‘filelocking.enabled’ => true,
    ‘memcache.distributed’ => ‘\OC\Memcache\Redis’,
    ‘redis’ =>
    array (
    ‘host’ => ‘127.0.0.1’,
    ‘port’ => 6379,
    ‘timeout’ => 0.0,
    ),

The output of your Nextcloud log in Admin > Logging:

N/A

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

<?php
$CONFIG = array (
  'instanceid' => 'oc90bsw751tp',
  'passwordsalt' => 'YUHdvrw4qKNakI03IV8iLQq2OlFygi',
  'secret' => 'mP4RpfSGe7pemmLLvxYaFzAVlLbyECE1fwtKH4rECJdHq8tm',
  'trusted_domains' => 
  array (
    0 => '',
  ),
  'datadirectory' => '/public_html/data',
  'dbtype' => 'mysql',
  'version' => '24.0.4.1',
  'overwrite.cli.url' => '',
  'dbname' => '',
  'dbhost' => 'localhost:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => '',
  'dbpassword' => '',
  'installed' => true,
  'mail_from_address' => 'nextcloud',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => '',
  'mail_smtpsecure' => 'tls',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => '',
  'mail_smtpport' => '587',
  'mail_smtpname' => '',
  'mail_smtppassword' => '',
  'default_phone_region' => '3166-2:US',
  'updater.secret' => '',
  'filelocking.enabled' => true,
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '127.0.0.1',
    'port' => 6379,
    'timeout' => 0.0,
  ),
  'loglevel' => 2,
  'maintenance' => false,
);

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

NA

NA


Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

PASTE HERE

Is your redis server running on a tcp port or a unix socket? Check the config in /etc/redis/redis.conf. In my redis.conf, I have a unix socket:

port 0
unixsocket /var/run/redis/redis-server.sock
unixsocketperm 760

And in my nextcloud config:

‘redis’ =>
array (
‘host’ => ‘/var/run/redis/redis-server.sock’,
‘port’ => 0,
‘timeout’ => 1.5,
‘password’ => ‘secret’,
),

TCP port will also work, but you need the same settings in both files.

Btw, is your trusted_domains array really empty? This is unrelated, but I guess that can cause problems too.