ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Unable to get redis cache running on debian 10 based Nextcloud instance

    Scheduled Pinned Locked Moved Solved IT Discussion
    nextcloud 17debian 10nextclouddebianredismemcache
    21 Posts 7 Posters 2.0k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • 1
      1337 @JaredBusch
      last edited by

      @JaredBusch It's phpinfo you want to look at for module info. Preferably through the webserver.

      JaredBuschJ 1 Reply Last reply Reply Quote 0
      • JaredBuschJ
        JaredBusch @1337
        last edited by

        @Pete-S said in Unable to get redis cache running on debian 10 based Nextcloud instance:

        @JaredBusch It's phpinfo you want to look at for module info. Preferably through the webserver.

        5477c654-61ab-4a73-8a88-7ac89955f62d-image.png
        c7544f34-afb3-4b82-a8c5-6b4a891f4543-image.png

        1 Reply Last reply Reply Quote 0
        • Emad RE
          Emad R @JaredBusch
          last edited by

          @JaredBusch

          Did you do the config in config.php file in nextcloud folder

          1 Reply Last reply Reply Quote 0
          • black3dynamiteB
            black3dynamite
            last edited by black3dynamite

            Here's what I found on https://www.c-rieger.de/nextcloud-installation-guide-debian-9-10/#c04
            Redis configuration

            sed -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,
            ),
            
            JaredBuschJ 1 Reply Last reply Reply Quote 1
            • JaredBuschJ
              JaredBusch
              last edited by

              @Emad-R said in Unable to get redis cache running on debian 10 based Nextcloud instance:

              @JaredBusch

              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.

              1 Reply Last reply Reply Quote 0
              • JaredBuschJ
                JaredBusch @black3dynamite
                last edited by

                @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 configuration

                sed -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.
                8bf27915-0413-4ff0-a90d-adbb21804359-image.png

                3398d790-b198-416c-b9db-5f2123ee753f-image.png

                8c8dfce0-d3f7-45de-9f66-4d9e6e2029e8-image.png

                1 Reply Last reply Reply Quote 0
                • JaredBuschJ
                  JaredBusch
                  last edited by

                  No difference
                  fda71934-a931-4f2b-b922-8791842e027f-image.png

                  1 Reply Last reply Reply Quote 0
                  • JaredBuschJ
                    JaredBusch
                    last edited by

                    fc07ca2a-d776-41c5-b6d6-faccd0926ad0-image.png

                    1 Reply Last reply Reply Quote 0
                    • JaredBuschJ
                      JaredBusch
                      last edited by JaredBusch

                      With the socket on 770 I get this spamming again.
                      631f2594-96cc-4c71-b2ec-5ba201651fc7-image.png

                      Changing it to 777 stops that, but instead I get this.
                      87e494d8-b415-4009-ba2e-d3d104bd4179-image.png

                      1 Reply Last reply Reply Quote 0
                      • black3dynamiteB
                        black3dynamite
                        last edited by

                        That should go away when you add redis to www-data group.

                        JaredBuschJ 1 Reply Last reply Reply Quote 0
                        • JaredBuschJ
                          JaredBusch @black3dynamite
                          last edited by

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

                          dafyreD 1 Reply Last reply Reply Quote 0
                          • dafyreD
                            dafyre @JaredBusch
                            last edited by

                            @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?

                            JaredBuschJ 1 Reply Last reply Reply Quote 0
                            • JaredBuschJ
                              JaredBusch @dafyre
                              last edited by

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

                              1 Reply Last reply Reply Quote 0
                              • JaredBuschJ
                                JaredBusch
                                last edited by

                                Since he's back... @jospoortvliet any hints on where to look?

                                1 Reply Last reply Reply Quote 1
                                • jospoortvlietJ
                                  jospoortvliet Vendor
                                  last edited by

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

                                  JaredBuschJ 2 Replies Last reply Reply Quote 0
                                  • JaredBuschJ
                                    JaredBusch @jospoortvliet
                                    last edited by

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

                                    1 Reply Last reply Reply Quote 0
                                    • B
                                      bnrstnr
                                      last edited by bnrstnr

                                      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.

                                      1 Reply Last reply Reply Quote 0
                                      • JaredBuschJ
                                        JaredBusch @jospoortvliet
                                        last edited by JaredBusch

                                        @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 of 700. 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,
                                            ),
                                        

                                        c0fedd1d-6f9a-4945-86b2-1f0d4ddb77a7-image.png

                                        1 Reply Last reply Reply Quote 2
                                        • jospoortvlietJ
                                          jospoortvliet Vendor
                                          last edited by

                                          Congrats 🐶

                                          1 Reply Last reply Reply Quote 1
                                          • 1
                                          • 2
                                          • 1 / 2
                                          • First post
                                            Last post