Some easy diagnostic tools for everyone
Struggling to connect to your email or website? Cannot see if your server is up or not? Here are a few tips and diagnostic tools to help you get a better idea of where the problem lies.
Issues that are often not ISSUES
As a hosting provider, we often get asked: “Are your servers down?”. Granted, this is a valid question, but 99.99% of the time we would be aware of a problem on our own servers before our clients would be. Bear in mind that we have many servers and host many, many VPS’s.
The better question would be: “I cannot connect to my VPS/Website/Server. Can you check it for me?”. While still a bit vague, this at least points us in the correct direction as we can now check the server (of which we have many) on which the customer’s VPS or website resides. Now I will show you some of the diagnostic tools that we often use to narrow down the problem area.
To accurately diagnose an issue, you need to know the IP address of your VPS or website e.g 18.104.22.168 and the service (http/smtp/pop3/imap/ftp/etc) that you are accessing. Each service runs on a port and if you know this, it makes life easier. Here are some common services and their ports:
- FTP – 21
- SMTP – 25 or 597
- SMTP (SSL/TLS) – 465 or 25 or 587
- DNS – 53
- HTTP (web server) – 80
- POP3 – 110
- IMAP – 143
- HTTPS (secure web server) – 443
- MS SQL – 1433
- MySQL – 3306
- RDP / Terminal Services – 3389
- Proxy Servers – 3128 or 8080
The first step if you are running a windows desktop is to enable the telnet client. Click Start, Control Panel, Programs, and then Turn Windows Features on or off. In the list, scroll down and select Telnet Client and click OK.
Now open the command prompt (c:) by typing “cmd” in the run area. This should open a black window with some text.
The next step depends on which service you need to test.
Ping is one of the most used basic diagnostic tools. To check if a server is up, the ping command may be used, but this often fails as it can be blocked by a firewall. Most windows servers block ping by default. To allow your windows VPS to be pingable, you have to allow ICMP traffic on the windows firewall. Let us try the ping command first – on Linux you must stop the ping with Ctrl-C, on Windows it usually stops after 4 pings.
The syntax of ping is: ping host-address
This will send packets to the Google DNS server at 22.214.171.124 asking it to respond (the response is called a PONG).
The important part is the 0% packet loss. Don’t ping too many public servers as they could decide to block you permanently.
Let us ping a non-responsive IP:
Note the 100% packet loss.This means that nothing on any network available to us is responding to that IP address.
It is always good to check your own connectivity to the internet first before embarking on these tests. Ping Google DNS @ 126.96.36.199 or open a website you have never visited. Even easier, open Google and search for an image you have never searched for e.g purple fish
Telnet is a diagnostic tool that allows us to connect to a specific port. I can test a server that does not allow ICMP (ping) by using Telnet. The syntax of telnet is: telnet host-address port
Once again in your black command prompt windows (ensure that you have enabled the telnet client as I explained above), type the following:
telnet google.com 80
To disconnect, type Ctrl-D. This will give the response of “HTTP/1.0 400 Bad Request” and possible some more text.
The keyword to check is the: “Connected to…” which means that the web server is working. A telnet to your RDP port (3389) will give exactly the same response (ie “Connected to…”) if it is up and running. RDP does take a long time to disconnect and it may be quicker to just close the command prompt window.
A failed telnet example:
The “Unable to connect” tells us exactly that. The “Connection Refused” tells us that the server is up, but not running any services on the port we are testing. If the server was not up, telnet would get stuck on “Trying….” and we could escape by typing Ctrl-C.
These two basic diagnostic tools will go a long way to giving you a quicker response from ANY helpdesk.