This topic describes how to check the Cloud Assistant status and handle anomalies.
Check Cloud Assistant status
Console
In the top navigation bar, select the region and resource group of the resource that you want to manage.
On the ECS Instances tab, check the Cloud Assistant status.
Normal: The Cloud Assistant Agent is running correctly.

Not Installed: Cloud Assistant Agent is not installed on the Elastic Compute Service (ECS) instance. You can install it in one of the following ways:
Click Install to automatically install Cloud Assistant Agent.
Restart the instance for the installation to take effect.
Manually install Cloud Assistant Agent. For more information, see Install Cloud Assistant Agent.

Abnormal: This status indicates a problem. For troubleshooting instructions, see Handle Cloud Assistant status anomalies.

API
Call the DescribeCloudAssistantStatus operation. If CloudAssistantStatus is true in the response, the agent is running normally. If the status is abnormal, see Handle Cloud Assistant status anomalies.
Handle Cloud Assistant status anomalies
Linux instance
Connect to a Linux instance.
For more information, see Connect to Linux.
Run the following command to check for the Cloud Assistant installation directory.
For CentOS:
cd /opt/local/share/ lsFor other operating systems such as Alibaba Cloud Linux, Ubuntu, Debian, Red Hat, SUSE Linux Enterprise Server, and openSUSE:
cd /usr/local/share/ lsIf the
aliyun-assistfolder exists, proceed to step 3.If the
aliyun-assistfolder does not exist, Cloud Assistant Agent has been uninstalled. You must install Cloud Assistant Agent again.
Check the Cloud Assistant service status.
First, determine the instance's init system. The command to check the service status depends on the instance's init system.
ls -l /sbin/initIf the command output indicates
systemd, such as/lib/systemd/systemd, the instance usessystemd.If the command output indicates
upstart, such as/sbin/upstart, the instance usesUpstart.If the command output indicates
init, such as/sbin/init, the instance usessysvinit.systemd
Run the following command to check the Cloud Assistant status:
systemctl status aliyun.serviceIf the status is
inactive (dead), the service is stopped. Runsystemctl start aliyun.serviceto start the service.If an error occurs during startup or the service fails to start, uninstall then reinstall the agent. For detailed instructions, see Stop and uninstall Cloud Assistant Agent and Install Cloud Assistant Agent.

If the status is
active (running), the service is running normally. Proceed to Step 4.
UpStart
Run the following command to check the Cloud Assistant status:
/sbin/initctl status aliyun-serviceIf the status is
stop/waiting, the service is stopped. Run/sbin/initctl start aliyun-serviceto start the service.If an error occurs during startup or the service fails to start, uninstall then reinstall the agent. For detailed instructions, see Stop and uninstall Cloud Assistant Agent and Install Cloud Assistant Agent.

If the status is
start/running, the service is running normally. Proceed to Step 4.
sysvinit
Run the following command to check the Cloud Assistant status:
/etc/init.d/aliyun-service statusIf the status is
Stopped, the service is stopped. Run/etc/init.d/aliyun-service startto start the service.If an error occurs during startup or the service fails to start, uninstall then reinstall the agent. For detailed instructions, see Stop and uninstall Cloud Assistant Agent and Install Cloud Assistant Agent.

If the status is
Running, the service is running normally. Proceed to Step 4.
Check the Cloud Assistant Agent status in the console.
If the status is normal, the issue is resolved.
If the status remains abnormal, check the Cloud Assistant logs for further analysis.
For CoreOS:
cd /opt/local/share/aliyun-assist/<version>/log tail -100f aliyun_assist_main.logFor other operating systems such as Alibaba Cloud Linux, Ubuntu, Debian, Red Hat, SUSE Linux Enterprise Server, and openSUSE:
cd /usr/local/share/aliyun-assist/<version>/log tail -100f aliyun_assist_main.log
Windows instance
Connect to a Windows instance.
For more information, see Connect to Windows.
Check for the Cloud Assistant installation directory
C:\ProgramData\aliyun\assist.If the assist folder exists, proceed to step 3.
If the assist folder does not exist, the Cloud Assistant Agent has been uninstalled. You must install Cloud Assistant Agent again.
Check the Cloud Assistant service status.
If the status is normal, the issue is resolved.
If the status remains abnormal, check the Cloud Assistant logs for further analysis.
The default log path for Cloud Assistant is
C:\ProgramData\aliyun\assist\<version>\log, where<version>is the agent's version number.
FAQ
Why do I see a "context deadline exceeded (Client.Timeout exceeded while awaiting headers)" error in the Cloud Assistant logs?

This error typically indicates a network connectivity issue between the ECS instance and the Cloud Assistant service. Run the following commands to check connectivity.
Replace with the ID of your region. For more information, see Regions and zones.
ping <region-id>.axt.aliyun.com
curl https://<region-id>.axt.aliyun.com/luban/api/instance/instance-idIn a successful test, the domain resolves and the endpoint returns a valid instance ID.
If name resolution fails or the endpoint does not return the instance ID, the instance has a network issue. For troubleshooting steps, see Configure network permissions for Cloud Assistant Agent.

Why does a managed instance show an abnormal status after successful registration?
If a managed instance is successfully registered but shows an abnormal status in the Cloud Assistant console, check the logs for an invalid timestamp error.
The default Cloud Assistant log paths are as follows.
Linux instances
CoreOS:
/opt/local/share/aliyun-assist/<version>/logOther operating systems (Alibaba Cloud Linux, Ubuntu, Debian, RedHat, SUSE Linux Enterprise Server, and OpenSUSE):
/usr/local/share/aliyun-assist/<version>/log
Windows instances:
C:\ProgramData\aliyun\assist\<version>\log

Time drift on the managed instance causes this error. To resolve this issue, synchronize the instance's clock. For more information, see Clock synchronization.
References
You can call the ListPluginStatus operation to query the status of Cloud Assistant plugins on an instance. The response also includes the first (FirstHeartbeatTime) and last (LastHeartbeatTime) times the agent reported the plugin status.