Coder Social home page Coder Social logo

Comments (5)

kriegalex avatar kriegalex commented on May 24, 2024

Since this was a test Nextcloud deployment, I simply removed everything and cleaned all the k3smnt folders.

// on the client
$ kubectl kustomize $HOME/k8sprjs/nextcloud | kubectl delete -f -
// on the k3sagentX
$ sudo rm -r /mnt/nextcloud-ssd/html/k3smnt
$ sudo rm -r /mnt/nextcloud-ssd/db/k3smnt
$ sudo rm -r /mnt/nextcloud-hdd/data/k3smnt
$ sudo mkdir ...
// on the client
$ kubectl apply -k ...

I'm still curious on how to do that properly on a live service.

And it didn't fix the WRONGPASS issue. I really don't see where the issue is, the redis chapter is pretty straightforward.

from smallab-k8s-pve-guide.

kriegalex avatar kriegalex commented on May 24, 2024

Seems like Nextcloud's config.php with Redis 6+ should now have a user defined.

'redis' =>                           
array (                                                                 
    'host' => '/var/run/redis/redis.sock',
    'user' => 'default',     
    'port' => 0,
    'timeout' => 0.0,
    'password' => 'PASSWORD',
)

I'm trying to see if I can add this via the redis.conf.
EDIT : Nextcloud variables don't seem to allow anything more other than REDIS_HOST, REDIS_HOST_PORT, REDIS_HOST_PASSWORD.

from smallab-k8s-pve-guide.

ehlesp avatar ehlesp commented on May 24, 2024

First know that my current setup is different (simpler) from the one explained in my guides. Still, I do have a Nextcloud instance running with Redis but I don't remember facing that particular problem, even after a number of update cycles. Next, I detail you my current setup:

  • Nextcloud: 26.0.2-apache
  • Redis: 7.0.11-apache
  • MariaDB: 11.0.2-jammy
  • K3s: 1.26.5+k3s1

I've revised my configuration and I haven't applied any fix related to that Redis user issue you've met. I just specify the password (a long alphanumerical one) and it has been working fine all this time for me. Your manual solution seems to be similar to what's indicated in the last message of the Nextcloud issue you've linked.

Regarding what you find in the k3smnt folder directly in the agent VM, it's not surprising that you don't see the config.php file changed because that's a file replaced in the container instance kept in memory. To see what's the effective configuration applied in the running instance, you can shell into the container itself, as I explain in the "Shell access into your containers" found in the G036 guide.

I'll close this issue since there's no problem with the guides themselves in this case.

from smallab-k8s-pve-guide.

kriegalex avatar kriegalex commented on May 24, 2024

Hi @ehlesp ,
I did finally find the issue:

My first lead was this comment on Reddit

image

After checking content of redis.config.php, it seems indeed that having the REDIS_HOST variable set creates additional processing on the $CONFIG.

<?php
if (getenv('REDIS_HOST')) {
  $CONFIG = array(
    'memcache.distributed' => '\OC\Memcache\Redis',
    'memcache.locking' => '\OC\Memcache\Redis',
    'redis' => array(
      'host' => getenv('REDIS_HOST'),
      'password' => (string) getenv('REDIS_HOST_PASSWORD'),
    ),
  );

  if (getenv('REDIS_HOST_PORT') !== false) {
    $CONFIG['redis']['port'] = (int) getenv('REDIS_HOST_PORT');
  } elseif (getenv('REDIS_HOST')[0] != '/') {
    $CONFIG['redis']['port'] = 6379;
  }
}

Checking the file server-apache-nextcloud.statefulset.yaml, the var REDIS_HOST is set there. Commenting it made the NC instance work again without errors. By the way, with this issue, any call to php occ resulted in a WRONGPASS failure, it is not simply an annoying thing in the logs.

But the issue doesn't stop there. If you simply remove the REDIS_HOST, people creating for the first time the pod will have a config.php that does not contain the redis config array, since it is injected by redis.config.php.

Please let me know if I say something wrong, but the procedure is as following.

  1. Apply kustomize config as described in G033 guide.
  2. Comment the REDIS_HOST variable in server-apache-nextcloud.statefulset.yaml.
  3. Re-apply the kustomize config.
  4. Enjoy a bug free Nextcloud.

from smallab-k8s-pve-guide.

ehlesp avatar ehlesp commented on May 24, 2024

I've double checked my own current Nextcloud statefulset and I do have the REDIS_HOST in place perfectly fine, and I've had it there in every update. If you remove it, Nextcloud will work because it won't try to use Redis at all, as you can see in the piece of code you pasted. So you haven't fixed the issue, you just have disabled Redis for Nextcloud, which won't affect much the Nextcloud's server performance if the instance is just for personal use. I think you might have missed something in your own Nextcloud statefulset like not putting the right name or key in the valueFrom of the variable, or something of the sort.

Again, I don't see any issue here concerning the guides. Please stop commenting in this thread since it's a closed matter.

from smallab-k8s-pve-guide.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.