># grep "Listening" *.log
clickhouse-server.log:2023.03.06 18:17:06.605287 [ 909 ] {} <Information> Application: Listening for http://[::]:8123
clickhouse-server.log:2023.03.06 18:17:06.605347 [ 909 ] {} <Information> Application: Listening for native protocol (tcp): [::]:9000
clickhouse-server.log:2023.03.06 18:17:06.605394 [ 909 ] {} <Information> Application: Listening for MySQL compatibility protocol: [::]:9004
clickhouse-server.log:2023.03.06 18:17:06.605432 [ 909 ] {} <Information> Application: Listening for PostgreSQL compatibility protocol: [::]:9005
clickhouse-server.log:2023.03.06 18:17:06.605474 [ 909 ] {} <Information> Application: Listening for replica communication (interserver): http://[::]:9009
It seems to be listening on [::], but I have the following in the config.xml:
<!-- Listen specified address.
Use :: (wildcard IPv6 address), if you want to accept connections both with IPv4 and IPv6 from everywhere.
Notes:
If you open connections from wildcard address, make sure that at least one of the following measures applied:
- server is protected by firewall and not accessible from untrusted networks;
- all users are restricted to subset of network addresses (see users.xml);
- all users have strong passwords, only secure (TLS) interfaces are accessible, or connections are only made via TLS interfaces.
- users without password have readonly access.
See also:
https://www.shodan.io/search?query=clickhouse -->
<!-- <listen_host>::</listen_host> -->
<!-- Default values - try listen localhost on IPv4 and IPv6. -->
<!--
<listen_host>::1</listen_host>
<listen_host>127.0.0.1</listen_host>
-->
<!-- <interserver_listen_host>::</interserver_listen_host> -->
<!-- Listen host for communication between replicas. Used for data exchange -->
<!-- Default values - equal to listen_host -->
<!-- Don't exit if IPv6 or IPv4 networks are unavailable while trying to listen. -->
<!-- <listen_try>0</listen_try> -->
<!-- Allow multiple servers to listen on the same address:port. This is not recommended.
-->
<!-- <listen_reuse_port>0</listen_reuse_port> -->
<!-- <listen_backlog>4096</listen_backlog> -->
Here my net config:
># ifconfig
enp7s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1450
inet 10.0.0.9 netmask 255.255.255.255 broadcast 10.0.0.9
inet6 fe80::8400:ff:fe3a:df9c prefixlen 64 scopeid 0x20<link>
ether 86:00:00:3a:df:9c txqueuelen 1000 (Ethernet)
RX packets 1 bytes 350 (350.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 13 bytes 1278 (1.2 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 95.216.203.192 netmask 255.255.255.255 broadcast 95.216.203.192
inet6 fe80::9400:1ff:fef7:8cfb prefixlen 64 scopeid 0x20<link>
inet6 2a01:4f9:c010:d027::1 prefixlen 64 scopeid 0x0<global>
ether 96:00:01:f7:8c:fb txqueuelen 1000 (Ethernet)
RX packets 1457 bytes 130150 (127.0 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1410 bytes 676782 (660.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 80 bytes 6000 (5.8 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 80 bytes 6000 (5.8 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
I also see this in the stderr.log:
> # more stderr.log
Logging trace to /var/log/clickhouse-server/clickhouse-server.log
Logging errors to /var/log/clickhouse-server/clickhouse-server.err.log
Processing configuration file '/etc/clickhouse-server/config.xml'.
Merging configuration file '/etc/clickhouse-server/config.d/data-paths.xml'.
Merging configuration file '/etc/clickhouse-server/config.d/listen.xml'.
Merging configuration file '/etc/clickhouse-server/config.d/logger.xml'.
Merging configuration file '/etc/clickhouse-server/config.d/openssl.xml'.
Merging configuration file '/etc/clickhouse-server/config.d/user-directories.xml'.
Saved preprocessed configuration to '/var/lib/clickhouse/preprocessed_configs/config.xml'.
Processing configuration file '/etc/clickhouse-server/users.xml'.
Merging configuration file '/etc/clickhouse-server/users.d/default-password.xml'.
Include not found: networks
Include not found: networks
Include not found: networks
Include not found: networks
Saved preprocessed configuration to '/var/lib/clickhouse/preprocessed_configs/users.xml'.