NC 27 redis error

Hi, I just installed a fresh instance of Nextcloud 27 and all is working, but deleting files/folders.

I just checked with ā€œsudo -u www-data php occ files:scan --allā€ and got the following output:

Exception during scan: No such file or directory
#0 /var/www/nextcloud/lib/private/RedisFactory.php(137): Redis->pconnect()
#1 /var/www/nextcloud/lib/private/RedisFactory.php(178): OC\RedisFactory->create()
#2 /var/www/nextcloud/lib/private/Memcache/Redis.php(66): OC\RedisFactory->getInstance()
#3 /var/www/nextcloud/lib/private/Memcache/Redis.php(126): OC\Memcache\Redis->getCache()
#4 /var/www/nextcloud/lib/private/Lock/MemcacheLockingProvider.php(65): OC\Memcache\Redis->add()
#5 /var/www/nextcloud/lib/private/Files/Storage/Common.php(765): OC\Lock\MemcacheLockingProvider->acquireLock()
#6 /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php(607): OC\Files\Storage\Common->acquireLock()
#7 /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php(607): OC\Files\Storage\Wrapper\Wrapper->acquireLock()
#8 /var/www/nextcloud/lib/private/Files/Cache/Scanner.php(339): OC\Files\Storage\Wrapper\Wrapper->acquireLock()
#9 /var/www/nextcloud/lib/private/Files/Utils/Scanner.php(269): OC\Files\Cache\Scanner->scan()
#10 /var/www/nextcloud/apps/files/lib/Command/Scan.php(164): OC\Files\Utils\Scanner->scan()
#11 /var/www/nextcloud/apps/files/lib/Command/Scan.php(219): OCA\Files\Command\Scan->scanFiles()
#12 /var/www/nextcloud/3rdparty/symfony/console/Command/Command.php(298): OCA\Files\Command\Scan->execute()
#13 /var/www/nextcloud/core/Command/Base.php(177): Symfony\Component\Console\Command\Command->run()
#14 /var/www/nextcloud/3rdparty/symfony/console/Application.php(1040): OC\Core\Command\Base->run()
#15 /var/www/nextcloud/3rdparty/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand()
#16 /var/www/nextcloud/3rdparty/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun()
#17 /var/www/nextcloud/lib/private/Console/Application.php(211): Symfony\Component\Console\Application->run()
#18 /var/www/nextcloud/console.php(100): OC\Console\Application->run()
#19 /var/www/nextcloud/occ(11): require_once('...')
#20 {main}

The server is installed on debian-machine, I installed redis-server and php-redis, also modified redis.conf:

# Accept connections on the specified port, default is 6379 (IANA #815344).
# If port 0 is specified Redis will not listen on a TCP socket.
port 0

# TCP listen() backlog.
#
# In high requests-per-second environments you need a high backlog in order
# to avoid slow clients connection issues. Note that the Linux kernel
# will silently truncate it to the value of /proc/sys/net/core/somaxconn so
# make sure to raise both the value of somaxconn and tcp_max_syn_backlog
# in order to get the desired effect.
tcp-backlog 511

# Unix socket.
#
# Specify the path for the Unix socket that will be used to listen for
# incoming connections. There is no default, so Redis will not listen
# on a unix socket when not specified.
#
unixsocket /run/redis/redis-server.sock
unixsocketperm 770

ā€œps ax | grep redisā€ shows:

ps ax | grep redis
    564 ?        Ssl    0:01 /usr/bin/redis-server unixsocket:/run/redis/redis-server.sock
   1107 pts/0    S+     0:00 grep redis

Any suggestions, on what I can also try to do?

Did you add www-data to the redis group?

ā€¦ find out with:

getent group redis | cut -d: -f4

ā€¦ if that does not echo www-data, then run:

sudo usermod -a -G redis www-data

(see ā†’ manual ā† )

hope that helps,
much luck!

yes it is, also it wonā€™t work

Did you monitor your redis with redis-cli

sudo -u redis redis-cli -s /run/redis/redis-server.sock monitor

or look in logfile for suspicious events.

much luck!

Itā€™s just a fresh install of nextcloud with redis-server.

O have one other nextcloud coming from 23 to 27 even with redis and is working fine.
Did all the sameā€¦

Never had to use redis-cli

redis-cli monitor says ā€œOKā€

/var/log/redis/redis-server.log seems ok to me:

564:M 01 Aug 2023 21:26:34.414 # User requested shutdown...
564:M 01 Aug 2023 21:26:34.415 * Saving the final RDB snapshot before exiting.
564:M 01 Aug 2023 21:26:34.419 * DB saved on disk
564:M 01 Aug 2023 21:26:34.420 * Removing the pid file.
564:M 01 Aug 2023 21:26:34.420 * Removing the unix socket file.
564:M 01 Aug 2023 21:26:34.420 # Redis is now ready to exit, bye bye...
596:C 01 Aug 2023 21:26:59.394 * Supervised by systemd. Please make sure you set appropriate values for TimeoutStartSec>596:C 01 Aug 2023 21:26:59.404 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
596:C 01 Aug 2023 21:26:59.404 # Redis version=7.0.11, bits=64, commit=00000000, modified=0, pid=596, just started
596:C 01 Aug 2023 21:26:59.405 # Configuration loaded
596:M 01 Aug 2023 21:26:59.406 * monotonic clock: POSIX clock_gettime
596:M 01 Aug 2023 21:26:59.425 * Running mode=standalone, port=0.
596:M 01 Aug 2023 21:26:59.425 # Server initialized
596:M 01 Aug 2023 21:26:59.451 * Loading RDB produced by version 7.0.11
596:M 01 Aug 2023 21:26:59.451 * RDB age 25 seconds
596:M 01 Aug 2023 21:26:59.451 * RDB memory usage when created 0.94 Mb
596:M 01 Aug 2023 21:26:59.452 * Done loading RDB, keys loaded: 0, keys expired: 0.
596:M 01 Aug 2023 21:26:59.452 * DB loaded from disk: 0.009 seconds
596:M 01 Aug 2023 21:26:59.452 * The server is now ready to accept connections at /run/redis/redis-server.sock