Why Can't the Website Deployed on an HECS Be Accessed?
Symptom
Whether a website can be accessed depends on the network, port, firewall, and security group configurations of cloud servers. If any problem occurs, the website cannot be accessed.
Troubleshooting
If an error is displayed when you access a website, identify possible causes based on the error message.
Identify possible causes based on error code descriptions in Returned Values for General Requests in the Elastic Cloud Server API Reference.
Possible causes are listed here in order of their probability.
If the fault persists after you have ruled out one cause, move on to the next one.
| Possible Cause | Handling Measure |
|---|---|
| Port communication | Check whether the port used by the website is listened to on the HECS. For details, see Checking Port Communication. |
| Security group rules | Check whether access to the port is allowed in the security group that contains the HECS. For details, see Checking Security Group Rules. |
| Firewall configuration | Disable the firewall and try again. For details, see Checking the Firewall Configuration. |
| HECS routes | Check whether the gateway configuration in the HECS route table is correct. For details, see Checking the HECS Routes. |
| Local network | Check whether you can use another hotspot or network to access the website. For details, see Checking the Local Network. |
| vCPU usage | Identify and optimize the processes that cause high vCPU usage. For details, see Checking the vCPU Usage. |
| Domain name resolution (applicable to scenarios where a domain name is used to access the website) | Check whether the domain name can be resolved. For details, see Checking the ICP Filing and Domain Name Resolution. |
| ICP license (applicable to scenarios where a domain name is used to access the website) | Check whether the domain name of the website and the EIP of the HECS have been licensed. For details, see Checking the ICP Filing and Domain Name Resolution. |
Checking Port Communication
Ensure that service processes and ports are in LISTEN state. Table 2 lists common TCP connection statuses.
- Linux
Run the netstat -antp command to check whether the port used by the website is in LISTEN or LISTENING state.
Example command: netstat -ntulp |grep 80Figure 2 Checking port status
- If the port is in LISTEN state, go to Checking Security Group Rules.
- If the port is not in LISTEN state, check whether the web service process is correctly configured and started.
- Windows
Perform the following operations to check port communication:
- Run cmd.exe.
- Run the netstat -ano | findstr "PID" command to obtain the PID used by the process. Example command: netstat -ano | findstr "80"Figure 3 Checking port listening status
- If the port is in LISTENING state, go to Checking Security Group Rules.
- If the port is not in LISTENING state, check whether the web service process is correctly configured and started.
| TCP Connection Status | Description | Application Scenario |
|---|---|---|
| LISTEN | Listens for network connection requests from a remote TCP port. | The TCP server is running properly. |
| ESTABLISHED | Indicates that a connection has been set up. | A TCP connection is properly set up. |
| TIME-WAIT | Waits until the remote TCP server receives the acknowledgement after sending a disconnection request. | The TCP connection is disconnected, and this state is cleared in 1 minute. |
| CLOSE-WAIT | Waits for a disconnection request sent by a local user. | An application program fault leads to an open socket. This state is displayed after the network is disconnected, indicating that a process is in a dead cycle or waiting for certain requirements to be met. To resolve this issue, restart the affected process. |
| FIN-WAIT-2 | Waits for the network disconnection request from a remote TCP server. | The network has been disconnected and requires 12 minutes to automatically recover. |
| SYN-SENT | Waits for the matched network connection request after a network connection request is sent. | The TCP connection request failed, which is generally caused by delayed handling of high CPU usage on the server or by a DDoS attack. |
| FIN-WAIT-1 | Waits for the remote TCP disconnection request, or the acknowledgement for previous disconnection request. | If the network has been disconnected, this state may not automatically recover after 15 minutes. If the port has been used for a long period of time, restart the OS to resolve this issue. |
Checking Security Group Rules
- Log in to the management console.
- Under Computing, click Hyper ECS.
- On the Hyper Elastic Cloud Server page, click the name of the HECS with security group rules to be modified.
- Click the Security Groups tab and view security group rules.
- Click Modify Security Group Rule.
- Configure the rule to allow access to the port used by the website.
Checking the Firewall Configuration
- Linux The following uses port 80 and CentOS 6.8 as an example.
- Run the iptables -nvL --line-number command to obtain the firewall policies.
- Run the following commands to allow access to the default SSH port 80:
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
iptables -A OUTPUT -p tcp --sport 80 -j ACCEPT
- Run the service iptables save command to save the added rules.
- Run the service iptables restart command to restart iptables.
- Run the iptables -nvL --line-number command to check whether the added rules have taken effect.
- Disable the firewall and try again.
- Windows
- Log in to the Windows HECS.
- Click the Windows icon in the lower left corner of the desktop and choose Control Panel > Windows Firewall.

- Click Turn Windows Firewall on or off.
View and set the firewall status.

- Disable the firewall and try again.
Checking the HECS Routes
- Linux
- Run the route command to check the routing policy. Ensure that the default route 0.0.0.0 is destined for the gateway and that the IP address and the gateway are in the same network segment, as shown in the first and third lines in Figure 4.
- Run the ifconfig or ip addr command to obtain the HECS IP address. Figure 5 ifconfig command output
Figure 6 ip addr command output
- Run the route -n command to obtain the gateway in the routing table. Figure 7 route -n command output
- Windows
- Run cmd.exe.
- Run the ipconfig command to obtain the HECS IP address. Figure 8 ipconfig command output
- Run the route print command to obtain the gateway in the routing table. Figure 9 route print command output
Checking the Local Network
Try another hotspot or network to access the website.
If the website can be accessed, the fault may occur on the local network. In such a case, rectify the fault and try again.
Checking the vCPU Usage
If the bandwidth or vCPU usage of an HECS is too high, website access failures may occur. If you have created an alarm rule using Cloud Eye, the system automatically generates an alarm when the bandwidth or CPU usage reaches the threshold specified in the rule.
- Identify the processes leading to high bandwidth or vCPU usage.
- Windows offer multiple tools to locate faults, including Task Manager, Performance Monitor, Resource Monitor, Process Explorer, Xperf (supported by versions later than Windows Server 2008), and obtained full memory dump.
- Linux: Run the tcp command to check the OS running status.
- Check whether the processes are malicious and handle the issue accordingly.
- If the processes are desired, optimize them or modify HECS configurations.
- If the processes are malicious, stop these processes manually or use a third-party tool to stop them.
Checking the ICP Filing and Domain Name Resolution
Use the EIP bound to the HECS to access the website. If the website can be accessed using the EIP but not its domain name, the domain name cannot be resolved.
Whether a website can be accessed is related to the status and real-name authentication of the domain name, website licensing, domain name records, and website network environment. If any of the preceding is abnormal, the website cannot be accessed.
- Check the ICP license of the domain name.
According to the Regulation on Internet Information Service of the People's Republic of China released by the Ministry of Industry and Information Technology (MIIT), all websites with their own domain name that operate inside China are required to obtain a license.
- If your server is in the Chinese mainland, submit an ICP filing request to the server provider to obtain an ICP license for the domain name.
- If your server is outside the Chinese mainland, no ICP license is required.
- If your domain name has been licensed, transfer it to HUAWEI CLOUD DNS for resolution or host a level-2 subdomain of the domain name on HUAWEI CLOUD DNS if you do not transfer the domain name.
- Ensure that the ICP filing information is authentic and valid and that the website content is consistent with the ICP filing information.
- After the application is approved, it takes one working day for the website to be accessible.
- Check the domain name resolution.
If your domain name has been licensed but the domain name records are incorrectly configured, the domain name may fail to be resolved.
Switch to the DNS console to view details about the domain name records.
- Check the DNS server configuration.
If the system shows no server found after you ping the domain name, this issue may be caused by slow response from the DNS server. In such a case, see What Can I Do If Accessing a Website Outside the Chinese Mainland Is Slow on an HECS?

Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.