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

Error reading clickhouse data #8512

Open
2 of 3 tasks
YTQ419 opened this issue Jan 13, 2025 · 1 comment
Open
2 of 3 tasks

Error reading clickhouse data #8512

YTQ419 opened this issue Jan 13, 2025 · 1 comment
Labels

Comments

@YTQ419
Copy link

YTQ419 commented Jan 13, 2025

Search before asking

  • I had searched in the issues and found no similar issues.

What happened

clickhouse version : 19.17.4.11
image

SeaTunnel Version

2.3.8

SeaTunnel Config

# Set the basic configuration of the task to be performed
env {
  parallelism = 1
  job.mode = "BATCH"
}

# Create a source to connect to Clickhouse
source {
  Clickhouse {
    host = "10.15.255.66:8123"
    database = "fishlog4"
    sql = "SELECT `cktime`, `userid` FROM fishlog4.shard_user_event limit 10"
    username = "default"
    password = "0m5Z=+LaSu=0"
    server_time_zone = "UTC"
    result_table_name = "test_local"
    clickhouse.config = {
      "socketTimeout": "300000"
    }
  }
}

# Console printing of the read Clickhouse data
sink {
  Console {
    parallelism = 1
  }
}

Running Command

./bin/seatunnel.sh --config ./job/test.conf -m local

Error Exception

Caused by: org.apache.seatunnel.connectors.seatunnel.clickhouse.exception.ClickhouseConnectorException: ErrorCode:[API-01], ErrorDescription:[Configuration item validate failed] - PluginName: Clickhouse, PluginType: SOURCE, Message: com.clickhouse.client.ClickHouseException: Reached end of input stream after reading 7 of 9 bytes, server ClickHouseNode [uri=http://localhost:8123/default, options={server_time_zone=UTC,socket_timeout=30000000,compress=ture,use_client_time_zone=false,add_http_cors_header=false,apache_buffer_size=65536,connection_timeout=10000}]@2418022
        at com.clickhouse.client.ClickHouseException.of(ClickHouseException.java:168)
        at com.clickhouse.client.AbstractClient.lambda$execute$0(AbstractClient.java:291)
        at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1604)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:750)
Caused by: java.io.IOException: Reached end of input stream after reading 7 of 9 bytes
        at com.clickhouse.client.stream.AbstractByteArrayInputStream.readBytes(AbstractByteArrayInputStream.java:241)
        at com.clickhouse.client.stream.AbstractByteArrayInputStream.readBuffer(AbstractByteArrayInputStream.java:168)
        at com.clickhouse.client.ClickHouseInputStream.readString(ClickHouseInputStream.java:703)
        at com.clickhouse.client.ClickHouseInputStream.readUnicodeString(ClickHouseInputStream.java:739)
        at com.clickhouse.client.data.ClickHouseRowBinaryProcessor.readColumns(ClickHouseRowBinaryProcessor.java:543)
        at com.clickhouse.client.ClickHouseDataProcessor.<init>(ClickHouseDataProcessor.java:298)
        at com.clickhouse.client.data.ClickHouseRowBinaryProcessor.<init>(ClickHouseRowBinaryProcessor.java:571)
        at com.clickhouse.client.ClickHouseDataStreamFactory.getProcessor(ClickHouseDataStreamFactory.java:57)
        at com.clickhouse.client.data.ClickHouseStreamResponse.<init>(ClickHouseStreamResponse.java:76)
        at com.clickhouse.client.data.ClickHouseStreamResponse.of(ClickHouseStreamResponse.java:53)
        at com.clickhouse.client.http.ClickHouseHttpClient.send(ClickHouseHttpClient.java:126)
        at com.clickhouse.client.AbstractClient.sendAsync(AbstractClient.java:156)
        at com.clickhouse.client.AbstractClient.lambda$execute$0(AbstractClient.java:289)
        ... 4 more

        at org.apache.seatunnel.connectors.seatunnel.clickhouse.source.ClickhouseSource.prepare(ClickhouseSource.java:148)
        at org.apache.seatunnel.engine.core.parse.JobConfigParser.parseSource(JobConfigParser.java:83)
        at org.apache.seatunnel.engine.core.parse.MultipleTableJobConfigParser.parseSource(MultipleTableJobConfigParser.java:370)
        at org.apache.seatunnel.engine.core.parse.MultipleTableJobConfigParser.parse(MultipleTableJobConfigParser.java:209)
        at org.apache.seatunnel.engine.client.job.ClientJobExecutionEnvironment.getLogicalDag(ClientJobExecutionEnvironment.java:114)
        at org.apache.seatunnel.engine.client.job.ClientJobExecutionEnvironment.execute(ClientJobExecutionEnvironment.java:182)
        at org.apache.seatunnel.core.starter.seatunnel.command.ClientExecuteCommand.execute(ClientExecuteCommand.java:160)
        ... 2 more

Zeta or Flink or Spark Version

No response

Java or Scala Version

1.8

Screenshots

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@YTQ419 YTQ419 added the bug label Jan 13, 2025
@zhilinli123
Copy link
Contributor

@YTQ419 Please provide the fishlog4.shard user event DDL

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

2 participants