Invalid authentication:
I'm trying to connect to clickhouse with such jdbc url (clickhouse-jdbc 0.4.0):
jdbc:clickhouse://host:port/?socket_timeout=6000000&custom_settings=user%3Ddefault%2Cpassword%3Dpassword
But got an error:
Execution error (IOException) at com.clickhouse.client.http.HttpUrlConnectionImpl/checkResponse (HttpUrlConnectionImpl.java:184).
Code: 516. DB::Exception: Invalid authentication: it is not allowed to use SSL certificate authentication and authentication via parameters simultaneously simultaneously. (AUTHENTICATION_FAILED) (version 22.6.9.11 (official build))
UPD: I also tried to pass creds in ordinary url params, in params using //user:pass@, add ssl=false, sslmode=none
Hi @ilevd, it looks like the default user is configured to use SSL certificate for authentication? Have you checked config.xml in ClickHouse server?
Hi @zhicwu, settings are standard, I'm migrating from ru.yandex.clickhouse/clickhouse-jdbc "0.3.1" driver, with it it connects normally with user/password in url string.
Might be an issue similar to #1114, will try to fix it in the upcoming connection string parser.
As a workaround, perhaps you may use connection properties to set credentials instead of putting them in url?
It seems that the problem was on my side, because now it works, maybe it was some typo ot smth else. Sorry for bothering, I think we can close the issue.
Thanks for the update. Will close this one after checking against new connection string parser.
not applicable for new client-v2