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.

Personally I’ve added the web servewr user to the redis group and not the otherway round. Additionally you should keep in mind that it might not be sufficient to set the socket access rights only, because you have to make sure that the www-data user is allowed to go down the directory tree to access it too. The easiest way to check it is, to switch to the www-data user on the console and navigate to the redis socket directory.

● 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.

Ähm in line

 CGroup: /system.slice/redis-server.service
         └─1277416 "/usr/bin/redis-server 127.0.0.1:6379" "" "" "" "" "" "" "" 

your redis runs as IP:PORT and not like this

systemctl status redis.service
● redis-server.service - Advanced key-value store
     Loaded: loaded (/usr/lib/systemd/system/redis-server.service; enabled; preset: enabled)
     Active: active (running) since Tue 2024-10-01 08:46:37 CEST; 6 days ago
       Docs: http://redis.io/documentation,
             man:redis-server(1)
   Main PID: 11718 (redis-server)
     Status: "Ready to accept connections"
      Tasks: 5 (limit: 35967)
     Memory: 13.9M (peak: 19.7M)
        CPU: 34min 7.530s
     CGroup: /system.slice/redis-server.service
             └─11718 "/usr/bin/redis-server unixsocket:/run/redis/redis-server.sock"

Your redis should run like this

     CGroup: /system.slice/redis-server.service
             └─11718 "/usr/bin/redis-server unixsocket:/run/redis/redis-server.sock"

Please check this in your redis conf if you have both uncommented!
If so please comment aout the port 6379 and set port to zero run the service as you wished in unixsocket mode.

my conf (partialy)

# 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 6379
port 0

In your Nextcloud config you already set it right

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

And don’t forget to restart redis + php + webserver (nginx / apache e.g.)
→ i usually decide to restart my whole server, so all services made a valuable restart :slightly_smiling_face:

I have changed port to 0

But my output now is

CGroup: /system.slice/redis-server.service
             └─1246 "/usr/bin/redis-server 127.0.0.1:0" ""

Do I need to change my bind setting in redis.conf

yes follow some instructions

Also have a look to this post

plus this

I tried everything from above and still get the same error message every morning 01:10. I don’t think its related to redis. Because if I configure it wrong by intention or disable it I receive more error messages.

Is it possible, that your router reconnects at that time? Can you have a look a the full logs of the redis service. When you type systemctl, your logs always start at 1:11. So something happened before, and maybe the service restarted?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.