Skip to content

clickhouse-jdbc password contains =? Connection failed. #1305

@xiaowuyy

Description

@xiaowuyy

Describe the bug

password contains =?use clickhouse-jdbc connection failed.

Steps to reproduce

  1. clickhouse server version 21.8.8.1
  2. password AF.O4P=?m76.lHfa
  3. <dependency>
         <groupId>ru.yandex.clickhouse</groupId>
         <artifactId>clickhouse-jdbc</artifactId>
         <version>0.3.2</version>
     </dependency>
    
  4. error message:
    Code: 516, e.displayText() = DB::Exception: apmhouse: Auth*****##he username or password##*****ion 21.8.8.1)[N], server ClickHouseNode(addr=http:ip:port, db=system)@-609109239

Expected behaviour

connection success

Code example

        Properties properties = new Properties();
        properties.setProperty("ssl", "true");
        properties.setProperty("sslmode", "NONE");
        properties.setProperty("user", "apmhouse");
        properties.setProperty("password", "AF.O4P=?m76.lHfa");
        Connection connection = DriverManager.getConnection(url, properties);

Error log

client:
Code: 516, e.displayText() = DB::Exception: apmhouse: Auth*****##he username or password##*****ion 21.8.8.1)[N], server ClickHouseNode(addr=http:ip:port, db=system)@-609109239
server:
2023.04.03 15:46:54.681974 [ 456 ] {} DynamicQueryHandler: Request URI: /?extremes=0
2023.04.03 15:46:54.686019 [ 456 ] {} Access(user directories): apmhouse: Authentication failed: Code: 193, e.displayText() = DB::Exception: Invalid credentials, Stack trace (when copying this message, always include the lines below):

  1. ? @ 0x10273542 in /opt/apm-clickhouse/programs/clickhouse
  2. ? @ 0x519804f in /opt/apm-clickhouse/programs/clickhouse
  3. ? @ 0x4aad274 in /opt/apm-clickhouse/programs/clickhouse
  4. ? @ 0x4aaf101 in /opt/apm-clickhouse/programs/clickhouse
  5. ? @ 0xc6f5d6a in /opt/apm-clickhouse/programs/clickhouse
  6. ? @ 0xc71bb53 in /opt/apm-clickhouse/programs/clickhouse
  7. ? @ 0xc6f5d6a in /opt/apm-clickhouse/programs/clickhouse
  8. ? @ 0xca80ca7 in /opt/apm-clickhouse/programs/clickhouse
  9. ? @ 0xdc23d83 in /opt/apm-clickhouse/programs/clickhouse
  10. ? @ 0xdc24e01 in /opt/apm-clickhouse/programs/clickhouse
  11. ? @ 0xdc2ade9 in /opt/apm-clickhouse/programs/clickhouse
  12. ? @ 0xdc46a56 in /opt/apm-clickhouse/programs/clickhouse
  13. ? @ 0xe1e5bd9 in /opt/apm-clickhouse/programs/clickhouse
  14. ? @ 0xe1e64ee in /opt/apm-clickhouse/programs/clickhouse
  15. ? @ 0x102ede2e in /opt/apm-clickhouse/programs/clickhouse
  16. ? @ 0x102ea8f7 in /opt/apm-clickhouse/programs/clickhouse
  17. ? @ 0x8f3b in /usr/lib64/libpthread-2.28.so
  18. clone @ 0xf8570 in /usr/lib64/libc-2.28.so
    (version 21.8.8.1)

Configuration

Environment

  • Client version: 0.3.2
  • Language version:
  • OS:

ClickHouse server

  • ClickHouse Server version: 21.8.8.1
  • ClickHouse Server non-default settings, if any:
  • CREATE TABLE statements for tables involved:
  • Sample data for all these tables, use clickhouse-obfuscator if necessary

Metadata

Metadata

Assignees

Labels

bugmodule-httpHTTP/HTTPS clientusabilitywhat affects usability of the client

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions