RedisException: No such file or directory in /var/www/nextcloud/lib/private/RedisFactory.php:92

after a blackout, I got a 503 error page.

here is my ncp-report:

NextCloudPi diagnostics

NextCloudPi version  v1.39.0
OS                   Armbian 21.05.6 Buster \l . 5.9.12-meson64 (aarch64)
automount            no
USB devices          none
datadir              /storage/nextcloud
data in SD           no
data filesystem      ext2/ext3
data disk usage      2.6T/5.4T
rootfs usage         6.4G/30G
swapfile             /var/swap
dbdir                /storage/ncdatabase
Nextcloud check      error
HTTPD service        up
PHP service          up
MariaDB service      up
Redis service        up
HPB service          down
Postfix service      up
internet check       ok
port check 80        closed
port check 443       closed
IP                   ***REMOVED SENSITIVE VALUE***
gateway              ***REMOVED SENSITIVE VALUE***
interface            eth0
certificates         ***REMOVED SENSITIVE VALUE***
NAT loopback         no
uptime               12:23

Nextcloud configuration

An unhandled exception has been thrown:
RedisException: No such file or directory in /var/www/nextcloud/lib/private/RedisFactory.php:92
Stack trace:
#0 /var/www/nextcloud/lib/private/RedisFactory.php(92): Redis->connect('/var/run/redis/...', 0, 0)
#1 /var/www/nextcloud/lib/private/RedisFactory.php(108): OC\RedisFactory->create()
#2 /var/www/nextcloud/lib/private/Memcache/Redis.php(43): OC\RedisFactory->getInstance()
#3 /var/www/nextcloud/lib/private/Memcache/Factory.php(135): OC\Memcache\Redis->__construct('be5f759ef9d9f02...')
#4 /var/www/nextcloud/lib/private/Server.php(1018): OC\Memcache\Factory->createLocking('lock')
#5 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(155): OC\Server->OC\{closure}(Object(OC\Server))
#6 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(Pimple\Container))
#7 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(122): Pimple\Container->offsetGet('OCP\\Lock\\ILocki...')
#8 /var/www/nextcloud/lib/private/ServerContainer.php(156): OC\AppFramework\Utility\SimpleContainer->query('OCP\\Lock\\ILocki...', true)
#9 /var/www/nextcloud/lib/private/Server.php(1977): OC\ServerContainer->query('OCP\\Lock\\ILocki...')
#10 /var/www/nextcloud/lib/private/Files/View.php(118): OC\Server->getLockingProvider()
#11 /var/www/nextcloud/lib/private/Server.php(395): OC\Files\View->__construct()
#12 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(155): OC\Server->OC\{closure}(Object(OC\Server))
#13 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(Pimple\Container))
#14 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(122): Pimple\Container->offsetGet('OC\\Files\\Node\\H...')
#15 /var/www/nextcloud/lib/private/ServerContainer.php(156): OC\AppFramework\Utility\SimpleContainer->query('OC\\Files\\Node\\H...', true)
#16 /var/www/nextcloud/lib/private/Server.php(1324): OC\ServerContainer->query('OC\\Files\\Node\\H...')
#17 /var/www/nextcloud/lib/base.php(595): OC\Server->boot()
#18 /var/www/nextcloud/lib/base.php(1091): OC::init()
#19 /var/www/nextcloud/console.php(49): require_once('/var/www/nextcl...')
#20 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')
#21 {main}
HTTPd logs

[Sat Aug 06 08:27:43.106630 2022] [mpm_event:notice] [pid 3200:tid 281472856905072] AH00489: Apache/2.4.38 (Debian) OpenSSL/1.1.1n configured -- resuming normal operations
[Sat Aug 06 08:27:43.106656 2022] [core:notice] [pid 3200:tid 281472856905072] AH00094: Command line: '/usr/sbin/apache2'
[Sat Aug 06 08:28:09.355954 2022] [mpm_event:notice] [pid 3200:tid 281472856905072] AH00493: SIGUSR1 received.  Doing graceful restart
[Sat Aug 06 08:28:09.384204 2022] [ssl:warn] [pid 3200:tid 281472856905072] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Sat Aug 06 08:28:09.384493 2022] [ssl:error] [pid 3200:tid 281472856905072] AH02217: ssl_stapling_init_cert: can't retrieve issuer certificate! [subject: CN=odroidhc4 / issuer: CN=odroidhc4 / serial: 7D417BB91233E771160EB4A23816AAFAF805286E / notbefore: Jan 12 20:42:58 2021 GMT / notafter: Jan 10 20:42:58 2031 GMT]
[Sat Aug 06 08:28:09.384538 2022] [ssl:error] [pid 3200:tid 281472856905072] AH02604: Unable to configure certificate localhost:4443:0 for stapling
[Sat Aug 06 08:28:09.385623 2022] [mpm_event:notice] [pid 3200:tid 281472856905072] AH00489: Apache/2.4.38 (Debian) OpenSSL/1.1.1n configured -- resuming normal operations
[Sat Aug 06 08:28:09.385670 2022] [core:notice] [pid 3200:tid 281472856905072] AH00094: Command line: '/usr/sbin/apache2'
[Sat Aug 06 08:28:09.522241 2022] [mpm_event:notice] [pid 3200:tid 281472856905072] AH00493: SIGUSR1 received.  Doing graceful restart
[Sat Aug 06 08:28:09.548576 2022] [ssl:warn] [pid 3200:tid 281472856905072] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Sat Aug 06 08:28:09.548808 2022] [ssl:error] [pid 3200:tid 281472856905072] AH02217: ssl_stapling_init_cert: can't retrieve issuer certificate! [subject: CN=odroidhc4 / issuer: CN=odroidhc4 / serial: 7D417BB91233E771160EB4A23816AAFAF805286E / notbefore: Jan 12 20:42:58 2021 GMT / notafter: Jan 10 20:42:58 2031 GMT]
[Sat Aug 06 08:28:09.548828 2022] [ssl:error] [pid 3200:tid 281472856905072] AH02604: Unable to configure certificate localhost:4443:0 for stapling
[Sat Aug 06 08:28:09.549909 2022] [mpm_event:notice] [pid 3200:tid 281472856905072] AH00489: Apache/2.4.38 (Debian) OpenSSL/1.1.1n configured -- resuming normal operations
[Sat Aug 06 08:28:09.549936 2022] [core:notice] [pid 3200:tid 281472856905072] AH00094: Command line: '/usr/sbin/apache2'
[Sat Aug 06 08:28:10.934715 2022] [mpm_event:notice] [pid 3200:tid 281472856905072] AH00493: SIGUSR1 received.  Doing graceful restart
[Sat Aug 06 08:28:10.961161 2022] [ssl:warn] [pid 3200:tid 281472856905072] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Sat Aug 06 08:28:10.961360 2022] [ssl:error] [pid 3200:tid 281472856905072] AH02217: ssl_stapling_init_cert: can't retrieve issuer certificate! [subject: CN=odroidhc4 / issuer: CN=odroidhc4 / serial: 7D417BB91233E771160EB4A23816AAFAF805286E / notbefore: Jan 12 20:42:58 2021 GMT / notafter: Jan 10 20:42:58 2031 GMT]
[Sat Aug 06 08:28:10.961377 2022] [ssl:error] [pid 3200:tid 281472856905072] AH02604: Unable to configure certificate localhost:4443:0 for stapling
[Sat Aug 06 08:28:10.962396 2022] [mpm_event:notice] [pid 3200:tid 281472856905072] AH00489: Apache/2.4.38 (Debian) OpenSSL/1.1.1n configured -- resuming normal operations
[Sat Aug 06 08:28:10.962419 2022] [core:notice] [pid 3200:tid 281472856905072] AH00094: Command line: '/usr/sbin/apache2'

What I have done so far:

  1. reinstalled php:
# apt remove --purge php*
# apt install php-bcmath php-common php-fpm php-igbinary php-redis php-smbclient php7.3 php7.3-bcmath php7.3-bz2 php7.3-cli php7.3-common php7.3-curl php7.3-fpm php7.3-gd php7.3-gmp php7.3-intl php7.3-json php7.3-ldap php7.3-mbstring php7.3-mysql php7.3-opcache php7.3-readline php7.3-xml php7.3-zip

now the error page changed to the license header

  1. changed the socket names as proposed here:
# echo "unixsocket /run/redis/redis.sock" >> /etc/redis/redis.conf
# echo "unixsocketperm 777" >> /etc/redis/redis.conf
Redis server
# systemctl restart redis
Job for redis-server.service failed because a timeout was exceeded.
See "systemctl status redis-server.service" and "journalctl -xe" for details.
# systemctl status redis-server.service
● redis-server.service - Advanced key-value store
   Loaded: loaded (/lib/systemd/system/redis-server.service; enabled; vendor preset: enabled)
   Active: activating (start) since Sat 2022-08-06 08:48:37 CEST; 6s ago
     Docs: http://redis.io/documentation,
           man:redis-server(1)
Cntrl PID: 22999 (redis-server)
    Tasks: 4 (limit: 3406)
   Memory: 1.6M
   CGroup: /system.slice/redis-server.service
           └─22999 /usr/bin/redis-server *:6379

Aug 06 08:48:37 odroidhc4 systemd[1]: Starting Advanced key-value store...
Aug 06 08:48:38 odroidhc4 redis-server[22999]: 22999:C 06 Aug 2022 08:48:38.104 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
Aug 06 08:48:38 odroidhc4 redis-server[22999]: 22999:C 06 Aug 2022 08:48:38.104 # Redis version=5.0.14, bits=64, commit=00000000, modified=0, pid=22999, just started
Aug 06 08:48:38 odroidhc4 redis-server[22999]: 22999:C 06 Aug 2022 08:48:38.104 # Configuration loaded
Aug 06 08:48:38 odroidhc4 redis-server[22999]: 22999:M 06 Aug 2022 08:48:38.108 * Running mode=standalone, port=6379.
Aug 06 08:48:38 odroidhc4 redis-server[22999]: 22999:M 06 Aug 2022 08:48:38.108 # Server initialized
Aug 06 08:48:38 odroidhc4 redis-server[22999]: 22999:M 06 Aug 2022 08:48:38.112 * Ready to accept connections
Aug 06 08:48:38 odroidhc4 redis-server[22999]: 22999:M 06 Aug 2022 08:48:38.112 * The server is now ready to accept connections at /run/redis/redis.sock

But I still get

RedisException: No such file or directory in /var/www/nextcloud/lib/private/RedisFactory.php:92

yeah: progress: I changed the entry in /var/www/nextcloud/config/config.php to

'redis' => array ( 'host' => '/run/redis/redis.sock',

# systemctl restart redis-server.service 
# systemctl restart php7.3-fpm.service
# systemctl restart apache2.service
# systemctl restart nextcloud-domain.service

now, my ncp is up and running also due to the ncp-repor:

NextCloudPi diagnostics

NextCloudPi version  v1.39.0
OS                   Armbian 21.05.6 Buster \l . 5.9.12-meson64 (aarch64)
automount            no
USB devices          none
datadir              /storage/nextcloud
data in SD           no
data filesystem      ext2/ext3
data disk usage      2.6T/5.4T
rootfs usage         6.4G/30G
swapfile             /var/swap
dbdir                /storage/ncdatabase
Nextcloud check      ok
Nextcloud version    20.0.4.0
HTTPD service        up
PHP service          up
MariaDB service      up
Redis service        up
HPB service          down
Postfix service      up
internet check       ok
port check 80        closed
port check 443       closed
IP                   ***REMOVED SENSITIVE VALUE***
gateway              ***REMOVED SENSITIVE VALUE***
interface            eth0
certificates         ***REMOVED SENSITIVE VALUE***
NAT loopback         no
uptime               16:39

Nextcloud configuration

{
    "system": {
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": {
            "0": "localhost",
            "11": "***REMOVED SENSITIVE VALUE***",
            "1": "***REMOVED SENSITIVE VALUE***",
            "5": "nextcloudpi.local",
            "7": "nextcloudpi",
            "8": "nextcloudpi.lan",
            "3": "localhost",
            "14": "odroidhc4"
        },
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "20.0.4.0",
        "overwrite.cli.url": "https:\/\/localhost\/",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "timeout": 0,
            "password": "***REMOVED SENSITIVE VALUE***"
        },
        "tempdirectory": "\/storage\/nextcloud\/tmp",
        "mail_smtpmode": "sendmail",
        "mail_smtpauthtype": "LOGIN",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "preview_max_x": "2048",
        "preview_max_y": "2048",
        "jpeg_quality": "60",
        "overwriteprotocol": "https",
        "maintenance": false,
        "logfile": "\/storage\/nextcloud\/nextcloud.log"
    }
}

HTTPd logs

[Sat Aug 06 08:54:44.880550 2022] [mpm_event:notice] [pid 23705:tid 281473871701360] AH00489: Apache/2.4.38 (Debian) OpenSSL/1.1.1n configured -- resuming normal operations
[Sat Aug 06 08:54:44.880637 2022] [core:notice] [pid 23705:tid 281473871701360] AH00094: Command line: '/usr/sbin/apache2'
[Sat Aug 06 08:55:12.923129 2022] [mpm_event:notice] [pid 23705:tid 281473871701360] AH00491: caught SIGTERM, shutting down
[Sat Aug 06 08:55:13.035520 2022] [ssl:warn] [pid 24071:tid 281473484232048] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Sat Aug 06 08:55:13.035740 2022] [ssl:error] [pid 24071:tid 281473484232048] AH02217: ssl_stapling_init_cert: can't retrieve issuer certificate! [subject: CN=odroidhc4 / issuer: CN=odroidhc4 / serial: 7D417BB91233E771160EB4A23816AAFAF805286E / notbefore: Jan 12 20:42:58 2021 GMT / notafter: Jan 10 20:42:58 2031 GMT]
[Sat Aug 06 08:55:13.035757 2022] [ssl:error] [pid 24071:tid 281473484232048] AH02604: Unable to configure certificate localhost:4443:0 for stapling
[Sat Aug 06 08:55:13.059579 2022] [ssl:warn] [pid 24072:tid 281473484232048] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Sat Aug 06 08:55:13.059895 2022] [ssl:error] [pid 24072:tid 281473484232048] AH02217: ssl_stapling_init_cert: can't retrieve issuer certificate! [subject: CN=odroidhc4 / issuer: CN=odroidhc4 / serial: 7D417BB91233E771160EB4A23816AAFAF805286E / notbefore: Jan 12 20:42:58 2021 GMT / notafter: Jan 10 20:42:58 2031 GMT]
[Sat Aug 06 08:55:13.059964 2022] [ssl:error] [pid 24072:tid 281473484232048] AH02604: Unable to configure certificate localhost:4443:0 for stapling
[Sat Aug 06 08:55:13.063897 2022] [mpm_event:notice] [pid 24072:tid 281473484232048] AH00489: Apache/2.4.38 (Debian) OpenSSL/1.1.1n configured -- resuming normal operations
[Sat Aug 06 08:55:13.063991 2022] [core:notice] [pid 24072:tid 281473484232048] AH00094: Command line: '/usr/sbin/apache2'
[Sat Aug 06 12:57:53.284618 2022] [mpm_event:notice] [pid 24072:tid 281473484232048] AH00491: caught SIGTERM, shutting down
[Sat Aug 06 12:57:53.418841 2022] [ssl:warn] [pid 675:tid 281473488147824] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Sat Aug 06 12:57:53.419071 2022] [ssl:error] [pid 675:tid 281473488147824] AH02217: ssl_stapling_init_cert: can't retrieve issuer certificate! [subject: CN=odroidhc4 / issuer: CN=odroidhc4 / serial: 7D417BB91233E771160EB4A23816AAFAF805286E / notbefore: Jan 12 20:42:58 2021 GMT / notafter: Jan 10 20:42:58 2031 GMT]
[Sat Aug 06 12:57:53.419092 2022] [ssl:error] [pid 675:tid 281473488147824] AH02604: Unable to configure certificate localhost:4443:0 for stapling
[Sat Aug 06 12:57:53.442955 2022] [ssl:warn] [pid 676:tid 281473488147824] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Sat Aug 06 12:57:53.443299 2022] [ssl:error] [pid 676:tid 281473488147824] AH02217: ssl_stapling_init_cert: can't retrieve issuer certificate! [subject: CN=odroidhc4 / issuer: CN=odroidhc4 / serial: 7D417BB91233E771160EB4A23816AAFAF805286E / notbefore: Jan 12 20:42:58 2021 GMT / notafter: Jan 10 20:42:58 2031 GMT]
[Sat Aug 06 12:57:53.443350 2022] [ssl:error] [pid 676:tid 281473488147824] AH02604: Unable to configure certificate localhost:4443:0 for stapling
[Sat Aug 06 12:57:53.447244 2022] [mpm_event:notice] [pid 676:tid 281473488147824] AH00489: Apache/2.4.38 (Debian) OpenSSL/1.1.1n configured -- resuming normal operations
[Sat Aug 06 12:57:53.447335 2022] [core:notice] [pid 676:tid 281473488147824] AH00094: Command line: '/usr/sbin/apache2'

however the starting page still shows only the license header and not the login

I run ncp-update and updated successfully to NextCloudPi version v1.47.0.
But I get an error updating to v1.48:

Downloading updates
Performing updates
A dependency job for notify_push.service failed. See 'journalctl -xe' for details.
Error while applying update 1.48.2. Exiting...
# systemctl status notify_push.service 
● notify_push.service - Push daemon for Nextcloud clients
   Loaded: loaded (/etc/systemd/system/notify_push.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sat 2022-08-06 13:36:42 CEST; 22min ago
 Main PID: 5445 (code=exited, status=203/EXEC)

Aug 06 13:38:29 odroidhc4 systemd[1]: Dependency failed for Push daemon for Nextcloud clients.
Aug 06 13:38:29 odroidhc4 systemd[1]: notify_push.service: Job notify_push.service/start failed with result 'dependency'.

Unfortuantely I don’t know what to do to fix it for you :pray: but I did find some relevant articles that perhaps have the answer for you?

Does the notify_push test work for you in CLI?

ncc notify_push:self-test

If you restart the notify_push service and/or start it manually does it start up then?

systemctl restart notify_push

systemctl start notify_push.service
service notify_push restart

NCP Issue on GitHub

NC Issue on GitHub

NC Forum topic - Notify Push Service does not start automatically

Also, what does the journalctl -xe say?

thank you very much. Unfortunately, nothing did help me, and I decided to start all over.