This topic describes how to check the Cloud Assistant status and troubleshoot abnormal statuses.
Cloud Assistant status
Console
In the upper-left corner of the page, select a region and resource group.
On the ECS Instance tab, view the Cloud Assistant status.
Normal: Cloud Assistant is running as expected.
In the instance list on the Cloud Assistant page, ensure the Cloud Assistant Status for the target instance is Normal.
Not installed: The Cloud Assistant Agent is not installed on the instance. You can install the Cloud Assistant Agent by using the following methods.
Click Install to automatically install the Cloud Assistant Agent.
When you install the Cloud Assistant Agent with one click, you must restart the instance for it to take effect.
Manually install the Cloud Assistant Agent. For more information, see Install Cloud Assistant Agent.
In the instance list of the Cloud Assistant console, if the Cloud Assistant Status column for the target instance shows Not Installed, click the corresponding Install button to complete the installation.
Abnormal: This status indicates a problem with several possible causes. For troubleshooting steps, see Troubleshoot abnormal statuses.
On the ECS Instances tab of the Cloud Assistant console, the Cloud Assistant Status column shows the running status of Cloud Assistant on each instance. A yellow icon indicates an abnormal status.
API
Call the DescribeCloudAssistantStatus operation. If "CloudAssistantStatus": "true" is returned, Cloud Assistant is running correctly. If "false" is returned, the status is abnormal. See Troubleshoot abnormal statuses.
Troubleshoot abnormal statuses
Linux instance
Connect to the Linux instance.
For more information, see Connect to a Linux instance by using Workbench.
Run the following commands to check whether the Cloud Assistant installation directory exists.
CoreOS
cd /opt/local/share/ lsOther operating systems (such as Alibaba Cloud Linux, Ubuntu, Debian, Red Hat, SUSE Linux Enterprise Server, and OpenSUSE)
cd /usr/local/share/ lsIf the
aliyun-assistdirectory exists, go to Step 3.If the
aliyun-assistdirectory does not exist, the Cloud Assistant Agent is not installed. You must reinstall the Cloud Assistant Agent.
Check the status of the Cloud Assistant service.
First, determine the init system of the ECS instance. The command to check the service status depends on the init system.
ls -l /sbin/initIf the output points to
systemd(for example,/lib/systemd/systemd), the init system issystemd.If the output points to
upstart(for example,/sbin/upstart), the init system isUpstart.If the output points to
init(for example,/sbin/init), the init system issysvinit.
Systemd
Run the following command to check the Cloud Assistant status:
systemctl status aliyun.serviceIf the status is
inactive (dead), the Cloud Assistant service is stopped. Runsystemctl start aliyun.serviceto start the Cloud Assistant service.If an error occurs or the service fails to start, uninstall and then reinstall the Cloud Assistant Agent. For more information, see Stop and uninstall the Cloud Assistant Agent and Install Cloud Assistant Agent.
[ @iZuf68j5ei93s share]# systemctl status aliyun.service ● aliyun.service - Aliyun Assist Loaded: loaded (/etc/systemd/system/aliyun.service; enabled; vendor preset: enabled) Active: inactive (dead) since Mon 2023-09-11 17:18:33 CST; 47s ago Process: 1951 ExecStart=/usr/local/share/aliyun-assist/2.2.3.515/aliyun-service (code=exited, status=0/SUCCESS) Main PID: 1951 (code=exited, status=0/SUCCESS) Tasks: 2 (limit: 22694) Memory: 1.3G CGroup: /system.slice/aliyun.service ├─5608 gpg-agent --homedir /var/cache/dnf/remi-modular-6408ecca79e22107/pubring --use-standard-socket --daemon └─5648 gpg-agent --homedir /var/cache/dnf/remi-safe-ff04689114f71b24/pubring --use-standard-socket --daemonIf the status is
active (running), the Cloud Assistant service is running as expected. Go to Step 4.[root@iZuf68j5ei93s8 ~ share]# systemctl status aliyun.service ● aliyun.service - Aliyun Assist Loaded: loaded (/etc/systemd/system/aliyun.service; enabled; vendor preset: enabled) Active: active (running) since Mon 2023-09-11 17:25:07 CST; 2s ago Main PID: 72998 (aliyun-service) Tasks: 10 (limit: 22694) Memory: 1.3G CGroup: /system.slice/aliyun.service ├─ 5608 gpg-agent --homedir /var/cache/dnf/remi-modular-6408ecca79e22107/pubring --use-standard-socket --daemon ├─ 5648 gpg-agent --homedir /var/cache/dnf/remi-safe-ff04689114f71b24/pubring --use-standard-socket --daemon └─72998 /usr/local/share/aliyun-assist/2.2.3.515/aliyun-service
Upstart
Run the following command to check the Cloud Assistant status:
/sbin/initctl status aliyun-serviceIf the status is
stop/waiting, the Cloud Assistant service is stopped. Run/sbin/initctl start aliyun-serviceto start the Cloud Assistant service.If an error occurs or the service fails to start, uninstall and then reinstall the Cloud Assistant Agent. For more information, see Stop and uninstall the Cloud Assistant Agent and Install Cloud Assistant Agent.
/sbin/initctl status aliyun-service aliyun-service stop/waitingIf the status is
start/running, the Cloud Assistant service is running as expected. Go to Step 4./sbin/initctl status aliyun-service aliyun-service start/running, process 1129
Sysvinit
Run the following command to check the Cloud Assistant status:
/etc/init.d/aliyun-service statusIf the status is
Stopped, the Cloud Assistant service is stopped. Run/etc/init.d/aliyun-service startto start the Cloud Assistant service.If an error occurs or the service fails to start, uninstall and then reinstall the Cloud Assistant Agent. For more information, see Stop and uninstall the Cloud Assistant Agent and Install Cloud Assistant Agent.
[root@i7bp1hfzscxxx ~]# /etc/init.d/aliyun-service status StoppedIf the status is
Running, the Cloud Assistant service is running as expected. Go to Step 4.[root@i7bplhtzscxxxxxx ~]# /etc/init.d/aliyun-service status Running
Check the status of the Cloud Assistant Agent on the console.
If the status of the Cloud Assistant Agent is Normal, the issue is resolved.
If the Cloud Assistant Agent status is still Abnormal, check the Cloud Assistant logs to investigate further.
CoreOS:
cd /opt/local/share/aliyun-assist/<version>/log tail -100f aliyun_assist_main.logOther 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 the Windows instance.
For more information, see Connect to a Windows instance by using Workbench.
Check whether the Cloud Assistant installation directory
C:\ProgramData\aliyun\assistexists.If the assist directory exists, go to Step 3.
If the assist directory does not exist, the Cloud Assistant Agent is not installed. You must reinstall the Cloud Assistant Agent. For more information, see Install Cloud Assistant Agent.
Check the status of the Cloud Assistant service.
Click the Start menu and go to .
In the navigation pane, choose .
Find Aliyun Assist Service and check its Status.
If the Status column shows Normal, the Aliyun Assist Service is running as expected.
If the Status column is empty, the Aliyun Assist Service is stopped. Click Start to start the Aliyun Assist Service.
If an error occurs or the service fails to start, uninstall and then reinstall the Cloud Assistant Agent. For more information, see Stop and uninstall the Cloud Assistant Agent and Install Cloud Assistant Agent.
Check the status of the Cloud Assistant Agent on the console.
If the status of the Cloud Assistant Agent is Normal, the issue is resolved.
If the status is still Abnormal, review the Cloud Assistant logs to investigate further.
The default log path for Cloud Assistant is
C:\ProgramData\aliyun\assist\<version>\log, where<version>is the version of the Cloud Assistant Agent.In this directory, focus on
aliyun_assist_main.logand its date-rotated backup files (for example,aliyun_assist_main.log.20230912) to diagnose the problem.
FAQ
Why the context deadline exceeded (Client.Timeout exceeded while awaiting headers) error?
time="2023-05-23T00:01:17+08:00" level=info msg=GET_HOST_ERROR
time="2023-05-23T00:04:17+08:00" level=info msg="http://100.100.100.200/latest/meta-data/region-id cn-shanghai <nil>"
time="2023-05-23T00:04:22+08:00" level=info msg="https://cn-shanghai.axt.aliyun.com/luban/api/connection_detect Get \"https://cn-shanghai.axt.aliyun.com/luban/api/connection_detect\": context deadline exceeded (Client.Timeout
exceeded while awaiting headers)"
time="2023-05-23T00:04:22+08:00" level=info msg="Poll region id for instance in classic network"
time="2023-05-23T00:04:27+08:00" level=info msg="https://cn-hangzhou.axt.aliyun.com/luban/api/classic/region-id Get \"https://cn-hangzhou.axt.aliyun.com/luban/api/classic/region-id\": context deadline exceeded (Client.Timeout
exceeded while awaiting headers)"
time="2023-05-23T00:04:32+08:00" level=info msg="https://cn-qingdao.axt.aliyun.com/luban/api/classic/region-id Get \"https://cn-qingdao.axt.aliyun.com/luban/api/classic/region-id\": context deadline exceeded (Client.Timeout
exceeded while awaiting headers)"
time="2023-05-23T00:04:37+08:00" level=info msg="https://cn-beijing.axt.aliyun.com/luban/api/classic/region-id Get \"https://cn-beijing.axt.aliyun.com/luban/api/classic/region-id\": context deadline exceeded (Client.Timeout
exceeded while awaiting headers)"
time="2023-05-23T00:04:42+08:00" level=info msg="https://cn-zhangjiakou.axt.aliyun.com/luban/api/classic/region-id Get \"https://cn-zhangjiakou.axt.aliyun.com/luban/api/classic/region-id\": context deadline exceeded
(Client.Timeout exceeded while awaiting headers)"
time="2023-05-23T00:04:47+08:00" level=info msg="https://cn-huhehaote.axt.aliyun.com/luban/api/classic/region-id Get \"https://cn-huhehaote.axt.aliyun.com/luban/api/classic/region-id\": context deadline exceeded (Client.Timeout
exceeded while awaiting headers)"
time="2023-05-23T00:04:52+08:00" level=info msg="https://cn-shanghai.axt.aliyun.com/luban/api/classic/region-id Get \"https://cn-shanghai.axt.aliyun.com/luban/api/classic/region-id\": context deadline exceeded (Client.Timeout
exceeded while awaiting headers)"
time="2023-05-23T00:04:57+08:00" level=info msg="https://cn-shenzhen.axt.aliyun.com/luban/api/classic/region-id Get \"https://cn-shenzhen.axt.aliyun.com/luban/api/classic/region-id\": context deadline exceeded (Client.Timeout
exceeded while awaiting headers)"
time="2023-05-23T00:05:02+08:00" level=info msg="https://cn-hongkong.axt.aliyun.com/luban/api/classic/region-id Get \"https://cn-hongkong.axt.aliyun.com/luban/api/classic/region-id\": context deadline exceeded (Client.Timeout
exceeded while awaiting headers)"
time="2023-05-23T00:05:07+08:00" level=info msg="https://eu-west-1.axt.aliyun.com/luban/api/classic/region-id Get \"https://eu-west-1.axt.aliyun.com/luban/api/classic/region-id\": context deadline exceeded (Client.Timeout
exceeded while awaiting headers)"
time="2023-05-23T00:05:07+08:00" level=info msg=GET_HOST_ERRORThis error typically indicates a network connectivity problem between the ECS instance and the Cloud Assistant service. Run the following commands to test the connection.
Replace <region-id> with your region ID. For more information, see Regions and availability zones.
ping <region-id>.axt.aliyun.com
curl https://<region-id>.axt.aliyun.com/luban/api/instance/instance-idNormally, the domain name is resolvable and the API call returns the correct instance ID.
If the domain name cannot be resolved or the API call does not return the instance ID, there is a network issue on the instance. For troubleshooting steps, see Configure network permissions for the Cloud Assistant Agent.
[ xxx@iZuf62n-xxx : ~]# ping -c 5 cn-shanghai.axt.aliyun.com
PING cn-shanghai.axt.aliyun.com (100.100.xxx) 56(84) bytes of data.
64 bytes from 100.100.36.108 (100.100.xxx): icmp_seq=1 ttl=102 time=1.32 ms
64 bytes from 100.100.36.108 (100.100.xxx): icmp_seq=2 ttl=102 time=1.30 ms
64 bytes from 100.100.36.108 (100.100.xxx): icmp_seq=3 ttl=102 time=1.32 ms
64 bytes from 100.100.36.108 (100.100.xxx): icmp_seq=4 ttl=102 time=1.30 ms
64 bytes from 100.100.36.108 (100.100.xxx): icmp_seq=5 ttl=102 time=1.30 ms
--- cn-shanghai.axt.aliyun.com ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4005ms
rtt min/avg/max/mdev = 1.295/1.305/1.318/0.010 ms
[ @iZuf62njf1dkb ~]# curl https://cn-shanghai.axt.aliyun.com/luban/api/instance/instance-id
i-uf62njf1dkbc2c xxx root@iZuf62njf1dkb xxx ~]#Abnormal status for a registered managed instance
If a managed instance shows an Abnormal status on the Cloud Assistant console after successful registration, check the logs for an invalid timestamp error.
The default log paths for Cloud Assistant are as follows, where <version> is the version of the Cloud Assistant Agent.
Linux instance
CoreOS: /opt/local/share/aliyun-assist/<version>/log
Other operating systems (such as Alibaba Cloud Linux, Ubuntu, Debian, Red Hat, SUSE Linux Enterprise Server, and OpenSUSE): /usr/local/share/aliyun-assist/<version>/log
Windows instance: C:\ProgramData\aliyun\assist\<version>\log
The following example shows the invalid timestamp error in the Cloud Assistant log. Note the key messages: code:400, errCode:BAD_REQUEST, and errMsg:invalid timestamp.
M/s1Kpi+KHyHOSytaIf6q7qPc8cGRXbaKR4ZtzJMOKTRoW1V1Y2t6cMaW7v9pZY9phJKeqQo4TMtAZasr/68EqS3xfaYmBRpvlnqvR6b3CR0336R1OQ==
time="2023-09-04T16:54:37+08:00" level=info msg="https://cn-shanghai.axt.aliyuncs.com/luban/api/metrics {\"code\":400,\"errCode\":\"_BAD_REQUEST_\",\"errMsg\":\"invalid timestamp:
1693817677756,\"instanceId\":\"mi-sh03vea8ivh50qo\",\"requestId\":\"efb3ccca-7834-43e2-b0ce-1f5aacb37aad\"
{\"eventId\":\"agent.startup\",\"category\":\"STARTUP\",\"subCategory\":\"\",\"eventLevel\":\"INFO\",\"eventTime\":\"1693817677755\",\"common\":\"\",\"arch\":\"amd64\",\"instanceId\":\"\",\"unknown\",\"osVersion\"
\"Linux_#1 SMP Tue Mar 31 23:36:51 UTC 2020_x86_64\",\"virtualType\":\"unknown\",\"distribution\":\"\",\"centos
7.8.2003\",\"kernelVersion\":\"3.10.0-1127.el7.x86_64\",\"keywords\":\"\",\"osName\":\"Linux_#1 SMP Tue Mar 31 23:36:51 UTC 2020 x86_64\",\"type\":\"\"not cold start\"}
time="2023-09-04T16:54:37+08:00" level=info msg="https://cn-shanghai.axt.aliyuncs.com/luban/api/l/task?reason=startup&cold=false¤tTime=1693817677756&offset=28800&timeZone=Asia%2FShanghai
{\"code\":400,\"errCode\":\"_BAD_REQUEST_\",\"errMsg\":\"invalid timestamp: 1693817677756\",\"instanceId\":\"mi-sh03vea8ivh50qo\",\"requestId\":\"bcbb8f3e-781a-43f1-afa8-e2Seef3cf116\"} <nil>"
time="2023-09-04T16:54:37+08:00" level=info msg="mi-sh03vea8ivh50qo1d678715bd3442d9bf66b7b5712a5 251693817677961439582&d-a299-486c-94d7-ba71f537f248
LEv1C0x/ZhbRS57+A7/60/SOJe51CxxXKKq4f97phnz1o FBwCKREpDDBbEhZth1CzOQqXqauSt1xmAQW=="
gxSud7 9MnI1TUJav3jyMdmK+s2BGZGHzZstWSinn7cjaTj fA+dgkhNAqvOMoq63Z6BWR4N0rZt1oLCrrFIG4JAIFLAyfmOmrkygk5/abOezyk4DH/1V7vN2wQ
7FYEi7VVY45BzrKEvGtIzNefc0dltkNKSP0MHRsWMR6xibFWDe/u/0z3KJ9oQYZ JaTn6g5uzlnIZ91Lx09ssJz/JU6cOnd8fOrXCaBPFpg20SmcUBZu1HQ==
time="2023-09-04T16:54:38+08:00" level=info msg="https://cn-shanghai.axt.aliyuncs.com/luban/api/metrics {\"code\":400,\"errCode\":\"_BAD_REQUEST_\",\"errMsg\":\"invalid timestamp:
1693817677961\",\"instanceId\":\"mi-sh03vea8ivh50qo\",\"requestId\":\"4395828d-a299-486c-94d7-ba71f537f248\"
{\"eventId\":\"agent.kdump\",\"category\":\"KDUMP\",\"eventLevel\":\"INFO\",\"eventTime\":\"1693817677961\",\"common\":\"\",\"arch\":\"amd64\",\"unknown\",\"osVersion\":\"Lin
ux_#1 SMP Tue Mar 31 23:36:51 UTC 2020_x86_64\",\"virtualType\":\"unknown\",\"distribution\":\"centos
7.8.2003\",\"kernelVersion\":\"3.10.0-1127.el7.x86_64\",\"keywords\":\"\",\"status\":\"\"ON\"\"} <nil>"
time="2023-09-04T16:54:54+08:00" level=info msg="Stopping ......"This error occurs because the managed instance's clock is out of sync. To resolve this, synchronize the time on the managed instance. For more information, see Manually synchronize time.
Related documents
You can call the ListPluginStatus operation to query the status of Cloud Assistant plugins on an instance. The response includes the timestamps of the plugin's first (FirstHeartbeatTime) and last (LastHeartbeatTime) heartbeats.