Failing to Backup ClickHouse Database: Authentication Failed #1196
-
I've set up a ClickHouse database using the Bitnami Helm Chart. For backup purposes, I added the To address this, I added the backup tool as a sidecar container to the ClickHouse Pod. However, I'm encountering an authentication failure when the backup container tries to connect to the database. Interestingly, if I forward the port to my local machine, I can successfully log in using the same username and password: Is there anything I'm missing in my setup? kubectl -n plausible port-forward svc/plausible-clickhouse 8123:8123 Here is my relevant clickhouse:
image:
shards: 1
replicaCount: 1
keeper:
replicaCount: 1
auth:
enabled: true
username: "plausible"
existingSecret: "plausible-db-clickhouse-credentials"
existingSecretKey: "password"
persistence:
enabled: true
storageClass: "csi-cinder-sc-retain"
size: "8Gi"
initdbScripts:
db-init.sql: |
CREATE DATABASE IF NOT EXISTS plausible_events
sidecars:
- name: backup
image: ghcr.io/altinity/clickhouse-backup:2.6.32
env:
- name: LOG_LEVEL
value: debug
- name: CLICKHOUSE_HOST
value: "localhost"
- name: CLICKHOUSE_PORT
value: "9000"
- name: CLICKHOUSE_USER
value: plausible
- name: CLICKHOUSE_PASSWORD
valueFrom:
secretKeyRef:
name: plausible-db-clickhouse-credentials
key: password
- name: CONFIG_FILE
value: ""
- name: S3_ENDPOINT
value: "https://sos-ch-gva-2.exo.io"
- name: S3_BUCKET
value: "c01-database-backup"
- name: S3_PREFIX
value: "clickhouse/plausible"
- name: CLICKHOUSE_BACKUP_S3_ACCESS_KEY
valueFrom:
secretKeyRef:
name: s3-credentials
key: accessKeyId
- name: CLICKHOUSE_BACKUP_S3_SECRET_KEY
valueFrom:
secretKeyRef:
name: s3-credentials
key: secretAccessKey
- name: CLICKHOUSE_BACKUP_S3_REGION
value: "ch-gva-2"
volumeMounts:
- mountPath: /bitnami/clickhouse
name: data Here is the error I'm facing: :/# clickhouse-backup create_remote
2025-08-07 14:37:35.131 INF pkg/clickhouse/clickhouse.go:131 > clickhouse connection prepared: tcp://localhost:9000 run ping
2025-08-07 14:37:35.133 WRN pkg/clickhouse/clickhouse.go:141 > clickhouse connection ping: tcp://localhost:9000 return error: code: 516, message: default: Authentication failed: password is incorrect, or there is no user with such name.
If you use ClickHouse Cloud, the password can be reset at https://clickhouse.cloud/
on the settings page for the corresponding service.
If you have installed ClickHouse and forgot password you can reset it in the configuration file.
The password for default user is typically located at /etc/clickhouse-server/users.d/default-password.xml
and deleting this file will reset the password.
See also /etc/clickhouse-server/users.xml on the server where ClickHouse is installed., will wait 5 second to reconnect |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
user |
Beta Was this translation helpful? Give feedback.
user
CLICKHOUSE_USERNAME
instead ofCLICKHOUSE_USER
you tried to connect withdefault
user