Solved Unable to get redis cache running on debian 10 based Nextcloud instance
-
@Emad-R said in Unable to get redis cache running on debian 10 based Nextcloud instance:
Did you do the config in config.php file in nextcloud folder
Yes, I know how it is supposed to be configured. I've done it at least a dozen times on CentOS/Fedora based systems.
-
@black3dynamite said in Unable to get redis cache running on debian 10 based Nextcloud instance:
Here's what I found on https://www.c-rieger.de/nextcloud-installation-guide-debian-9-10/#c04
Redis configurationsed -i "s/port 6379/port 0/" /etc/redis/redis.conf sed -i s/\#\ unixsocket/\unixsocket/g /etc/redis/redis.conf sed -i "s/unixsocketperm 700/unixsocketperm 770/" /etc/redis/redis.conf sed -i "s/# maxclients 10000/maxclients 512/" /etc/redis/redis.conf usermod -aG redis www-data
Nextcloud configuration for Redis
'redis' => array ( 'host' => '/var/run/redis/redis-server.sock', # ATTENTION if you operate on Debian 9.x: # 'host' => '/var/run/redis/redis.sock', 'port' => 0, 'timeout' => 0.0, ),
The only thing I did not have was setting the port to 0 and the change of max clients.
My understanding of the port 0 was that it would answer both TCP or socket if I left it alone.
-
No difference
-
-
With the socket on 770 I get this spamming again.
Changing it to 777 stops that, but instead I get this.
-
That should go away when you add redis to www-data group.
-
@black3dynamite said in Unable to get redis cache running on debian 10 based Nextcloud instance:
That should go away when you add redis to www-data group.
root@nextcloud:/var/www/nextcloud# adduser redis www-data Adding user `redis' to group `www-data' ... Adding user redis to group www-data Done. root@nextcloud:/var/www/nextcloud# systemctl restart redis root@nextcloud:/var/www/nextcloud# systemctl restart apache2 # edit conf to change permission to 770 again root@nextcloud:/var/www/nextcloud# nano /etc/redis/redis.conf root@nextcloud:/var/www/nextcloud# systemctl restart redis
and back to the spamming permission denied.
-
@JaredBusch said in Unable to get redis cache running on debian 10 based Nextcloud instance:
@black3dynamite said in Unable to get redis cache running on debian 10 based Nextcloud instance:
That should go away when you add redis to www-data group.
root@nextcloud:/var/www/nextcloud# adduser redis www-data Adding user `redis' to group `www-data' ... Adding user redis to group www-data Done. root@nextcloud:/var/www/nextcloud# systemctl restart redis root@nextcloud:/var/www/nextcloud# systemctl restart apache2 # edit conf to change permission to 770 again root@nextcloud:/var/www/nextcloud# nano /etc/redis/redis.conf root@nextcloud:/var/www/nextcloud# systemctl restart redis
and back to the spamming permission denied.
Go the other way and add www-data to the redis group instead?
-
@dafyre said in Unable to get redis cache running on debian 10 based Nextcloud instance:
@JaredBusch said in Unable to get redis cache running on debian 10 based Nextcloud instance:
@black3dynamite said in Unable to get redis cache running on debian 10 based Nextcloud instance:
That should go away when you add redis to www-data group.
root@nextcloud:/var/www/nextcloud# adduser redis www-data Adding user `redis' to group `www-data' ... Adding user redis to group www-data Done. root@nextcloud:/var/www/nextcloud# systemctl restart redis root@nextcloud:/var/www/nextcloud# systemctl restart apache2 # edit conf to change permission to 770 again root@nextcloud:/var/www/nextcloud# nano /etc/redis/redis.conf root@nextcloud:/var/www/nextcloud# systemctl restart redis
and back to the spamming permission denied.
Go the other way and add www-data to the redis group instead?
Nothing.
I'm at a real loss as to WTF is going on here.
-
Since he's back... @jospoortvliet any hints on where to look?
-
Honestly it can be quite a PITA. A solution might be to kind'a start from scratch and follow the how-to from techrepublic - I helped Jack write that, we had also permission errors. The group thing was a big part of the solution. Note you need to restart stuff after changing groups etc, maybe a horrible reboot can help.
And yeah, I was looking here. I don't see any obvious issues...
-
@jospoortvliet said in Unable to get redis cache running on debian 10 based Nextcloud instance:
Honestly it can be quite a PITA. A solution might be to kind'a start from scratch and follow the how-to from techrepublic - I helped Jack write that, we had also permission errors. The group thing was a big part of the solution. Note you need to restart stuff after changing groups etc, maybe a horrible reboot can help.
And yeah, I was looking here. I don't see any obvious issues...
I'll poke at this shortly.
I've never had a problem enabling this on a CentOS or Fedora system. I do not use Ubuntu anywhere. This one was Debian because supposedly the OCR plugin needs a package that is not available on Fedora.
-
Possibly unrelated, but I was having problems getting a new instance setup on Ubuntu. Redis wasn't working there either. I bailed almost immediately as I didn't have time to mess with it. Installed it on Fedora, and it everything seems to be working as expected.
-
@jospoortvliet said in Unable to get redis cache running on debian 10 based Nextcloud instance:
Honestly it can be quite a PITA. A solution might be to kind'a start from scratch and follow the how-to from techrepublic - I helped Jack write that, we had also permission errors. The group thing was a big part of the solution. Note you need to restart stuff after changing groups etc, maybe a horrible reboot can help.
And yeah, I was looking here. I don't see any obvious issues...
ok got it.
I had to keep the socket permission at
770
instead of700
. I can fine tune that later when the system is not in use.This is my
config.php
'filelocking.enabled' => true, 'memcache.local' => '\\OC\\Memcache\\Redis', 'memcache.locking' => '\\OC\\Memcache\\Redis', 'redis' => array ( 'host' => '/var/run/redis/redis-server.sock', 'port' => 0, 'timeout' => 0, 'password' => '', 'dbindex' => 0, ),
-
Congrats