Help Center/ Elastic Cloud Server/ Troubleshooting/ Windows ECS Issues/ What Can I Do If My Windows ECS Can Ping a Website but Cannot Access it?
Updated on 2024-08-15 GMT+08:00

What Can I Do If My Windows ECS Can Ping a Website but Cannot Access it?

Symptom

Your Windows ECS cannot access websites or applications after running for a long time.

You can remotely log in to the ECS and ping websites using the ECS, but it failed to access websites or applications.

Possible Cause

The dynamic ports of the Windows ECS are used up.

By default, a TCP connection will stay in the TIME_WAIT state for 4 minutes before the port used by this connection is released and available for other connections. If a Windows ECS runs for a long time, there may be too many connections established or in the TIME_WAIT state using up all available ports. In this case, any new attempt to establish a connection will fail.

You can run the following command in the CLI of the Windows ECS to check which connections are in the TIME_WAIT state:

netstat -an |find "TIME_WAIT" /c

The command output is as follows:

Figure 1 Checking the connections in the TIME_WAIT state

Solution

  1. Log in to the Windows ECS.
  2. Run cmd as an administrator.
  3. Run the following command to check dynamic ports:

    netsh int ipv4 show dynamicport tcp

    Figure 2 Checking dynamic ports
  4. Run the following commands to increase and then check dynamic ports:

    netsh int ipv4 set dynamicport tcp start=1025 num=60000

    netsh int ipv4 show dynamicport tcp
    Figure 3 Setting dynamic ports
  5. Access external websites or applications again.