A
A
albertalexandrov2019-06-23 14:15:28
Docker
albertalexandrov, 2019-06-23 14:15:28

Connecting to clickhouse via dbeaver?

Hello!
Can't connect to ClickHouse (KX) in Dbeaver. What I do:
1. Run KX in docker:

docker run -d -p 8123:8123 --name clickhouse-server yandex/clickhouse-server

2. I create a connection in DBeaver:
5d0f5cc59612b604810239.jpeg
3. I perform a connection test, and I get an error:
Unexpected driver error occurred while connecting to database ClickHouse exception, message: Connect to localhost:8123 [localhost/0:0:0:0:0:0:0:1, localhost/127.0.0.1] failed: Connection refused: connect, host: localhost, port: 8123; Connect to localhost:8123 [localhost/0:0:0:0:0:0:0:1, localhost/127.0.0.1] failed: Connection refused: connect ClickHouse exception, message: Connect to localhost:8123 [localhost/0 :0:0:0:0:0:0:1, localhost/127.0.0.1] failed: Connection refused: connect, host: localhost, port: 8123; Connect to localhost:8123 [localhost/0:0:0:0:0:0:0:1, localhost/127.0.0.1] failed: Connection refused: connect Connect to localhost:8123 [localhost/0:0:0: 0:0:0:0:1, localhost/127.0.0.1] failed: Connection refused: connect
ru.yandex.clickhouse.except.ClickHouseUnknownException: ClickHouse exception, message: Connect to localhost:8123 [localhost/0:0:0:0:0:0:0:1, localhost/127.0 .0.1] failed: Connection refused: connect, host: localhost, port: 8123; Connect to localhost:8123 [localhost/0:0:0:0:0:0:0:1, localhost/127.0.0.1] failed: Connection refused: connect
ru.yandex.clickhouse.except.ClickHouseUnknownException: ClickHouse exception, message : Connect to localhost:8123 [localhost/0:0:0:0:0:0:0:1, localhost/127.0.0.1] failed: Connection refused: connect, host: localhost, port: 8123; Connect to localhost:8123 [localhost/0:0:0:0:0:0:0:1, localhost/127.0.0.1] failed: Connection refused: connect
Connect to localhost:8123 [localhost/0:0:0:0:0:0:0:1, localhost/127.0. 0.1] failed: Connection refused: connect
Connection refused: connect
Connection refused: connect

Container info:
5d0f5ef55ad57820505267.jpeg
Driver updated.
Please advise what is the problem.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
RelieveRz, 2020-01-05
@RelieveRz

KX tries to bind to the IPv6 address [:: 1] by default:
You need to find the line 0.0.0.0 in the /etc/clickhouse-server/config.xml file and uncomment it. Then restart the service.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question