Skip to content
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

Backup tool is not able to connect to CH server: wrong credentials issue #69

Closed
artempronevskiy opened this issue Dec 22, 2019 · 4 comments

Comments

@artempronevskiy
Copy link

artempronevskiy commented Dec 22, 2019

Hello,

This is weird issue but clickhouse-backup can't connect to clickhouse server. I tried pass credentials via env vars and via config, but no luck.

I have Clickhouse server running on 9001 port with default user and some password let's say 123. I can connect to CH via clickhouse-client w/o any problems:

$ clickhouse-client --port 9001 -u default --password 123
ClickHouse client version 19.13.1.11 (official build).
Connecting to localhost:9001 as user default.
Connected to ClickHouse server version 19.13.1 revision 54425.

clickhouse :) exit
Bye.

But connection to CH fails if I do it via clickhouse-backup:

$ export CLICKHOUSE_USERNAME=default
$ export CLICKHOUSE_PASSWORD=123
$ export CLICKHOUSE_PORT=9001
$ ./clickhouse-backup tables
2019/12/22 22:09:51 can't connect to clickouse with: code: 193, message: Wrong password for user default

Clickhouse-backup is the latest build:

./clickhouse-backup -v
Version:	 v0.5.1
Git Commit:	 5dc6234a1052c076de409666858bd4c1c6dbb48a
Build Date:	 2019-12-03

There is the same behavior if I pass creds and port via config file.
What can be wrong? How can I debug? Thanks.

@AlexAkulov
Copy link
Collaborator

Maybe your password contains special characters that break format string here https://github.com/AlexAkulov/clickhouse-backup/blob/6160f7f6d90fac0d0ff012231753f5e9411a9e14/pkg/chbackup/clickhouse.go#L77-L78

@artempronevskiy
Copy link
Author

@AlexAkulov thanks for the reply. I will check this.

@AlexAkulov
Copy link
Collaborator

Have you resolved your issue?

@AlexAkulov
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants