My running nextcloud suddenly stopped after a month

My Nextcloud was running for a month, when it suddenly stopped and I get this message from the webserver:

Internal Server Error
The server encountered an internal error and …


The internal error-message is:

sudo -u www-data php /var/www/nextcloud/occ log:watch

Error core OC\HintException: Memcache \OC\Memcache\Redis not … available for local cache at
lib/private/Memcache/Factory.php line 98
0. …/Server.php line 669
OC\Memcache\Factory->__construct(
“18df … 7”,
OC\Log {},
“\OC … s”,
“\OC … s”,
“\OC … s”
)
1. …/Container.php line 118
OC\Server->OC{closure}("*** sensitive … *") "


My system-info:

nc-info

Gathering information…
NextCloudPi version v1.34.1
NextCloudPi image NextCloudPi_11-04-18
distribution Debian GNU/Linux 9 \n \l
automount yes
USB devices sda
datadir /media/DATA-SERVER/ncdata
data in SD no
data filesystem ext2/ext3
data disk usage 111G/470G
rootfs usage 1,9G/9,1G
swapfile /dev/mmcblk1p2
dbdir /media/Datenbanken/ncdatabase
Nextcloud check ok
Nextcloud version 19.0.8.1
HTTPD service up
PHP service up
MariaDB service up
Redis service up
Postfix service up
internet check ok
port check 80 open
port check 443 open
IP 192.168.1.6
gateway 192.168.1.1
interface enx001e063604a3
certificates hartmut.homelinux.org
NAT loopback no
uptime 4days


The apache-server is running, it handles my website


The Redis-server is running too:

redis-benchmark -n 1000000 -t set,get -P 16 -s /var/run/redis redis.sock               

====== SET ======
1000000 requests completed in 2.38 seconds
50 parallel clients
3 bytes payload
keep alive: 1
8.76% <= 1 milliseconds

====== GET ======
1000000 requests completed in 2.07 seconds
50 parallel clients
3 bytes payload
keep alive: 1
26.68% <= 1 milliseconds

100.00% <= 8 milliseconds
482625.47 requests per second


This is the redis-part of the config.php:

‘memcache.local’ => ‘\OC\Memcache\Redis’,
‘memcache.locking’ => ‘\OC\Memcache\Redis’,
‘redis’ =>
array (
‘host’ => ‘/var/run/redis/redis.sock’,
‘port’ => 0,
‘timeout’ => 0.0,
‘password’ => secret

---------------------------------------------

The php-redis-module:

apt-cache policy php-redis

php-redis:
Installiert: 5.3.2+4.3.0-7+0~20210228.34+debian9~1.gbp893bd4
Installationskandidat: 5.3.2+4.3.0-7+0~20210228.34+debian9~1.gbp893bd4
Versionstabelle:
*** 5.3.2+4.3.0-7+0~20210228.34+debian9~1.gbp893bd4 500
500 https://packages.sury.org/php stretch/main armhf Packages
100 /var/lib/dpkg/status
3.1.1-1 500
500 http://httpredir.debian.org/debian stretch/main armhf Packages


My php-ini does not show this module:

php -i

phpinfo()
PHP Version => 7.3.27-9+0~20210227.82+debian9~1.gbpa4a3d6
System => Linux Wolke7 4.14.150-odroidxu4 #2 SMP PREEMPT Mon Oct 28 08:07:45 CET 2019 armv7l
Build Date => Feb 27 2021 15:51:31
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /etc/php/7.3/cli
Loaded Configuration File => /etc/php/7.3/cli/php.ini
Scan this dir for additional .ini files => /etc/php/7.3/cli/conf.d
Additional .ini files parsed => /etc/php/7.3/cli/conf.d/10-mysqlnd.ini,
/etc/php/7.3/cli/conf.d/10-opcache.ini,

/etc/php/7.3/cli/conf.d/20-posix.ini,
/etc/php/7.3/cli/conf.d/20-readline.ini,
/etc/php/7.3/cli/conf.d/20-shmop.ini,

/etc/php/7.3/cli/conf.d/20-zip.ini


My folder with available module shows it:

ls -l /etc/php/7.3/mods-available/

insgesamt 168
-rw-r–r-- 1 root root 72 Nov 3 15:33 bcmath.ini

-rw-r–r-- 1 root root 71 Nov 3 15:33 posix.ini
-rw-r–r-- 1 root root 76 Nov 3 15:33 readline.ini
-rw-r–r-- 1 root root 19 Nov 3 2018 redis.ini
-rw-r–r-- 1 root root 71 Nov 3 15:33 shmop.ini


A replay of a backup is working flawless but does nothing.


What can I do?

Spielmops

You are using an almost 3 years old image.
Debian 9 Is no longer supported by ncp. Make backups, upgrade to Debian 10, or do fresh install and restore from created backups.

Restore from backup does not work.

stretch benefits from Long Term Support (LTS) until the end of June 2022

cited from debian.org

nc-restore works for me, what went wrong?

Nothing went wrong:

… to solve the problem …

That doesn’t answer the question.

Install fresh from latest image and then run the restore from backup.
Most likely this will solve the problem

1 Like

Indeed! I had the hope to get an answer to my question. With that answer I could better understand, what went wrong and what to do, if this failure arises again. Don’ t forget, that my cloud worked fine for a month. So what is the reason that Redis is not longer available?

Spielmops

Is the answer to your question, that repo (not debian btw) doesnt work well or breaks current ncp.
It was used for a short while with Debian 9, to be able to use php7.3. abondoned soon after, as it caused to many issues.

Ok, so an update of the OS to Buster would solve the problem?

Spielmops

Maybe not, if your system is broken, can try, but be ready to do fresh install and restore from backup.
In general an upgrade is not a fix for a broken system.

That’s the reason I asked. Your hint to the php-packages is a “believe me” and I will, but I do not understand, why a running cloud stops. My server does not automatically install anything so an update can not be the reason.

Spielmops

I think, you are right: the command

systemctl status php7.3-fpm 

showed nothing unusual. However when I tried it an hour ago another time on another console with more space, I could see the letters “PHP Wa”. And when I stretched the console-window over my 2 screens, I got

PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib/php/20200930/redis.so’ (tried: /usr/lib/php/20200930/redis.so (/usr/lib/php/20200930/redis.so: undefined symbol: php_error_docref)

And then I asked apt for more information of that packages:

redis : depends on: redis-server (>= 5:5.0.3-3~bpo9+2) but 3:3.2.6-3+deb9u4 shall be installed
E: damaged packages

Tomorrow I will upgrade everything.

I would rather start fresh. Your system might be broken due to your fixing attempts

Hey @Spielmops

Maybe you can take a look at this : Internal server error - Redis problem - #4 by Mageunic

I’m not familiar with debian, so I need a short info. If I do

apt -a show redis-server

I get 2 items, one with version 5.6 from debian buster-backports/main armhf and the other version 5.5.0 from debian buster/main armhf.
Which is the right one or how can I get information about that (via apt?)

Is there any way to get manual installed packages?

Spielmops