ClickHouse Version:1.1.54380
i change the /etc/clickhouse-server/config.xml to set the listen_host to 0.0.0.0. and restart clickhouse
tcp 0 0 0.0.0.0:9000 0.0.0.0:* LISTEN 16545/clickhouse-se
and then ,i want to use clickhouse-client -h 10.128.210.150 to enter the clickhouse ,but i got error
ClickHouse client version 1.1.54380.
Connecting to 10.128.210.150:9000.
Code: 102. DB::NetException: Unexpected packet from server 10.128.210.150:9000 (expected Hello or Exception, got Unknown packet)
Try set the listen_host to <listen_host>::</listen_host> , it could accept connections both with IPv4 and IPv6
I changed default settings to:
<listen_host>127.0.0.1</listen_host>
<listen_host>192.168.56.102</listen_host>
When executing command $ sudo reboot. When OS boot tries to connect to server CH. But get the error:
$ clickhouse-client
ClickHouse client version 1.1.54385.
Connecting to localhost:9000.
Code: 210. DB::NetException: Connection refused: (localhost:9000, ::1)
<listen_host>::</listen_host> - is work...2018.06.19 02:17:21.428716 [ 3 ] <Information> Application: Received termination signal (Terminated)
2018.06.19 02:17:21.429110 [ 1 ] <Debug> Application: Received termination signal.
2018.06.19 02:17:21.429193 [ 1 ] <Debug> Application: Waiting for current connections to close.
2018.06.19 02:17:22.266618 [ 1 ] <Debug> Application: Closed all listening sockets.
2018.06.19 02:17:22.266651 [ 1 ] <Debug> Application: Closed connections.
2018.06.19 02:17:22.267455 [ 1 ] <Information> Application: Shutting down storages.
2018.06.19 02:17:22.267516 [ 1 ] <Debug> Application: Shutted down storages.
2018.06.19 02:17:22.268469 [ 1 ] <Debug> Application: Destroyed global context.
2018.06.19 02:17:22.268531 [ 1 ] <Information> Application: shutting down
2018.06.19 02:17:22.268536 [ 1 ] <Debug> Application: Uninitializing subsystem: Logging Subsystem
2018.06.19 02:17:22.268674 [ 3 ] <Information> BaseDaemon: Stop SignalListener thread
2018.06.19 02:17:22.302424 [ 1 ] <Information> : Starting daemon with revision 54385
2018.06.19 02:17:22.305001 [ 1 ] <Information> Application: starting up
2018.06.19 02:17:22.306702 [ 1 ] <Debug> Application: rlimit on number of file descriptors is 500000
2018.06.19 02:17:22.306777 [ 1 ] <Debug> Application: Initializing DateLUT.
2018.06.19 02:17:22.306790 [ 1 ] <Trace> Application: Initialized DateLUT with time zone `W-SU'.
2018.06.19 02:17:22.307751 [ 1 ] <Debug> Application: Configuration parameter 'interserver_http_host' doesn't exist or exists and empty. Will use 'clean' as replica host.
2018.06.19 02:17:22.312334 [ 1 ] <Debug> ConfigReloader: Loading config `/etc/clickhouse-server/users.xml'
2018.06.19 02:17:22.314616 [ 1 ] <Information> Application: Loading metadata.
2018.06.19 02:17:22.314750 [ 1 ] <Information> DatabaseOrdinary (system): Total 0 tables.
2018.06.19 02:17:22.314758 [ 1 ] <Information> DatabaseOrdinary (system): Starting up tables.
2018.06.19 02:17:22.315313 [ 1 ] <Information> DatabaseOrdinary (default): Total 0 tables.
2018.06.19 02:17:22.315335 [ 1 ] <Information> DatabaseOrdinary (default): Starting up tables.
2018.06.19 02:17:22.315528 [ 1 ] <Debug> Application: Loaded metadata.
2018.06.19 02:17:22.316160 [ 1 ] <Information> Application: Listening http://127.0.0.1:8123
2018.06.19 02:17:22.318669 [ 1 ] <Information> Application: Listening tcp: 127.0.0.1:9000
2018.06.19 02:17:22.318728 [ 1 ] <Information> Application: Listening interserver http: 127.0.0.1:9009
2018.06.19 02:17:22.318811 [ 1 ] <Information> Application: Listening http://192.168.56.102:8123
2018.06.19 02:17:22.318833 [ 1 ] <Information> Application: Listening tcp: 192.168.56.102:9000
2018.06.19 02:17:22.319375 [ 1 ] <Information> Application: Listening interserver http: 192.168.56.102:9009
2018.06.19 02:17:22.319953 [ 1 ] <Information> Application: Available RAM = 1.95 GiB; physical cores = 4; threads = 4.
2018.06.19 02:17:22.319976 [ 1 ] <Information> Application: Ready for connections.
2018.06.19 02:17:24.330241 [ 2 ] <Debug> ConfigReloader: Loading config `/etc/clickhouse-server/config.xml'
Code: 210. DB::NetException: Connection refused: (localhost:9000, ::1)
<listen_host>127.0.0.1</listen_host><listen_host>::1</listen_host>or you can configure default host for client:
/etc/clickhouse-client/config.xml:
<host>127.0.0.1</host>
You can run
clickhouse-client --host=127.0.0.1
instead of
clickhouse-client
Most helpful comment
Try set the listen_host to
<listen_host>::</listen_host>, it could accept connections both with IPv4 and IPv6