RedisException No such file or directory - Could not boot notify_push: No such file or directory

Nextcloud version (eg, 29.0.5): 28.0.7
Operating system and version (eg, Ubuntu 24.04): Ubuntu 22.04
Apache or nginx version (eg, Apache 2.4.25): Nginx
PHP version (eg, 8.3): 8.3.12

The issue you are facing:

Every morning 1:10 am I get the following entry in the log file. Notify push is running fine, systemctl restart notify_push.service did not helped. Running sudo -u www-data php occ notify_push:setup shows all green.

RedisException No such file or directory
Could not boot notify_push: No such file or directory

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. Open log files and check

The output of your Nextcloud log in Admin > Logging:

RedisException No such file or directory
Could not boot notify_push: No such file or directory

Please provide information how you’ve configured Redis in your Nextcloud configuration.

@j-ed

Here is my config:

<?php
$CONFIG = array (
  'instanceid' => 'myinstanceid',
  'passwordsalt' => 'mypasswordsalt',
  'secret' => 'mysecret',
  'allow_local_remote_servers' => true,
  'blacklisted_files' =>
  array (
    0 => '.htaccess',
    1 => 'Thumbs.db',
    2 => 'thumbs.db',
  ),
  'trusted_domains' =>
  array (
    0 => 'mydomain',
    1 => 'myipv4',
    2 => 'myipv6',
  ),
  'datadirectory' => '/var/nextcloud_data',
  'share_folder' => '/Mit mir geteilt',
  'overwrite.cli.url' => 'mydomain',
  'dbtype' => 'pgsql',
  'version' => '29.0.7.1',
  'dbname' => 'nextcloud_db',
  'dbhost' => '127.0.0.1',
  'dbport' => '5432',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'nextcloud_db_user',
  'dbpassword' => 'mydbpassword',
  'installed' => true,
  'default_phone_region' => 'DE',
  'enable_previews' => true,
  'enabledPreviewProviders' =>
  array (
    0 => 'OC\\Preview\\PNG',
    1 => 'OC\\Preview\\JPEG',
    2 => 'OC\\Preview\\GIF',
    3 => 'OC\\Preview\\BMP',
    4 => 'OC\\Preview\\XBitmap',
    5 => 'OC\\Preview\\Movie',
    6 => 'OC\\Preview\\PDF',
    7 => 'OC\\Preview\\MP3',
    8 => 'OC\\Preview\\TXT',
    9 => 'OC\\Preview\\MarkDown',
  ),
  'preview_max_x' => '2048',
  'preview_max_y' => '2048',
  'preview_max_scale_factor' => 1,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'overwriteprotocol' => 'https',
  'logtimezone' => 'Europe/Berlin',
  'log_rotate_size' => 26214400,
  'auth.bruteforce.protection.enabled' => true,
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
  'updater.release.channel' => 'stable',
  'twofactor_enforced' => 'false',
  'twofactor_enforced_groups' =>
  array (
  ),
  'twofactor_enforced_excluded_groups' =>
  array (
    'overwriteprotocol' => 'https',
    0 => 'Bots',
  ),
  'mysql.utf8mb4' => true,
  'ldapIgnoreNamingRules' => false,
  'trusted_proxies' =>
  array (
    0 => '127.0.0.1',
    1 => '::1',
    2 => 'mypiv4',
    3 => 'myipv6',
  ),
  'filelocking.enabled' => true,
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => '/var/run/redis/redis-server.sock',
    'port' => 0,
    'timeout' => 0.5,
    'dbindex' => 1,
  ),
  'encryption.legacy_format_support' => false,
  'maintenance_window_start' => 1,
);

My redis.conf (changes to standard)

bind 127.0.0.1 ::1
protected-mode yes
port 6379
tcp-backlog 511
unixsocket /var/run/redis/redis-server.sock
unixsocketperm 770
timeout 0
tcp-keepalive 300
daemonize yes
supervised no
pidfile /var/run/redis/redis-server.pid
loglevel notice
logfile /var/log/redis/redis-server.log
databases 16

If you are accessing Redis via a socket you have to make sure that the user, under which your web server is running, is allowed to access it. Please have a look on the following discussion:

usermod -g www-data redis did not resolved it

Did it yesterday and this morning 01:10 am I have the same error log entry.

please put the output of

systemctl status redis

here. Where does your redis server socket reside on your server → this info is important

And please also post the output of

sudo cat /etc/redis/redis.conf | grep unixsocket

here

Compare if the path output of your redis.conf and the status of your redis.service are compliant to the path set into your nextcloud config!!

And more over this the correct command to add redis to www-data group should be

sudo usermod -aG redis www-data

[see: Redis für Nextcloud konfigurieren (Memory Caching) -  vaahsen.de]

Output of sudo cat /etc/redis/redis.conf | grep unixsocket

unixsocket /var/run/redis/redis-server.sock
unixsocketperm 770

It matches my line in config.php

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

Output of systemctl status redis

● redis-server.service - Advanced key-value store
     Loaded: loaded (/lib/systemd/system/redis-server.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2024-10-07 01:11:17 CEST; 8h ago
       Docs: http://redis.io/documentation,
             man:redis-server(1)
   Main PID: 1277416 (redis-server)
     Status: "Ready to accept connections"
      Tasks: 5 (limit: 65000)
     Memory: 2.9M
        CPU: 51.121s
     CGroup: /system.slice/redis-server.service
             └─1277416 "/usr/bin/redis-server 127.0.0.1:6379" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" >

Oct 07 01:11:17 v2202204153101187524 systemd[1]: Starting Advanced key-value store...
Oct 07 01:11:17 v2202204153101187524 systemd[1]: Started Advanced key-value store.

I have run sudo usermod -aG redis www-data again and will need to wait until tomorrow to check the logs.