Sometimes it is useful to be able to check the connection to the FMS when the connection goes through a firewall.
The common approach usually involves using the “ping” command is generally not satisfactory to verify connectivity as it uses port 7 rather than the port upon which the FMS is responding.
To be certain that the FMS is responding and that its traffic is passing thought the firewall correctly, you can use telnet or wget.
wget:
“wget” is a part of the GNU project as is available in many Linux and Unix distributions, though it is not always installed. Its purpose is the retrieval of “content” from web servers.
The way to use wget is to pass into the the command the URL you want to test.
foglight@ubuntu:~$ wget ubuntu:8080/console
--2011-12-06 19:08:35-- http://ubuntu:8080/console
Resolving ubuntu... 192.168.100.141
Connecting to ubuntu|192.168.100.141|:8080... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://ubuntu:8080/console/ [following]
--2011-12-06 19:08:35-- http://ubuntu:8080/console/
Connecting to ubuntu|192.168.100.141|:8080... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://ubuntu:8080/console/page [following]
--2011-12-06 19:08:35-- http://ubuntu:8080/console/page
Reusing existing connection to ubuntu:8080.
HTTP request sent, awaiting response... 200 OK
Length: 7903 (7.7K) [text/html]
Saving to: `console.3'
100%[================================================================================>] 7,903 --.-K/s in 0s
2011-12-06 19:08:35 (539 MB/s) - `console.3' saved [7903/7903]
foglight@ubuntu:~$ wget ubuntu:9876/console
--2011-12-06 19:08:46-- http://ubuntu:9876/console
Resolving ubuntu... 192.168.100.141
Connecting to ubuntu|192.168.100.141|:9876... failed: Connection refused.
foglight@ubuntu:~$
telnet:
The wget command is not present on most systems and another method must be used. This is where telnet comes in.
Strictly speaking, Telnet is a protocol for bi-directional communication between 2 systems for text communication, usually virtual terminal sessions. The telnet command on most unix/linux systems as well as on many Windows versions is a terminal emulation which communicates of the telnet port (22) using the telnet protocol.
Most implementations of telnet allow the port to be configured. If one “points” telnet at a web server, one can retrieve content by using telnet to send HTTP requests to the FMS:
foglight@ubuntu:~$ telnet ubuntu 8080
Trying 192.168.100.141...
Connected to ubuntu.
Escape character is '^]'.
get /console HTTP/1.1
host: ubuntu
<-- Hit enter here to send an empty line!
HTTP/1.1 302 Moved Temporarily
Server: Apache-Coyote/1.1
Location: http://ubuntu/console/
Transfer-Encoding: chunked
Date: Tue, 06 Dec 2011 18:56:50 GMT
0
^] <--That’s control-square bracket!
telnet> quit
Connection closed.
foglight@ubuntu:~$
As demonstrated above, both the wget and telnet methods allow us to verify connectivity all the way to the foglight management server .
This document was generated from the following discussion: Using telnet or wget to check connectivity