NCP 1.29.8, Redis service down and Nextcloud check error

I am running NCP on an ODROID HC1 and this morning woke up to some issues, rendering my Nextcloud broken.

ncp-scan spits out:
RedisException: Redis server went away in /var/www/nextcloud/lib/private/Memcache/Redis.php:55

systemctl status redis yields:

  • redis-server.service - Advanced key-value store
    Loaded: loaded (/lib/systemd/system/redis-server.service; enabled; vendor preset: enabled)
    Active: failed (Result: exit-code) since Mon 2020-08-31 13:45:43 PDT; 27min ago
    Docs: http://redis.io/documentation,
    man:redis-server(1)
    Process: 20898 ExecStart=/usr/bin/redis-server /etc/redis/redis.conf (code=exited, status=0/SUCCESS)
    Main PID: 20899 (code=exited, status=1/FAILURE)

Aug 31 13:45:43 nextcloudpi systemd[1]: redis-server.service: Service RestartSec=100ms expired, schedulin
Aug 31 13:45:43 nextcloudpi systemd[1]: redis-server.service: Scheduled restart job, restart counter is a
Aug 31 13:45:43 nextcloudpi systemd[1]: Stopped Advanced key-value store.
Aug 31 13:45:43 nextcloudpi systemd[1]: redis-server.service: Start request repeated too quickly.
Aug 31 13:45:43 nextcloudpi systemd[1]: redis-server.service: Failed with result ‘exit-code’.
Aug 31 13:45:43 nextcloudpi systemd[1]: Failed to start Advanced key-value store.

I’ve been trying all of the help suggestions online to no avail but am unfortunately not very savvy and am really only stumbling through this

An unhandled exception has been thrown:
RedisException: Redis server went away in /var/www/nextcloud/lib/private/Memcache/Redis.php:54
Stack trace:
#0 /var/www/nextcloud/lib/private/Memcache/Redis.php(54): Redis->get(‘5b8c899ca92ea2a…’)
#1 /var/www/nextcloud/lib/private/App/InfoParser.php(58): OC\Memcache\Redis->get(’/var/www/nextcl…’)
#2 /var/www/nextcloud/lib/private/App/AppManager.php(511): OC\App\InfoParser->parse(’/var/www/nextcl…’)
#3 /var/www/nextcloud/lib/private/App/AppManager.php(526): OC\App\AppManager->getAppInfo(‘files’)
#4 /var/www/nextcloud/lib/private/legacy/app.php(531): OC\App\AppManager->getAppVersion(‘files’, true)
#5 /var/www/nextcloud/lib/private/legacy/app.php(795): OC_App::getAppVersion(‘files’)
#6 /var/www/nextcloud/lib/private/legacy/util.php(1447): OC_App::shouldUpgrade(‘files’)
#7 /var/www/nextcloud/lib/public/Util.php(514): OC_Util::needUpgrade(Object(OC\SystemConfig))
#8 /var/www/nextcloud/lib/base.php(716): OCP\Util::needUpgrade()
#9 /var/www/nextcloud/lib/base.php(1089): OC::init()
#10 /var/www/nextcloud/console.php(48): require_once(’/var/www/nextcl…’)
#11 /var/www/nextcloud/occ(11): require_once(’/var/www/nextcl…’)

I’d try reboot and run

sudo ncp-report

share output via pastebin com or similar if still in need of assistance.

That statement doesnt tell anyone much about what you did or did not try! Be precise please! That is, if you want to make it easier for others to help! :wink:

Maybe you had the same issue I had.

I tried to run the ncp update manually via the web frontend. It did not do anything. When checking via ssh I found that apt-get was still running from a day ago but not doing anything.

pi@nextcloudpi:~ $ sudo ncp-update
Downloading updates
Performing updates
apt is currently running. Try again later


root     17417  0.0  0.0   9468  2140 ?        S    Aug31   0:00 /usr/sbin/CRON -f
root     17421  0.0  0.0   1940   384 ?        Ss   Aug31   0:00 /bin/sh -c test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
root     17422  0.0  0.0   1860  1084 ?        S    Aug31   0:00 run-parts --report /etc/cron.daily
root     17483  0.0  0.0   7676  2404 ?        S    Aug31   0:00 /bin/bash /etc/cron.daily/ncp-autoupdate
root     17507  0.0  0.0   7676  2592 ?        S    Aug31   0:00 /bin/bash /usr/local/bin/ncp-update
root     17521  0.0  0.0   7808  2828 ?        S    Aug31   0:00 /bin/bash ./update.sh
root     18426  0.0  0.0   7808  2652 ?        S    Aug31   0:00 /bin/bash ./run_update_history.sh updates
root     18505  0.0  0.0   7676  2592 ?        S    Aug31   0:00 bash updates/1.30.0.sh
root     18615  0.1  1.2  55940 48048 ?        S    Aug31   2:26 apt-get install -y --no-install-recommends -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--
root     22191  0.0  0.1  10488  4196 pts/0    Ss+  Aug31   0:00 /usr/bin/dpkg --force-confdef --force-confold --force-confdef --force-confold --status-fd 19 --conf
root     29463  0.0  0.0   1940   412 pts/0    S+   Aug31   0:00 /bin/sh /var/lib/dpkg/info/php7.3-cli.postinst configure 7.3.11-1~deb10u1
root     29467  0.0  0.3  21396 14056 pts/0    S+   Aug31   0:00 /usr/bin/perl -w /usr/share/debconf/frontend /usr/bin/ucf /usr/lib/php/7.3/php.ini-production.cli /
root     29503  0.0  0.0   7808  2624 pts/0    S+   Aug31   0:00 /bin/bash /usr/bin/ucf /usr/lib/php/7.3/php.ini-production.cli /etc/php/7.3/cli/php.ini

After killing ap-get and re-running ncp-update I got

pi@nextcloudpi:~ $ sudo ncp-update
Downloading updates
Performing updates
Get:1 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB]
Get:2 http://archive.raspberrypi.org/debian buster InRelease [32.6 kB]
Get:3 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages [13.0 MB]
Get:4 http://archive.raspberrypi.org/debian buster/main armhf Packages [331 kB]
Fetched 13.4 MB in 13s (1,024 kB/s)
Reading package lists... Done
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.

Running sudo dpkg --configure -a notifies about a conflict regarding the php.ini which was modified locally. Changes are e.g.:

 --- /etc/php/7.3/fpm/php.ini root.root 0644 2020-05-17 00:12:49
                                 │ +++ /usr/lib/php/7.3/php.ini-production root.root 0644 2020-07-05 07:46:45
                                 │ @@ -757,7 +757,7 @@
                                 │
                                 │  ; Directory where the temporary files should be placed.
                                 │  ; Defaults to the system default (see sys_get_temp_dir)
                                 │ -sys_temp_dir = /var/www/nextcloud/data/tmp
                                 │ +;sys_temp_dir = "/tmp"
                                 │
                                 │  ; Whether or not to enable the dl() function. The dl() function does NOT work
                                 │  ; properly in multithreaded servers, such as IIS or Zeus, and is automatically
                                 │ @@ -834,7 +834,7 @@
                                 │  ; Temporary directory for HTTP uploaded files (will use system default if not
                                 │  ; specified).
                                 │  ; http://php.net/upload-tmp-dir
                                 │ -upload_tmp_dir = /var/www/nextcloud/data/tmp
                                 │ +;upload_tmp_dir =
                                 │
                                 │  ; Maximum allowed size for uploaded files.
                                 │  ; http://php.net/upload-max-filesize
                                 │ @@ -1415,7 +1415,8 @@
                                 │  session.cookie_httponly =
                                 │
                                 │  ; Add SameSite attribute to cookie to help mitigate Cross-Site Request Forgery (CSRF/XSRF)
                                 │ -; Current valid values are "Lax" or "Strict"
                                 │ +; Current valid values are "Strict", "Lax" or "None". When using "None",
                                 │ +; make sure to include the quotes, as `none` is interpreted like `false` in ini files.
                                 │  ; https://tools.ietf.org/html/draft-west-first-party-cookies-07
                                 │  session.cookie_samesite =
                                 │
                                 │ @@ -1423,12 +1424,9 @@
                                 │  ; http://php.net/session.serialize-handler
                                 │  session.serialize_handler = php
                                 │
                                 │ -; Defines the probability that the 'garbage coll

Only if this conflict is resolved the update works.