Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Quickly troubleshoot the method of not opening a website running on an ECS instance

2025-04-11 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Editor to share with you how to quickly check that you can't open the website running on the ECS instance. I believe most people don't know much about it, so share this article for your reference. I hope you will gain a lot after reading this article. Let's learn about it together.

Quick troubleshooting failed to open a website running on an ECS instance

Unable to open a Web site running on the Linux instance

The demonstration system here is CentOS 6.8.Please choose it according to your actual situation.

First, troubleshoot that port 80 is not available

Run the command netstat-an | grep 80 to see if port TCP 80 is listening. If any of the following results are returned, the Web service on port TCP 80 has been started:

Tcp 0 0 0.0 0. 0. 0. 0. 0 80 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. V. * LISTEN # network-wide monitoring

Tcp 0 0127.0.0.1 80 0.0.0.0 * LISTEN # Native listening

Among them, local monitoring will cause the external network to be unable to access the Web service. Only local access can be made. You can modify the method of changing the port listening address of Nginx, Tomcat, and IIS to network-wide monitoring.

When the first step fails:

Check whether port 80 is released by the instance security group. See add Security Group rules.

Check whether port 80 is released by the instance iptables.

Use telnet and traceroute to track the on-off condition of port 80. Refer to the link test instructions when ping is lost or unavailable.

Check whether the CVM bandwidth is full. Refer to the analysis and solution of abnormal overrun of ECS Linux server bandwidth on CVM.

2. Troubleshoot the unavailability of Web service

Log in to the instance using the administrative terminal.

View the Web service log, such as the path / usr/local/var/log/nginx/ to store the CentOS 6.8 Nginx service log.

Use top to check the running status of the instance to see if there are any unusual processes.

Check the instance monitoring information in the console to see whether the instance bandwidth is full. If it is full, you can try to upgrade the instance bandwidth.

Check to see if the instance CPU/ is running out of memory. For more information on how to troubleshoot the problem of high CPU occupancy in CVM ECS Linux system.

Check whether there are too many TCP links on port 80 of the instance.

Count the number of TCP connections through netstat-anp | grep tcp | wc-l.

Compare the maximum net.ipv4.tcp_max_tw_buckets of the / etc/sysctl.conf configuration file to see if there is an excess. If it exceeds:

Execute the vi / etc/sysctl.conf edit file and query the net.ipv4.tcp_max_tw_buckets parameters. If you confirm that the use of the connection is high, it is easy to exceed the limit.

Increase the parameter net.ipv4.tcp_max_tw_buckets and enlarge the limit.

Enter the instruction sysctl-p to make the configuration effective.

Unable to open a Web site running on the Windows instance

The demonstration system here is Windows Server 2008, please choose according to your actual situation.

First, troubleshoot that port 80 is not available

Execute the command netstat-ano | findstr: 80 to see if TCP 80 is listening. If any of the following results are returned, the Web service on port TCP 80 has been started.

TCP 0.0.0.0 LISTENING 80 0.0.0.0 LISTENING 1172 # indicates network-wide monitoring

TCP 127.0.0.1 80 0.0.0.0 LISTENING 1172 # indicates local monitoring

Among them, the local monitoring will cause the external network to be unable to access the Web service, and only the local access can be accessed, which can be modified from netsh http delete iplisten ipaddress= 127.0.0.1 to network-wide monitoring.

When the first step fails:

Check whether port 80 is released by the instance security group. See add Security Group rules.

Check whether port 80 is released by the instance firewall. See how Windows Firewall restricts access to port / IP/ applications and the configuration of exceptions.

Use telnet and tracert to track the on-off condition of port 80. Refer to the link test instructions when ping is lost or unavailable.

Check whether the CVM bandwidth is full. See Windows instance bandwidth and CPU running full or high troubleshooting.

2. Troubleshoot the unavailability of Web service

Log in to the instance using the administrative terminal.

View the Web service log, such as the Windows Server 2008 IIS service log location:% SystemDrive%\ inetpub\ logs\ LogFiles\ W3SVC4.

Check the running status of the instance through Task Manager to see if there are any unusual processes.

Check the instance monitoring information in the console to see whether the instance bandwidth is full. If it is full, you can try to upgrade the instance bandwidth.

Check the instance CPU to see if the memory is exhausted. Refer to Windows instance bandwidth and CPU running full or high troubleshooting or CVM Windows instance CPU high occupancy handling and tool recommendations.

Check whether there are too many TCP links on port 80 of the instance.

Execute the following command and count the number of TCP connections:

Netstat-n | find / I "time_wait" / c netstat-n | find / I "close_wait" / c netstat-n | find / I "established" / c

When the number of TCP connections is too high, adjust the TcpTimedWaitDelay to 30s, and the default value is 4 minutes (240s):

Open CMD and execute the command regedit.

Find HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > Services > TCPIP > Parameters.

If there is no TcpTimedWaitDelay entry parameter:

Right-click Parameter > New DWORD (32-bit) value.

Enter TcpTimedWaitDelay and enter to confirm.

Right-click TcpTimedWaitDelay, click modify, check decimal, enter 30 for numeric data, and click OK.

The above is all the contents of the quick troubleshooting method that can not open the website running on the ECS instance, thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report