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

Unknown compression magic code: 105 #457

Open
beijishiqidu opened this issue Dec 5, 2023 · 2 comments
Open

Unknown compression magic code: 105 #457

beijishiqidu opened this issue Dec 5, 2023 · 2 comments

Comments

@beijishiqidu
Copy link

Environment

  • OS version:
  • JDK version: 1.8
  • ClickHouse Server version: 23.8.2.7
  • ClickHouse Native JDBC version: 2.7.1
  • (Optional) Spark version: N/A
  • (Optional) Other components' version: N/A

Error logs

isClosed: false
Exception in thread "main" java.lang.UnsupportedOperationException: Unknown compression magic code: 105
	at com.github.housepower.buffer.CompressedBuffedReader.readCompressedData(CompressedBuffedReader.java:101)
	at com.github.housepower.buffer.CompressedBuffedReader.readBinary(CompressedBuffedReader.java:45)
	at com.github.housepower.serde.BinaryDeserializer.readVarInt(BinaryDeserializer.java:47)
	at com.github.housepower.protocol.Response.readFrom(Response.java:29)
	at com.github.housepower.client.NativeClient.receiveResponse(NativeClient.java:207)
	at com.github.housepower.client.NativeClient.ping(NativeClient.java:113)
	at com.github.housepower.jdbc.ClickHouseConnection.isValid(ClickHouseConnection.java:213)
	at com.huawei.jdbc.NoEncryptJdbcClient.main(NoEncryptJdbcClient.java:30)

Steps to reproduce

When an error is reported when I query the system.settings_changes table, the current connection becomes invalid. Or it can no longer proceed with other query requests.

because this issue: #456

public static void main(String[] args) throws Exception {
        Class.forName("com.github.housepower.jdbc.ClickHouseDriver");
        Properties clickHouseProperties = new Properties();
        clickHouseProperties.put("user", "nethouse");
        clickHouseProperties.put("password", "xxxxxxx");
        Connection conn = DriverManager.getConnection("jdbc:clickhouse://10.185.206.152:9120/NETHOUSE",
            clickHouseProperties);
        try {
            ResultSet resultSet = conn.createStatement().executeQuery("select * from system.settings_changes");
        } catch (Throwable e) {
            // e.printStackTrace();
        }

        System.out.println("isClosed: " + conn.isClosed());
        System.out.println("isValid: " + conn.isValid(2));
        try {
            ResultSet resultSet = conn.createStatement().executeQuery("select * from system.clusters");
        } catch (SQLException e) {
            // e.printStackTrace();
        }
    }

Other descriptions

It's kind of like the #432 issue

@beijishiqidu
Copy link
Author

@dmitrybugakov Hello, my friend, is this open source software unmaintained now? I found a lot of problems that didn't close and didn't adapt to the latest ClickHouse version.

@demetribu
Copy link
Collaborator

Hello @beijishiqidu

Unfortunately, I don't have time right now to actively maintain this project. Regarding your notice, it could be because we are testing against a "clickhouse-server:21.9" version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants