Experience Sharing: Server port Telnet failed to troubleshoot the C/s system

Source: Internet
Author: User

(In the past years, based on Esframework to do a lot of C/s system, but also to help customers solve a lot of development and operation of the technical problems, the personal feel that these historical experience is very valuable, and then I will gradually share these experiences, I hope to encounter similar problems of people who have been inspired and help. )

The primary function of the Telnet command is to make a TCP connection to the destination port (that is, to complete the TCP three handshake).

When the server starts, but telnet to its listening port, it fails. Or, when the server has been running for a while, suddenly the port it listens to is telnet. When a scenario like this fails with Telnet, you can troubleshoot as follows:

1. See if the CPU and memory of the server process are abnormal.

For example, when the CPU continues at 100%, it is possible to cause TCP connection requests from clients to be discarded or processed.

2. Is the port listener functioning properly?

The state of the port listener can be obtained through the Getportlistenerstate method of the Advanced property of Irapidserverengine, which returns a Portlistenerstate object that contains 3 properties:

(1) Ismaxconnection: Whether the maximum number of connections is reached.

(2) Islistening: Whether the port is listening. If it is not authorized, or if the maximum number of connections is reached, the listening port will be stopped.

(3) Lastdetecttime: The last time the TCP connection queue was detected (three handshake at the bottom of the OS has been completed but not yet stored in the queue by the esframework extracted TCP connection).

If the above two points are normal, then the need for professional operations personnel or network administrator to participate in the assistance to troubleshoot.

3. Do the telnet command on the current server to see if the connection is successful?

If the connection succeeds, at least it indicates that the native TCP handshake request can be received and processed normally.

4. Execute the netstat command on the server

Netstat is a very useful command to view port status, after executing the netstat command, be aware of the following information:

(1) is the target port in the listening state?

(2) Is there a successfully established TCP connection (established) on the destination port? What is the number?

(3) Is there a half-open connection (SYN_RECV)? What is the number?

(4) Is there a connection waiting to be closed (time_wait)? What is the number?

Here, the most likely cause is a maximum limit on the number of half-open connections, which causes the Windows system to discard subsequent TCP connection requests.

5.TCP three times is the handshake normal?

For the tracking and analysis of some strange phenomena, the data grasping tool is indispensable.

Run the Grab tool on the server, then telnet to the server's destination port on the other computer, and observe if the TCP three handshake on the target port is working properly by grasping the package tool:

(1) is the target port receiving a SYN request from the client?

(2) The target port has reply syn_ack to the client?

(3) The target port has received a third handshake from the client?

Only when the TCP three handshake is successfully completed will the Windows Foundation put the established TCP connection in the queue and submit it to the upper-level application.

6. Server network topology, firewalls, routers, network security monitoring and other related hardware and software

While grasping packet analysis, it is necessary to consider the network topology interface of the server. It is likely that three handshake requests from the client are blocked by firewalls, routers, or related hardware and software that is fully monitored by some networks.

At this point, you need professional operations or network management personnel to participate in, to help troubleshoot problems, such as:

(1) Execute the netstat command on the server to view the relevant status information for the destination port.

(2) Execute the Packet Capture tool on the server and monitor the target port for data from the client.

(3) Analyze the network topology of the server, and take the server as the center, and then check the firewall, router, network security monitoring and other related software and hardware settings, and conduct the targeted troubleshooting tests.

After the above analysis, should be able to find the root cause of the problem, if there is no results, you can give me a message, we discuss the next AH.

Experience Sharing: Server port Telnet failed to troubleshoot the C/s system

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.