You can run a Cloud Assistant command only when all requirements are met, regardless of whether you run the command in the ECS console or after you log on to an instance. To ensure that the intended operation is complete, we recommend that you view the command execution result and status after you run a command. If the execution fails, you can identify and fix the problem based on common error messages.
Background information
Different execution results and status are displayed for a command if exceptions occur. These exceptions include the lack of dependencies, network disruptions, command semantic errors, command debugging errors, and abnormal instance status. You can use the console or call an API operation to view error messages in the execution results, and diagnose and fix the problems.
View execution results in the console
View execution results by using Alibaba Cloud CLI
If you use Cloud Assistant by means of Alibaba Cloud CLI or OpenAPI Explorer, you can call the DescribeInvocations or DescribeInvocationResults operation to query the execution results of Cloud Assistant commands. If the execution fails, you can refer to the ErrorCode and ErrorInfo fields for error details.
In the following examples, the DescribeInvocations and DescribeInvocationResults operations are used to describe how to use Alibaba Cloud CLI to query execution results.
- Call the DescribeInvocations operation to query the execution status of a command.
aliyun ecs DescribeInvocations --RegionId TheRegionId --InvokeId your-invoke-id
- Call the DescribeInvocationResults operation to query the execution result of a command on a specific instance.
aliyun ecs DescribeInvocationResults --RegionId TheRegionId --InstanceId i-bp1g6zv0ce8og******p --InvokeId your-invoke-id
Command errors and solutions
Error code | Error message | Solution |
---|---|---|
InstanceNotRunning | The error message returned because the instance is not in the Running state while the task is being created. | Check whether the instance is running properly. |
ClientNotRunning | The error message returned because the Cloud Assistant client is not running. | The Cloud Assistant client is stopped or not installed. Perform the following operations
to install or start the Cloud Assistant client:
Note If the preceding operations fail to start the Cloud Assistant client, re-install Cloud
Assistant. For more information, see Install the Cloud Assistant client.
|
ClientNetworkBlocked | The error message returned because the instance network environment is abnormal. |
|
ClientNotResponse | The error message returned because the Cloud Assistant client does not respond. | Troubleshoot the problem based on logs of the Cloud Assistant client.
|
DeliveryTimeout | The error message returned because the Cloud Assistant server failed to send the command to the Cloud Assistant client. | If the Cloud Assistant command is not sent to the instance, we recommend that you run the command again. If the problem persists, submit a ticket. |