The Network Tool checks, from the machine KafkIO runs on, whether a host name resolves, whether the host answers a ping and whether a port accepts a connection. Use it when a cluster, Schema Registry, Kafka Connect or ksqlDB won't connect, to find out whether the problem is the network (a firewall, a VPN you're not on, a wrong port) or KafkIO's settings.
Opening the Network Tool
Open it from Tools ▸ Network Tool 1:
- Network Tool opens the tool with one example row,
google.ieon port 80, which you replace with your own hosts.
You rarely need to type the hosts yourself, because KafkIO opens the tool, already filled in, from the places where a connection is set up or fails:
- Check network reachability under the Bootstrap servers field of the cluster dialog (Checking reachability), with one row per bootstrap server;
- the same link under the URL on the Schema Registry, Kafka Connect and ksqlDB tabs, and under the Schema Registry's OAuth Issuer Endpoint URL;
- the Network Tool link in a Timeout error connecting dialog (Timeouts and misconfiguration shows it), with the cluster's bootstrap servers.
When it's filled in from a field, each comma-separated entry becomes a row. A URL gives its host and port; a URL
without a port gets 443 for https:// and 80 for http://, and a plain host without a
port gets 80. The rows are a copy: editing them doesn't change the cluster's settings.
The Network Tool is a separate window that doesn't block the rest of KafkIO, so you can keep it open while you change a cluster's settings and check again. Each time you open it you get a new window, so you can have one per cluster.
Checking hosts and ports
Here the tool is checking a broker that works and three that don't, one for each kind of failure:
- A Host and its Port (1 to 65535). Type
the host name or IP address only: no
https://, no path, no:port. Rows with an empty host are skipped. - Add host:port adds a row, for checking several servers in one go (every broker of a cluster, or a broker and its Schema Registry).
- remove deletes a row. The first row has none.
- Timeout: how long, in milliseconds, to wait for each test (see Timeouts).
- Check clears the results and tests every row, top to bottom.
- Results: three lines per host (see Reading the results).
- Keeps the window on top of KafkIO's main window, so it stays in view while you work there.
While it runs, the window shows what it's doing (Getting IP address, Pinging,
Checking host/port) and the results appear host by host. Cancel closes
the progress overlay and no more results are added: those already listed stay, without the closing
End line.
- Cancel stops the check.
Timeouts
The Timeout is 1000 ms (one second) when the window opens. Type a value from 1 to 300000 ms (five minutes), use the arrows (steps of 250 ms), or click one of the links under the field: 10ms, 100ms, 1s, 5s, 20s or 60s. It isn't remembered: each new window starts at one second.
The timeout applies to the ping and to the port connection separately, for each host. Looking up the name isn't limited by it, and a failed ping is tried twice (see below), so a host that doesn't answer can take two or three times the timeout before KafkIO moves on. A refused connection or an unknown name comes back at once, whatever the timeout.
One second is plenty on a local network. Raise it for servers far away or behind a slow VPN, where a short timeout
reports a working port as closed (Connect timed out). Lower it to get through a long list quickly
once you know which hosts are reachable. This timeout only affects the Network Tool; the timeouts KafkIO uses to
talk to your clusters are in Preferences ▸ Kafka.
Reading the results
The results start and end with a timestamp, and give three lines per host, separated by dashes. Successes are in green and failures in red, with the reason in parentheses:
| Line | What it tests | If it fails |
|---|---|---|
'host' IP: | Whether the name resolves to an IP address on this machine (the address is shown). An IP address you typed is shown as it is. | null: the name doesn't
resolve. Check the spelling, your VPN and your DNS (or hosts file). The next two lines then fail too, with
the host name in parentheses. |
'host' pingable: | Whether the host answers a ping. KafkIO first tries Java's own
reachability check and, if that fails, runs your system's ping command once. | Not
much on its own: many servers and networks block ping, so a healthy broker can show
false. |
'host:port' port open: | Whether a TCP connection to the port succeeds. | The
one that matters. Connection refused: the host answered but nothing listens on that port
(wrong port, or the service is down). Connect timed out: no answer at all, typically a
firewall dropping the connection, a network you're not on, or a timeout too short for a slow
link. |
The exact wording of the reason comes from Java and your operating system, so it can differ slightly from the
screenshot (Connection refused: connect, for example).
A host where every line is green is reachable from your machine on that port. That's what Kafka, Schema Registry, Kafka Connect and ksqlDB need first; whether they then work depends on the rest of the settings (next section).
Network Tool vs. Test Connection
The cluster dialog's Test Connection and the Network Tool answer different questions, and you often need both:
| Network Tool | Test Connection | |
|---|---|---|
| Question | Can this machine reach that host and port? | Can KafkIO use the cluster (or endpoint) with these settings? |
| What it does | Resolves the name, pings, opens a TCP connection and closes it. | Connects with the full settings (security, credentials, certificates) and makes a real request; for Kafka, it lists the topics. |
| Uses the cluster's settings | Only the hosts and ports. | All of them, and the timeouts from Preferences. |
| Proxy | Never: it always connects directly. | Never for Kafka brokers. Schema Registry, Kafka Connect and ksqlDB go through your proxy when their Use proxy (if configured) box is ticked. |
| Typical failure | port open: false: a network problem. | A timeout or an error message, which may not say why. |
Use the Network Tool first when Test Connection times out: Kafka reports a closed port,
the wrong security settings and an unreachable advertised address with the same
Timed out waiting for a node assignment. Then:
- Port closed: fix the network first (the port, the VPN, the firewall). Nothing in KafkIO's settings can help until the port is open.
- Port open, but Test Connection still fails: the network path is fine, so look at the settings. For Kafka, check that the security settings match that listener, and that the brokers advertise addresses your machine can reach (Docker and advertised listeners). The bootstrap servers are only the first contact: after that KafkIO talks to every broker at the address it advertises, so check those hosts too.
- A REST endpoint behind a proxy: if you reach Schema Registry, Kafka Connect or ksqlDB only
through an HTTP proxy, the Network Tool shows
port open: falseeven when KafkIO's own requests, which go through the proxy, work.
The full checklist for failed connections is in Troubleshooting Connections.