0

I have a clickhouse server running in my local network. I could access it through 192.168.0.96:9000 on the other machines in the same network. However, after I forwarded the port 9000, and try to access outside the local network using (my IP) xxx.xxx.xxx.xxx:9000, I got a ERR_CONNECTION_TIMED_OUT. I couldn't figure out the issue.

The version I use is: 20.12.4.5, and I already changed the etc/clickhouse-server/config.xml:

    <!-- <listen_host>::</listen_host> -->
    <!-- Same for hosts with disabled ipv6: -->
    <listen_host>0.0.0.0</listen_host>

and the server does not have any firewall.

JOHN
  • 871
  • 1
  • 12
  • 24
  • the problem is not in CH. Try to debug your forwarding using `nc` , `nc -l someport` allows to listen port. – Denny Crane Dec 28 '20 at 14:45
  • @DennyCrane I tried to forward other ports like 5432 to 9000 and 8006 to 9000, they all worked fine. – JOHN Dec 28 '20 at 15:28
  • can you show the output of `curl xxx.xxx.xxx.xxx:9000` . Where did you get the error ERR_CONNECTION_TIMED_OUT ? – Denny Crane Dec 28 '20 at 15:51
  • @DennyCrane I got ERR_CONNECTION_TIMED_OUT when typing the address in Chrome. ```curl 101.228.191.118:9000```. ```curl: (7) Failed to connect to 101.228.191.118 port 9000: Operation timed out``` – JOHN Dec 28 '20 at 15:56
  • the issue is not in CH. CH cannot drop packets and produce this behaivor – Denny Crane Dec 28 '20 at 16:11
  • I would think this as well. But I tried different ways to debug this and could figure out where is the problem. So I post here and see if anyone get similar issue. – JOHN Dec 28 '20 at 16:17

1 Answers1

0

I scanned ip you provided with nmap and it looks like you have only port 8888 open. Maybe you didn't configure port forwarding properly.