Skip to content

Commit 8c13f4c

Browse files
Network troubleshooting: more examples
1 parent 09271fb commit 8c13f4c

File tree

1 file changed

+32
-1
lines changed

1 file changed

+32
-1
lines changed

site/troubleshooting-networking.xml

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,8 @@ limitations under the License.
121121
<p>
122122
Inspecting TCP listeners used by a node helps spot non-standard port configuration,
123123
protocol plugins (e.g. <a href="/mqtt.html">MQTT</a>) that are supposed to be configured but aren't,
124-
cases when the node is limited to only a few network interfaces, and so on.
124+
cases when the node is limited to only a few network interfaces, and so on. If a port is not on the
125+
listener list it means the node cannot accept any connections on it.
125126
</p>
126127
</doc:subsection>
127128

@@ -145,6 +146,36 @@ limitations under the License.
145146
failing client connections. <a href="https://en.wikipedia.org/wiki/Telnet">telnet</a> is a commonly
146147
used, very minimalistic tool for testing TCP connections to a particular hostname and port.
147148
</p>
149+
<p>
150+
The following example uses <code>telnet</code> to connect to host <code>localhost</code> on port <code>5672</code>.
151+
There is a running node with stock defaults running on <code>localhost</code> and nothing blocks access to the port, so
152+
the connection succeeds. <code>12345</code> is then entered for input followed by Enter. Since <code>12345</code> is not a correct AMQP protocol header,
153+
so the server closes TCP connection:
154+
155+
<pre class="sourcecode bash">
156+
telnet localhost 5672
157+
# => Trying ::1...
158+
# => Connected to localhost.
159+
# => Escape character is '^]'.
160+
12345 # enter this and hit Enter to send
161+
# => AMQP Connection closed by foreign host.
162+
</pre>
163+
164+
After <code>telnet</code> connection succeeds, use <code>Control + ]</code> and then <code>Control + D</code> to
165+
quit it.
166+
167+
The following example connects to <code>localhost</code> on port <code>5673</code>.
168+
The connection fails (refused by the OS) since there is no process listening on that port.
169+
170+
<pre class="sourcecode bash">
171+
telnet localhost 5673
172+
# => Trying ::1...
173+
# => telnet: connect to address ::1: Connection refused
174+
# => Trying 127.0.0.1...
175+
# => telnet: connect to address 127.0.0.1: Connection refused
176+
# => telnet: Unable to connect to remote host
177+
</pre>
178+
</p>
148179
<p>
149180
Failed or timing out <code>telnet</code> connections
150181
strongly suggest there's a proxy, load balancer or firewall

0 commit comments

Comments
 (0)