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

Connection issue with JDBC driver #78

Open
Sushil2468 opened this issue Jun 3, 2024 · 15 comments
Open

Connection issue with JDBC driver #78

Sushil2468 opened this issue Jun 3, 2024 · 15 comments
Labels
documentation Improvements or additions to documentation

Comments

@Sushil2468
Copy link

Sushil2468 commented Jun 3, 2024

Hi Team

I am getting connection error when trying with JDBC driver. With ODBC I am able to connect but it is very slow on our tableau server so wanted to try this. Here is the error msg:

An error occurred while communicating with the ClickHouse JDBC by ClickHouse, Inc. data source 'Untitled Data Source'
Bad Connection: Tableau could not connect to the data source.
Error Code: FAB9A2C5
connect timed out, server ClickHouseNode [uri=http://clickhouse-bayerd.ds-engine-dev.sc-navigator.azure.cnb:8123/default, options={custom_http_params=join_use_nulls=1,session_id=tableau-jdbc-connector-1717421874896-98240641,typeMappings=UInt64=java.lang.String,UInt128=java.lang.String,Int128=java.lang.String,UInt256=java.lang.Double,Int256=java.lang.Double,socket_timeout=300000}]@-1240071617
Unable to connect to the ClickHouse JDBC by ClickHouse, Inc. server "clickhouse-bayerd.ds-engine-dev.sc-navigator.azure.cnb". Check that the server is running and that you have access privileges to the requested database.

Connector Class: clickhouse_jdbc, Version: 0.2.6
Taco file used is: clickhouse_jdbc_0.3.1.taco

Can someone please help. Thanks in advance.

Best Regards
Sushil

@Sushil2468
Copy link
Author

This is the error:

An error occurred while communicating with the ClickHouse JDBC by ClickHouse, Inc. data source 'Untitled Data Source'
Bad Connection: Tableau could not connect to the data source.
Error Code: FAB9A2C5

<title>400 The plain HTTP request was sent to HTTPS port</title>

400 Bad Request

The plain HTTP request was sent to HTTPS port
nginx , server ClickHouseNode [uri=http://clickhouse-bayerd.ds-engine-dev.sc-navigator.azure.cnb:443/default, options={custom_http_params=join_use_nulls=1,session_id=tableau-jdbc-connector-1717422230521-61290111,typeMappings=UInt64=java.lang.String,UInt128=java.lang.String,Int128=java.lang.String,UInt256=java.lang.Double,Int256=java.lang.Double,socket_timeout=300000}]@1000635078 Unable to connect to the ClickHouse JDBC by ClickHouse, Inc. server "clickhouse-bayerd.ds-engine-dev.sc-navigator.azure.cnb". Check that the server is running and that you have access privileges to the requested database. Connector Class: clickhouse_jdbc, Version: 0.2.6

@yurifal
Copy link
Contributor

yurifal commented Jun 3, 2024

Could you please check / select the SSL flag on the connection dialog?

@Sushil2468
Copy link
Author

yes SSL is checked

@yurifal
Copy link
Contributor

yurifal commented Jun 3, 2024

check if the DNS name ( clickhouse-bayerd.ds-engine-dev.sc-navigator.azure.cnb ) could be resolved.

nslookup clickhouse-bayerd.ds-engine-dev.sc-navigator.azure.cnb

@Sushil2468
Copy link
Author

Hi Yuri

I am able to connect through tableau desktop now by adding the sslrootcert=/Users/username/Downloads/ds-engine-dev.sc-navigator.azure.cnb.crt
But in live connection after publishing to server it gives error due to this local directory. Is there somewhere I can add it in tableau server?
Could not open file from: classpath:/Users/username/Downloads/ds-engine-dev.sc-navigator.azure.cnb.crt, server ClickHouseNode [uri=https://clickhouse-bayerd.ds-engine-dev.sc-navigator.azure.cnb:443/default, options={sslrootcert=/Users/username/Downloads/ds-engine-dev.sc-navigator.azure.cnb.crt,custom_http_params=join_use_nulls=1,session_id=tableau-jdbc-connector-1717434467628-30242491,typeMappings=UInt64=java.lang.String,UInt128=java.lang.String,Int128=java.lang.String,UInt256=java.lang.String,Int256=java.lang.String,sslmode=STRICT,socket_timeout=300000}]@1409109279
Unable to connect to the ClickHouse JDBC by ClickHouse, Inc. server "clickhouse-bayerd.ds-engine-dev.sc-navigator.azure.cnb". Check that the server is running and that you have access privileges to the requested database.

@yurifal
Copy link
Contributor

yurifal commented Jun 3, 2024

The 'better place' for the cert file (common in either *nix flavour) is /etc/ssl/certs imho.

Or you may want to try the 'ssl=NONE' workaround (no cert file needed):
#73

@Sushil2468
Copy link
Author

for windows server?

@Sushil2468
Copy link
Author

where can I find this /etc/ssl/certs path in windows server?

@yurifal
Copy link
Contributor

yurifal commented Jun 3, 2024

Create the dir C:\etc\ssl\certs

@Sushil2468
Copy link
Author

Hi Yuri

Tried creating the folder on both server node machines but still same error

@Sushil2468
Copy link
Author

tried SSL=None but not able to connect after it

@yurifal
Copy link
Contributor

yurifal commented Jun 4, 2024

tried SSL=None but not able to connect after it

Did you try this (on the Desktop at least):

Solution: disable SSL in General tab, but in advanced tab add: ssl=true,sslmode=NONE

It may not work (depends on the CH server config settings).

@yurifal
Copy link
Contributor

yurifal commented Jun 4, 2024

Hi Yuri

Tried creating the folder on both server node machines but still same error

Could you please check if placing the cert file into the C:\etc\ssl\certs
(with the proper permissions of course) would work for the Tableau Desktop at least?
If yes, do the same on the TS machine. Please check the permissions on the dir & file --
every (windows) user has to be able to reach the cert file for reading.

@Sushil2468
Copy link
Author

Thankyou so much Yuri, ssl=true,sslmode=NONE this works..

@yurifal
Copy link
Contributor

yurifal commented Jun 4, 2024

Thankyou so much Yuri, ssl=true,sslmode=NONE this works..

Nice.

@mshustov mshustov added the documentation Improvements or additions to documentation label Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants