Giter Site home page Giter Site logo

Comments (9)

iutx avatar iutx commented on September 7, 2024 1

Confirm whether it is enabled pvc, config e.g.

persistence:
  enabled: true

otherwise you will not be able to record whether you have installed it.

from helm.

zaro avatar zaro commented on September 7, 2024 1

UPDATE: the issue was caused by database being already initialised. I was testing with mariadb-operator, and was deleting the whole database before nextcloud install , but didn't notice that the same PVC for mariadb is being reused , so the data was actually not being deleted.

@jessebot I am having the same issue. Here are the chart values :

## Official nextcloud image version
## ref: https://hub.docker.com/r/library/nextcloud/tags/
ingress:
  enabled: true
  # className: nginx
  annotations:
    nginx.ingress.kubernetes.io/proxy-body-size: 4G
    kubernetes.io/tls-acme: "true"
    cert-manager.io/cluster-issuer: letsencrypt
    nginx.ingress.kubernetes.io/server-snippet: |-
      server_tokens off;
      proxy_hide_header X-Powered-By;
      rewrite ^/.well-known/webfinger /index.php/.well-known/webfinger last;
      rewrite ^/.well-known/nodeinfo /index.php/.well-known/nodeinfo last;
      rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
      rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json;
      location = /.well-known/carddav {
        return 301 $scheme://$host/remote.php/dav;
      }
      location = /.well-known/caldav {
        return 301 $scheme://$host/remote.php/dav;
      }
      location = /robots.txt {
        allow all;
        log_not_found off;
        access_log off;
      }
      location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)/ {
        deny all;
      }
      location ~ ^/(?:autotest|occ|issue|indie|db_|console) {
        deny all;
      }
  tls:
    - secretName: nextcloud-tls
      hosts:
        - nc.mydomain.net
  labels: {}
  path: /
  pathType: Prefix


nextcloud:
  host: nc.mydomain.net
  username: admin
  password: mariadb
  mail:
    enabled: false
    fromAddress: user
    domain: domain.com
    smtp:
      host: domain.com
      secure: ssl
      port: 465
      authtype: LOGIN
      name: user
      password: pass
  # For example, to use S3 as primary storage
  # ref: https://docs.nextcloud.com/server/13/admin_manual/configuration_files/primary_storage.html#simple-storage-service-s3
  #
  configs:
    s3.config.php: |-
      <?php
      $CONFIG = array (
        'objectstore' => array(
          'class' => '\\OC\\Files\\ObjectStore\\S3',
          'arguments' => array(
            'bucket'     => 'nc-test',
            'autocreate' => true,
            'key'        => 'xxx',
            'secret'     => 'xxxx',
            'region'     => 'optional',
            'hostname'   => 'xxx',
            'use_ssl'    => true,
            'use_path_style' => true,
          )
        )
      );

persistence:
  enabled: true

internalDatabase:
  enabled: false
  name: nextcloud

##
## External database configuration
##
externalDatabase:
  enabled: true

  ## Supported database engines: mysql or postgresql
  type: mysql

  ## Database host
  host: mariadb.default.svc

  ## Database user
  user: mariadb

  ## Database password
  password: mariadb

  ## Database name
  database: testdb

redis:
  enabled: false
  auth:
    enabled: true
    password: 'changeme'
    # name of an existing secret with Redis® credentials (instead of auth.password), must be created ahead of time
    existingSecret: ""
    # Password key to be retrieved from existing secret
    existingSecretPasswordKey: ""


cronjob:
  enabled: true

## DEBUG
livenessProbe:
  enabled: false

startupProbe:
  enabled: false

chart version is nextcloud-3.5.13 and after install the nextcloud container logs look like this :

Initializing nextcloud 26.0.2.1 ...
New nextcloud instance
Installing with MySQL database
Starting nextcloud installation
The username is already being used
Retrying install...
The username is already being used
Retrying install...
The username is already being used
Retrying install...
The username is already being used
Retrying install...
The username is already being used
Retrying install...
The username is already being used
Retrying install...
The username is already being used
Retrying install...
The username is already being used
Retrying install...
The username is already being used
Retrying install...
The username is already being used
Retrying install...
The username is already being used
Retrying install...
The username is already being used
Installing of nextcloud failed!

After that the pod restarts, and then apache is starting but when you open NC only this error message is shown :

Error
It looks like you are trying to reinstall your Nextcloud. However the file CAN_INSTALL is missing from your config directory. Please create the file CAN_INSTALL in your config folder to continue.

from helm.

ivantorrellas avatar ivantorrellas commented on September 7, 2024

and when setting replicaCount: => 2, you get 404 errors when load balancer changes pod...

from helm.

wagnst avatar wagnst commented on September 7, 2024

Having exactly the same issue.
Also using existingSecret does not fix it.

from helm.

vasanthaganeshk avatar vasanthaganeshk commented on September 7, 2024

@wagnst Drop database and create again, or you can delete database, pvc, and helm chart and then reinstall the db helm chart.

from helm.

jessebot avatar jessebot commented on September 7, 2024

@iutx has a good suggestion :) I'm still happy to help a bit though, if anyone is still having issues in this thread. If you would like further asisstance, could you please post your values.yaml (please remove sensitive data first) and the version of helm chart you are using? Thank you!

from helm.

luizjr avatar luizjr commented on September 7, 2024

Confirm whether it is enabled pvc, config e.g.

persistence:
  enabled: true

otherwise you will not be able to record whether you have installed it.

When I set persistent to true it gives an internal error, when I disable it it keeps trying to reinstall every time there is an update or restart the container

from helm.

jessebot avatar jessebot commented on September 7, 2024

@luizjr could you please give us a bit more info:

  • the rest of your values.yaml (after removing any sensitive info)
  • the error you're seeing and where you see it
  • Any logs you have would also be helpful in narrowing the issue

from helm.

jessebot avatar jessebot commented on September 7, 2024

Here's where our probes are in the values.yaml:

## Liveness and readiness probe values
## Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
##
livenessProbe:
enabled: true
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 3
successThreshold: 1
readinessProbe:
enabled: true
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 3
successThreshold: 1
startupProbe:
enabled: false
initialDelaySeconds: 30
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 30
successThreshold: 1

here's the persistence docs:
https://github.com/nextcloud/helm/tree/main/charts/nextcloud#persistence-configurations

Closing as it's been a bit over a year without reply from original posters. If anyone in this thread is still having issues after running helm uninstall YOUR_RELEASE_NAME_HERE and deleting your database + PVCs, then trying again with persistence enabled and probes enabled, then please open a new issue with the new issue template (including your values.yaml).

from helm.

Related Issues (20)

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.