clickhouse-java icon indicating copy to clipboard operation
clickhouse-java copied to clipboard

skywalking + clickhouse-jdbc return errorCode 1002, state null 400 Bad Request

Open tz826 opened this issue 4 years ago • 3 comments

skywalking:8.3 clickhouse-jdbc:0.3.1 clickhouse:21.4.5.46

skywalking + clickhouse-jdbc return HttpResponseProxy{HTTP/1.1 400 Bad Request [Connection: Close] ResponseEntityProxy{[Chunked: false]}}

=============detail=============

, errorCode 1002, state null ru.yandex.clickhouse.except.ClickHouseUnknownException: ClickHouse exception, code: 1002, host: , port: 8123; HTTP/1.1 400 Bad Request at ru.yandex.clickhouse.except.ClickHouseExceptionSpecifier.getException(ClickHouseExceptionSpecifier.java:92) at ru.yandex.clickhouse.except.ClickHouseExceptionSpecifier.specify(ClickHouseExceptionSpecifier.java:56) at ru.yandex.clickhouse.except.ClickHouseExceptionSpecifier.specify(ClickHouseExceptionSpecifier.java:25) at ru.yandex.clickhouse.ClickHouseStatementImpl.checkForErrorAndThrow(ClickHouseStatementImpl.java:1092) at ru.yandex.clickhouse.ClickHouseStatementImpl.getInputStream(ClickHouseStatementImpl.java:773) at ru.yandex.clickhouse.ClickHouseStatementImpl.getLastInputStream(ClickHouseStatementImpl.java:691) at ru.yandex.clickhouse.ClickHouseStatementImpl.executeQuery(ClickHouseStatementImpl.java:340) at ru.yandex.clickhouse.ClickHouseStatementImpl.executeQuery(ClickHouseStatementImpl.java:324) at ru.yandex.clickhouse.ClickHouseStatementImpl.executeQuery(ClickHouseStatementImpl.java:319) at ru.yandex.clickhouse.ClickHouseStatementImpl.executeQuery(ClickHouseStatementImpl.java:314) at ru.yandex.clickhouse.ClickHouseConnectionImpl.initConnection(ClickHouseConnectionImpl.java:91) at ru.yandex.clickhouse.ClickHouseConnectionImpl.(ClickHouseConnectionImpl.java:78) at ru.yandex.clickhouse.ClickHouseDriver.connect(ClickHouseDriver.java:62) at ru.yandex.clickhouse.BalancedClickhouseDataSource.getConnection(BalancedClickhouseDataSource.java:195) at com.alibaba.druid.support.clickhouse.BalancedClickhouseDriver.connect(BalancedClickhouseDriver.java:27) at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1657) at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1723) at com.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run(DruidDataSource.java:2801) Caused by: java.lang.IllegalStateException: HTTP/1.1 400 Bad Request ... 15 common frames omitted

tz826 avatar May 26 '21 08:05 tz826

Hi @tz826, could you share the query passed to JDBC driver as well as relevant table structure in database? I don't have a working environment so it would be very helpful to give me a minimum reproducible example like docker-compose?

zhicwu avatar May 26 '21 09:05 zhicwu

Hi @tz826, could you share the query passed to JDBC driver as well as relevant table structure in database? I don't have a working environment so it would be very helpful to give me a minimum reproducible example like docker-compose?

open web link : https://github.com/tz826/ck-jdbc-demo/tree/master

tz826 avatar May 27 '21 05:05 tz826

Hi @tz826, could you share the query passed to JDBC driver as well as relevant table structure in database? I don't have a working environment so it would be very helpful to give me a minimum reproducible example like docker-compose?

open web link : https://github.com/tz826/ck-jdbc-demo/tree/master

it has been fixed in clickhouse:21.6 see : https://github.com/ClickHouse/ClickHouse/issues/23901 https://github.com/ClickHouse/ClickHouse/blob/master/CHANGELOG.md

gabrielsky avatar Jun 10 '21 10:06 gabrielsky