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

Spark read clickhouse table, connect timed out #1681

Open
selmi2 opened this issue Jun 8, 2024 · 0 comments
Open

Spark read clickhouse table, connect timed out #1681

selmi2 opened this issue Jun 8, 2024 · 0 comments
Labels

Comments

@selmi2
Copy link

selmi2 commented Jun 8, 2024

Describe the bug

Steps to reproduce

  1. download spark
  2. Run server/worker
  3. Run shell : spark/bin/spark-shell --packages com.clickhouse:clickhouse-jdbc:0.6.0-patch5

Expected behaviour

Spark should load the table with success

Code example

var trans = spark.read.format("jdbc").option("url", "jdbc:clickhouse://XXX.XXX.XXX.XXX:8123?connectTimeout=30000").option("dbtable", "default.transctions").option("user", "default").option("password", "default").load()

Error log

java.sql.SQLException: Connect to http://XXXX:8123 [/XXXX] failed: Connect timed out, server ClickHouseNode [uri=http://XXXX:8123/default, options={connectTimeout=30000}]@2104834579
at com.clickhouse.jdbc.SqlExceptionUtils.handle(SqlExceptionUtils.java:85)

Configuration

OpenJDK 64-Bit Server VM (build 21.0.3+9-Ubuntu-1ubuntu122.04.1, mixed mode, sharing)

Environment

  • Client version:
  • Language version:
  • OS: Linux

ClickHouse server

  • ClickHouse Server version: ClickHouse server version 24.4.1
@selmi2 selmi2 added the bug label Jun 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant