You can run a Cloud Assistant command only when all requirements are met, regardless of whether you use the Elastic Compute Service (ECS) console or log on to an instance to run the command. To ensure that your intended operation is complete, we recommend that you check the command execution results and state. If executions fail, you can troubleshoot the issues based on common error messages.
Background information
When exceptions occur, different execution results and states are displayed for the command. These exceptions include a lack of dependencies, network exceptions, command semantic errors, command debugging errors, and abnormal instance status. You can use the ECS console or call an API operation to view the error messages in the execution results and troubleshoot the issues.
View execution results in the ECS 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 an execution fails, you can check ErrorCode and ErrorInfo in the API responses 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 state of a command.
aliyun ecs DescribeInvocations --RegionId TheRegionId --InvokeId your-invoke-id
- Call the DescribeInvocationResults operation to query the execution results 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 | Recommended 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 as expected. |
InstanceRestarted | The error message returned because the instance was restarted while the task was being executed. | Do not restart the instance while the task is being executed. |
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 Cloud Assistant client is still not started after the preceding operations
are performed, re-install the Cloud Assistant client. For more information, see Install the Cloud Assistant client.
|
ClientNetworkBlocked | The error message returned because the instance network environment is abnormal. |
Note
|
ClientNotResponse | The error message returned because the Cloud Assistant client does not respond. | Troubleshoot the issue based on logs of the Cloud Assistant client.
|
ClientNeedUpgrade | The error message returned because the Cloud Assistant client is not upgraded. | Enable auto-upgrade for the Cloud Assistant client or manually upgrade the Cloud Assistant client. For more information, see Upgrade or disable upgrades for the Cloud Assistant client. |
ClientNotOnline | The error message returned because the Cloud Assistant client is not connected to the Cloud Assistant server. | Restart the Cloud Assistant client. For more information, see Start, stop, or uninstall the Cloud Assistant client. If the Cloud Assistant client still cannot connect to the Cloud Assistant server after the client is restarted, submit a ticket. |
DeliveryTimeout | The error message returned because the Cloud Assistant server failed to send the command to the Cloud Assistant client. | The Cloud Assistant command is not sent to the instance. We recommend that you run the command again. If the issue persists, submit a ticket. |
ExecutionTimeout | The error message returned because the command execution has timed out. | Extend the command execution timeout period.
|
ExecutionException | The error message returned because an exception occurred while the command was running. | Check the error message in the ErrorInfo field. If you cannot identify the issue based on the error message, submit a ticket. |
ExitCodeNonzero | The error message returned because the command execution is complete but the exit code is not 0. | Check the command script and the command output. |