Troubleshooting for Host and Agent Connectivity Verification Failures
Host connectivity verification failures can be handled based on the host type:
Linux Hosts
- Verify whether the IP address, username, and password are correct.
- Check whether the port enabled on the target host is an SSH port (port 22 by default).
How to enable the port:
- Enable the firewall.
systemctl start firewalld.service systemctl stop firewalld.service #Disable the firewall.
- Enable the port.
firewall-cmd --zone=public --add-port=22/tcp --permanent
--zone #Application zone.
--add-port=22/tcp #Port, in the format of port number/communication protocol.
--permanent #Takes effect permanently. If this parameter does not exist, it becomes invalid after the system is restarted.
- Restart the firewall.
firewall-cmd --reload
- Enable the firewall.
- Check the network status.
Run the tcpdump command to check the network connection.
tcpdump -n "tcp port 22" | grep -v "xxx.xxx.xxx.xxx" #This command is executed on the local PC to check whether the host is connected. xxx.xxx.xxx.xxx indicates the IP address of the target host.
As shown in the following figure, if no command output is displayed, the network connection is normal.

- Verify the target host connectivity and check whether the server has established SSH connections to this host. The information in the following figure indicates that the server has established SSH connections to this host.
Cause analysis:- SSH connections exist between the server and the target host.
The target host is not configured properly or tcpdump is not installed.
Perform the following operations to check the host configurations:
- Run the following command to check whether a firewall is configured (iptables is used as an example):
iptables -L
- Run the following command to check whether a firewall is configured (iptables is used as an example):
- No SSH connections exist between the server and the target host.
The target host is unreachable because the network may have access restrictions.
Check whether the source and destination IP addresses are restricted by the firewall, and check the SSH protocol configurations.
- SSH connections exist between the server and the target host.
- Check permissions on the SSH key file.
Log in to the host as the root user and run the following commands to check permissions on the SSH key file:
cd /root/.ssh
ll
Check whether the file permission is rw.

If the file permission is incorrect, run the following command to modify it:
chmod 600 File name
- Check the operations on the ${HOME} directory. If the user who carries the host connectivity verification fails to operate the ${HOME} directory, do as follows:
- Check whether the disk where the ${HOME} directory of the host is located is full.
- Run the df -h command to check whether the disk where the ${HOME} directory is located is full.
- Run the ll -ld ${HOME} and lsattr -d ${HOME} commands to check the permission setting and hidden attributes of the ${HOME} directory of the user.
- Check whether the user has the read and write permissions on the ${HOME} directory.
Run the chmod and chattr commands to grant the user the permissions required to read from and write into the ${HOME} directory.
- Check whether the user's default shell is set to nologin mode.
- Run the grep username /etc/passwd command. Replace username with the actual username to be checked.
- In the file, if /usr/sbin/nologin or /sbin/nologin is displayed in the shell column of a user, the user is set to the nologin mode.
- If the user is in the nologin mode, run the sudo usermod -s /bin/bash username command to enable their login. Replace username with the actual username.
- Check whether the disk where the ${HOME} directory of the host is located is full.
- If the connectivity test of an agent associated with a host fails or an error message indicating that the host connection timed out, locate the fault by performing the following operations.
- Test the connectivity of the agent host.
- Run the following command to check whether AllowTcpForwarding has been enabled for SSH on the agent host:
grep "AllowTcpForwarding" /etc/ssh/sshd_config

If the value is no, set it to yes and run the following command to restart the sshd service:
service sshd restart
Self-Hosted Agent Pool
- Check whether the agent pool of the host cluster to which the host belongs is available.
- Click the name of the host cluster. On the host cluster details page that is displayed, click Manage Resource Pools.
- Go to the agent pool management page and check the status.
- If the status is Offline, delete the agent and reinstall it.
- If the status is Disabled, enable the agent in the Operation column and verify the connectivity again.
- Click Connectivity Verification Result. If a script execution error is displayed, perform the following operations to troubleshoot it. (If no script execution error is displayed, skip this step.)
Cause analysis:
The self-hosted agent pool needs to use Docker to pull images. The script execution error occurs because Docker is not installed in the self-hosted agent pool or cannot be used properly. You can perform the following operations to troubleshoot the error:
Troubleshooting method
- Run the following command to check whether Docker is installed:
docker --version

If the version number is displayed in the command output, Docker has been installed.
If no version number is displayed in the command output, Docker is not installed.
If Docker is not installed, install it by referring to Installing/Uninstalling Docker, and then perform the following operations to verify the connectivity:- Go to the service homepage and click the target project name. In the target project, choose Settings > General > Basic Resource. The Host Clusters page is displayed by default.
- Click the name of the target cluster. On the cluster details page that is displayed, click Proxy Hosts or Target Host.
- Click
in the same row as the host, and modify the host information to verify the host again in the displayed dialog box.
- Run the following command to check whether Docker can be used properly:
docker images

If the preceding information is displayed, Docker can be used properly. Otherwise, you need to uninstall Docker, and reinstall it by referring to "Installing/Uninstalling Docker".
- Run the following command to check whether Docker is installed:
Windows Hosts
- Verify whether the IP address, username, and password are correct.
- Configure an agent host. For details, see "Configuring an Agent Host" in the User Guide.
- Enable the WinRM function. For details, see "Configuring a Target Host" in the User Guide.
- Run the following command on PowerShell to check whether the WinRM function has been enabled:
winrm e winrm/config/listener

- Check whether the Windows firewall allows external hosts to access the WinRM service.

Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot