-
Notifications
You must be signed in to change notification settings - Fork 258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When restarting pod error: "The username is already being used" #52
Comments
and when setting |
Having exactly the same issue. |
@wagnst Drop database and create again, or you can delete database pvc and helm chart and reinstall the db helm chart. |
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. |
@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! |
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 |
@luizjr could you please give us a bit more info:
|
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.
## 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
After that the pod restarts, and then apache is starting but when you open NC only this error message is shown :
|
I'm getting this issue when restarting the pod, using any postgresql or mariadb, the new pod always tries to install like is a fresh install.
I'm passing username and password in the values file:
helm/charts/nextcloud/values.yaml
Lines 63 to 66 in 9ce989e
The text was updated successfully, but these errors were encountered: