Docker Community Forums

Share and learn in the Docker community.

Using the ClickHouse Server Docker Image - Connection refused


#1

I’m trying to use the Clickhouse Docker images as explained here but I’m making some mistake that I can’t fathom. Any help would be greatly appreciated.

Microsoft Windows [Version 10.0.17134.523]
(c) 2018 Microsoft Corporation. All rights reserved.

C:\Users\neilc>docker run -d --name ds-statsqlr --ulimit nofile=262144:262144 yandex/clickhouse-server
5d1a87b20f567883def2f6760cdaa36ba4611d0ccb991120a690ffbbabc25162

C:\Users\neilc>docker run -it --rm --link ds-statsqlr:clickhouse-server yandex/clickhouse-client --host clickhouse-server
ClickHouse client version 19.1.6.
Connecting to clickhouse-server:9000.
Connected to ClickHouse server version 19.1.6 revision 54413.

5d1a87b20f56 :)

Then a connection to localhost is refused.

C:\Users\neilc>curl http://localhost:8123/
curl: (7) Failed to connect to localhost port 8123: Connection refused

#2

Solved by adding -p HOST_PORT:CONTAINER_PORT, in this case -p 8123:8123