All Products
Search
Document Center

Elastic Compute Service:View the status of Cloud Assistant and handle anomalies

Last Updated:Jan 03, 2025

This topic describes how to view the status of Cloud Assistant and handle anomalies.

View the status of Cloud Assistant

In the ECS console

  1. Log on to the ECS console.

  2. In the left-side navigation pane, choose Maintenance & Monitoring > Cloud Assistant.

  3. In the top navigation bar, select the region and resource group to which the resource belongs. 地域

  4. On the ECS Instances tab, view the status of Cloud Assistant.

    • Normal: Cloud Assistant works as expected.

      image.png

    • Not Installed: Cloud Assistant Agent is not installed on the Elastic Compute Service (ECS) instance. To install Cloud Assistant Agent, use one of the following methods:

      • Click Install to automatically install Cloud Assistant Agent.

        If you use this method to install Cloud Assistant Agent, you must restart the instance to complete the installation.

      • Manually install Cloud Assistant Agent. For more information, see Install Cloud Assistant Agent.

        image.png

    • Abnormal: A status anomaly can occur due to various reasons. Troubleshoot the issue based on the actual scenario. For more information, see Handle Cloud Assistant status anomalies.

      image.png

Call an API operation

Call the DescribeCloudAssistantStatus operation to query the status of Cloud Assistant. If "CloudAssistantStatus": "true" is returned in the response, the status of Cloud Assistant is normal. If a status anomaly occurs, troubleshoot the issue as described in Handle Cloud Assistant status anomalies.

Handle Cloud Assistant status anomalies

Linux instance

  1. Connect to a Linux instance.

    For more information, see Use Workbench to connect to a Linux instance over SSH.

  2. Check whether the directory where Cloud Assistant Agent is installed exists.

    • Run the following commands in CentOS:

      cd /opt/local/share/
      ls
    • Run the following commands in other operating systems, such as Alibaba Cloud Linux, Ubuntu, Debian, Red Hat, SUSE Linux Enterprise Server, and openSUSE:

      cd /usr/local/share/
      ls
    • If the aliyun-assist folder exists, perform Step 3.

    • If the aliyun-assist folder does not exist, Cloud Assistant Agent was uninstalled. You must re-install Cloud Assistant Agent. For more information, see Install Cloud Assistant Agent.

  3. View the status of Cloud Assistant.

    Run the following command to view the initialization process used by your Linux instance. The command that you can use to view the status of Cloud Assistant varies based on the initialization process used by the kernel version of your Linux operating system.

    ls -l /sbin/init
    • If the command output indicates systemd, such as /lib/systemd/systemd, the operating system uses the systemd initialization process.

    • If the command output indicates upstart, such as /sbin/upstart, the operating system uses the UpStart initialization process.

    • If the command output indicates init, such as /sbin/init, the operating system uses the sysvinit initialization process.

      systemd

      Run the following command to view the status of Cloud Assistant:

      systemctl status aliyun.service
      • If the status of Cloud Assistant is inactive (dead), Cloud Assistant Agent is stopped, and you must run the systemctl start aliyun.service command to start Cloud Assistant Agent.

        If an error message appears during startup or Cloud Assistant Agent fails to be started, uninstall and re-install Cloud Assistant Agent. For more information, see Start, stop, or uninstall Cloud Assistant Agent and Install Cloud Assistant Agent on a Linux instance.

        image.png

      • If the status of Cloud Assistant is active (running), Cloud Assistant works as expected. Proceed to Step 4.

        image.png

      UpStart

      Run the following command to view the status of Cloud Assistant:

      /sbin/initctl status aliyun-service
      • If the status of Cloud Assistant is stop/waiting, Cloud Assistant Agent is stopped, and you must run the /sbin/initctl start aliyun-service command to start Cloud Assistant Agent.

        If an error message appears during startup or Cloud Assistant Agent fails to be started, uninstall and re-install Cloud Assistant Agent. For more information, see Start, stop, or uninstall Cloud Assistant Agent and Install Cloud Assistant Agent on a Linux instance.

        image.png

      • If the status of Cloud Assistant is start/running, Cloud Assistant works as expected. Proceed to Step 4.

        image.png

      sysvinit

      Run the following command to view the status of Cloud Assistant:

      /etc/init.d/aliyun-service status
      • If the status of Cloud Assistant is Stopped, Cloud Assistant Agent is stopped, and you must run the /etc/init.d/aliyun-service start command to start Cloud Assistant Agent.

        If an error message appears during startup or Cloud Assistant Agent fails to be started, uninstall and re-install Cloud Assistant Agent. For more information, see Uninstall Cloud Assistant Agent from a Linux instance and Install Cloud Assistant Agent on a Linux instance.

        image.png

      • If the status of Cloud Assistant is Running, Cloud Assistant runs as expected. Proceed to Step 4.

        image.png

  4. View the status of Cloud Assistant in the ECS console.

    • If the status of Cloud Assistant is normal, the issue is resolved.

    • If the status of Cloud Assistant is abnormal, view Cloud Assistant logs to identify the causes.

      • Run the following commands in CoreOS:

        cd /opt/local/share/aliyun-assist/<version>/log  
        tail -100f aliyun_assist_main.log
      • Run the following commands in 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

  1. Connect to a Windows instance.

    For more information, see Use Workbench to connect to a Windows instance over RDP.

  2. Check whether the C:\ProgramData\aliyun\assist directory where Cloud Assistant Agent is installed exists.

    • If the aliyun-assist folder exists, check the status of Cloud Assistant.

    • If the aliyun-assist folder does not exist, Cloud Assistant Agent was uninstalled. You must re-install Cloud Assistant Agent. For more information, see Install Cloud Assistant Agent.

  3. View the status of Cloud Assistant.

    1. Click Start and choose Windows Administrative Tools > Computer Management.

    2. Choose Computer Management (Local) > Services and Applications > Services.

    3. Find Aliyun Assist Service in the Name column and view the status of Cloud Assistant.

  4. View the status of Cloud Assistant in the ECS console.

    • If the status of Cloud Assistant is normal, the issue is resolved.

    • If the status of Cloud Assistant is abnormal, view Cloud Assistant logs to identify the causes.

      The default path of the log file: C:\ProgramData\aliyun\assist\<version>\log. <version> indicates the version number of Cloud Assistant Agent.

      image.png

FAQ

Why does the "context deadline exceeded (Client.Timeout exceeded while awaiting headers)" error message appear in the Cloud Assistant logs?

image.png

The error message appears because the Elastic Compute Service (ECS) instance cannot access the Cloud Assistant server. You can run the following command to check the network connectivity.

Note

Replace <region-id> with a region ID. For more information, see Regions and zones.

ping <region-id>.axt.aliyun.com
curl https://<region-id>.axt.aliyun.com/luban/api/instance/instance-id

If the domain name cannot be resolved to an IP address or the instance ID cannot be returned, network connectivity issues exist. You can configure network permissions to resolve the issues. For more information, see Configure network permissions for Cloud Assistant Agent.

image.png

Why is a registered managed instance in the Abnormal state?

You can view Cloud Assistant logs to check whether the "invalid timestamp" error appears in the logs.

Note

The following section describes the default paths of the log file. <version> indicates the version number of Cloud Assistant Agent.

  • Linux instances

    • CoreOS: /opt/local/share/aliyun-assist/<version>/log

    • Other operating systems, such as 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

image.png

This error occurs because the local time of the managed instance does not match the actual time. To resolve the issue, change the local time of the managed instance to the actual time. For more information, see Configure time.

References

You can call the ListPluginStatus operation to query the states of Cloud Assistant plug-ins on ECS instances. You can check the FirstHeartbeatTime and LastHeartbeatTime parameters in the response to obtain the time when Cloud Assistant reported the status of a plug-in for the first time and the time when Cloud Assistant reported the status of the plug-in for the last time.