When configured according to documentation a Redis unix socket with NC 24.03 throws internal server error:
https://docs.nextcloud.com/server/stable/admin_manual/configuration_server/caching_configuration.html
https://docs.nextcloud.com/server/stable/admin_manual/configuration_files/files_locking_transactional.html?highlight=redis
All troubleshooting related to this prior thread on Redis Unix Socket (php8.0) attempted:
1.) The redis socket exists:
# ls -lh /var/run/redis
total 4.0K
-rw-rw---- 1 redis redis 5 Jul 30 16:47 redis-server.pid
srwxrwxr-x 1 redis redis 0 Jul 30 16:47 redis.sock
2.) php-redis module has been enabled:
$ php --ri redis
redis
Redis Support => enabled
Redis Version => 5.3.7
Redis Sentinel Version => 0.1
Available serializers => php, json, igbinary
Available compression => lzf, zstd, lz4
Directive => Local Value => Master Value
redis.arrays.algorithm => no value => no value
redis.arrays.auth => no value => no value
redis.arrays.autorehash => 0 => 0
redis.arrays.connecttimeout => 0 => 0
redis.arrays.distributor => no value => no value
redis.arrays.functions => no value => no value
redis.arrays.hosts => no value => no value
redis.arrays.index => 0 => 0
redis.arrays.lazyconnect => 0 => 0
redis.arrays.names => no value => no value
redis.arrays.pconnect => 0 => 0
redis.arrays.previous => no value => no value
redis.arrays.readtimeout => 0 => 0
redis.arrays.retryinterval => 0 => 0
redis.arrays.consistent => 0 => 0
redis.clusters.cache_slots => 0 => 0
redis.clusters.auth => no value => no value
redis.clusters.persistent => 0 => 0
redis.clusters.read_timeout => 0 => 0
redis.clusters.seeds => no value => no value
redis.clusters.timeout => 0 => 0
redis.pconnect.pooling_enabled => 1 => 1
redis.pconnect.connection_limit => 0 => 0
redis.pconnect.echo_check_liveness => 1 => 1
redis.pconnect.pool_detect_dirty => 0 => 0
redis.pconnect.pool_poll_timeout => 0 => 0
redis.pconnect.pool_pattern => no value => no value
redis.session.locking_enabled => 0 => 0
redis.session.lock_expire => 0 => 0
redis.session.lock_retries => 10 => 10
redis.session.lock_wait_time => 2000 => 2000
3.) nextcloud/config/config.php
contains:
'memcache.local' => '\OC\Memcache\Redis',
'memcache.distributed' => '\OCMemcache\Redis',
'filelocking.enabled' => true,
'memcache.locking' => '\OC\Memcache\Redis',
'redis' => array (
'host' => '/var/run/redis/redis.sock',
'port' => 0, <---- I have verified that redis is running on port 0
'timeout' => 1.5,
'password' => 'secret', <--- I have verified that the password is correct
),
4.) redis unix socket is running:
# ps aux | grep redis
redis 6468 0.2 0.6 74768 26428 ? Ssl 16:47 0:01 /usr/bin/redis-server 127.0.0.1:0
root 7384 0.0 0.0 6432 656 pts/1 S+ 16:58 0:00 grep --color=auto redis
5.) redis
is a member of www-data
group
# members www-data
www-data redis
and
# stat /var/run/redis/redis.sock
File: /var/run/redis/redis.sock
Size: 0 Blocks: 0 IO Block: 4096 socket
Device: 18h/24d Inode: 838 Links: 1
Access: (0775/srwxrwxr-x) Uid: ( 127/ redis) Gid: ( 135/ redis)
Access: 2022-07-30 17:17:37.227272165 +0800
Modify: 2022-07-30 17:17:36.343272193 +0800
Change: 2022-07-30 17:19:13.279269161 +0800
Birth: -
6.) tail -f ncerrors/error.log
reveals no errors
NC installation profile:
Ubuntu Server 20.04, LAMP, ModSec disabled
please adviseā¦
thanks