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
I can not connect via postgres interface #28159
Comments
I think it's the issue. I also have the same issue about using PostgreSQL interface to cause password authentication method errors. After investigating detailed above methods, I notice that PostgreSQL client is not compatible with ClickHouse PostgreSQL interface. We can look at the PostgreSQL password authentication and ClickHouse password authentication and we can organize following method lists: PostgreSQL client password authentication
PostgreSQL interface provided by ClickHouse
When I create the user with If creating user with the Here are my experiments about above descriptions: localadmin@clickhouse01:~$ clickhouse-client --host=IP_Address --port=9000 --password=password --database
="database"
ClickHouse client version 21.12.3.32 (official build).
Connecting to database database at IP_Address:9000 as user default.
Connected to ClickHouse server version 21.12.3 revision 54452.
clickhouse01 :) create user peter HOST ANY IDENTIFIED WITH sha256_password by 'password';
clickhouse01 :) create user peter2 HOST ANY IDENTIFIED WITH plaintext_password by 'password';
clickhouse01 :) create user peter3 HOST ANY IDENTIFIED WITH double_sha1_password by 'password'; As we can see, I create three users with different password authentication methods. ubuntu@iotdevice01:~/hardware-monitor$ psql --version
psql (PostgreSQL) 12.9 (Ubuntu 12.9-2.pgdg20.04+1)
ubuntu@iotdevice01:~/hardware-monitor$
ubuntu@iotdevice01:~$ psql -h IP_ADDRESS -p 9005 -U peter --password
Password:
psql: error: connection to server at "IP_ADDRESS", port 9005 failed: SSL SYSCALL error: Success
connection to server at "IP_ADDRESS", port 9005 failed: ERROR: Authentication method is not supported
ubuntu@iotdevice01:~$
ubuntu@iotdevice01:~$ psql -h IP_ADDRESS -p 9005 -U peter2 -d default --password
Password:
psql (13.5 (Ubuntu 13.5-2.pgdg20.04+1), server 21.12.3.32)
WARNING: psql major version 13, server major version 21.
Some psql features might not work.
Type "help" for help.
default=> show tables;
name
------
(0 rows)
default=>\q
ubuntu@iotdevice01:~$ psql -h IP_ADDRESS -p 9005 -U peter3 --password
Password:
psql: error: connection to server at "IP_ADDRESS", port 9005 failed: SSL SYSCALL error: Success
connection to server at "IP_ADDRESS", port 9005 failed: ERROR: Authentication method is not supported We can see that it's worked for the
@l-we, it only uses the plain text password to connect ClickHouse via PostgreSQL client. However, this method is not recommended because this approach may be under the sniffing attack. I hope the password authentication will be fixed in the future released version. |
Section was added to the documentation: "The PostgreSQL protocol currently only supports plain-text passwords." https://clickhouse.com/docs/en/interfaces/postgresql/#connect-psql-to-clickhouse The error message is also quite clear:
|
ClickHouse server version 21.8.4.51 (official build).
psql (PostgreSQL) 13.4 (Debian 13.4-1.pgdg110+1)
Encryption :password_sha256_hex
The text was updated successfully, but these errors were encountered: