


How to quickly troubleshoot the inability to open a website running on an ECS instance
The content of this article is about how to quickly troubleshoot websites running on ECS instances that cannot be opened. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.
Quick troubleshooting The website running on the ECS instance cannot be opened
The website running on the Linux instance cannot be opened
Here The demonstration system is CentOS 6.8, please choose according to your actual situation.
1. Troubleshooting that port 80 is unavailable
Run the command netstat -an | grep 80 to check whether TCP port 80 is being monitored. If any of the following results are returned, it means that the Web service of TCP port 80 has been started:
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN # Whole network monitoring
tcp 0 0 127.0.0.1:80 0.0.0.0:* LISTEN #Local monitoring
Among them, local monitoring will cause the external network to be unable to access the Web service. Only the local machine can access it. Please refer to Nginx, Tomcat, and IIS to change the port monitoring. The address method is changed to network-wide monitoring.
When the first step fails:
Check whether the instance security group allows port 80. See Adding Security Group Rules.
Check whether the instance iptables allows port 80.
Use telnet and traceroute to track the connection and disconnection of port 80. See the instructions for link testing when ping packets are lost or unavailable.
Check whether the cloud server bandwidth is full. Please refer to the analysis and solutions to the abnormal full bandwidth of cloud server ECS Linux server.
2. Troubleshooting that the Web service is unavailable
Use the management terminal to log in to the instance.
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 and check whether there are any abnormal processes.
Check the instance monitoring information on the console to see if the instance bandwidth is full. If it is full, you can try to upgrade the instance bandwidth.
Check whether the instance CPU/memory is exhausted. See troubleshooting ideas for high CPU usage in cloud server ECS Linux systems.
Check whether there are too many TCP links on port 80 of the instance.
Use netstat -anp |grep tcp |wc -l to count the number of TCP connections.
Compare the maximum value of net.ipv4.tcp_max_tw_buckets in the /etc/sysctl.conf configuration file to see if there is any excess. If it exceeds:
Execute vi /etc/sysctl.conf to edit the file and query the net.ipv4.tcp_max_tw_buckets parameter. If the connection usage is confirmed to be high, it is easy to exceed the limit.
Increase the parameter net.ipv4.tcp_max_tw_buckets to expand the limit.
Enter the command sysctl -p to make the configuration take effect.
Cannot open the website running on the Windows instance
The demonstration system here is Windows Server 2008, please choose based on your actual situation.
1. Troubleshooting that port 80 is unavailable
Execute the command netstat -ano | findstr :80 to check whether TCP 80 is being monitored. If any of the following results are returned, it means that the web service of TCP port 80 has been started.
TCP 0.0.0.0:80 0.0.0.0:0 LISTENING 1172 # Indicates network-wide monitoring
TCP 127.0.0.1:80 0.0.0.0:0 LISTENING 1172 # Indicates local monitoring
Among them, local monitoring will cause the external network to be unable to access the Web service. Only the local machine can access it. You can execute netsh http delete iplisten ipaddress= 127.0.0.1:80 to change it to full network monitoring.
When the first step fails:
Check whether the instance security group allows port 80. See Adding Security Group Rules.
Check whether the instance firewall allows port 80. See how Windows Firewall restricts port/IP/application access and how to configure exceptions.
Use telnet and tracert to track the connection and disconnection of port 80. See the instructions for link testing when ping packets are lost or unavailable.
Check whether the cloud server bandwidth is full. See Windows instance bandwidth and CPU full or high troubleshooting.
2. Troubleshooting that the Web service is unavailable
Use the management terminal to log in to the instance.
View the Web service log. For example, the Windows Server 2008 IIS service log location is: %SystemDrive%\inetpub\logs\LogFiles\W3SVC4.
Check the running status of the instance through Task Manager to see if there are any abnormal processes.
Check the instance monitoring information on the console to see if the instance bandwidth is full. If it is full, you can try to upgrade the instance bandwidth.
Check whether the instance CPU and memory are exhausted. See troubleshooting Windows instance bandwidth and CPU full or high usage or troubleshooting high CPU usage of cloud server Windows instances 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 statistical TCP connections is too high, adjust TcpTimedWaitDelay to 30s, and its 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 parameter:
Right-click Parameter > New DWORD (32-bit) value.
Enter TcpTimedWaitDelay and press Enter to confirm.
Right-click TcpTimedWaitDelay, click Modify, check Decimal, enter 30 as the numerical data, and click OK.
The above is the detailed content of How to quickly troubleshoot the inability to open a website running on an ECS instance. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

DeepSeek is a powerful intelligent search and analysis tool that provides two access methods: web version and official website. The web version is convenient and efficient, and can be used without installation; the official website provides comprehensive product information, download resources and support services. Whether individuals or corporate users, they can easily obtain and analyze massive data through DeepSeek to improve work efficiency, assist decision-making and promote innovation.

There are many ways to install DeepSeek, including: compile from source (for experienced developers) using precompiled packages (for Windows users) using Docker containers (for most convenient, no need to worry about compatibility) No matter which method you choose, Please read the official documents carefully and prepare them fully to avoid unnecessary trouble.

Ouyi OKX, the world's leading digital asset exchange, has now launched an official installation package to provide a safe and convenient trading experience. The OKX installation package of Ouyi does not need to be accessed through a browser. It can directly install independent applications on the device, creating a stable and efficient trading platform for users. The installation process is simple and easy to understand. Users only need to download the latest version of the installation package and follow the prompts to complete the installation step by step.

BITGet is a cryptocurrency exchange that provides a variety of trading services including spot trading, contract trading and derivatives. Founded in 2018, the exchange is headquartered in Singapore and is committed to providing users with a safe and reliable trading platform. BITGet offers a variety of trading pairs, including BTC/USDT, ETH/USDT and XRP/USDT. Additionally, the exchange has a reputation for security and liquidity and offers a variety of features such as premium order types, leveraged trading and 24/7 customer support.

Gate.io is a popular cryptocurrency exchange that users can use by downloading its installation package and installing it on their devices. The steps to obtain the installation package are as follows: Visit the official website of Gate.io, click "Download", select the corresponding operating system (Windows, Mac or Linux), and download the installation package to your computer. It is recommended to temporarily disable antivirus software or firewall during installation to ensure smooth installation. After completion, the user needs to create a Gate.io account to start using it.

Ouyi, also known as OKX, is a world-leading cryptocurrency trading platform. The article provides a download portal for Ouyi's official installation package, which facilitates users to install Ouyi client on different devices. This installation package supports Windows, Mac, Android and iOS systems. Users can choose the corresponding version to download according to their device type. After the installation is completed, users can register or log in to the Ouyi account, start trading cryptocurrencies and enjoy other services provided by the platform.

Gate.io is a highly acclaimed cryptocurrency trading platform known for its extensive token selection, low transaction fees and a user-friendly interface. With its advanced security features and excellent customer service, Gate.io provides traders with a reliable and convenient cryptocurrency trading environment. If you want to join Gate.io, please click the link provided to download the official registration installation package to start your cryptocurrency trading journey.

Causes and solutions for errors when using PECL to install extensions in Docker environment When using Docker environment, we often encounter some headaches...
