This topic provides answers to frequently asked questions (FAQ) about using CloudOps Orchestration Service (OOS).
RAM user permission error: The user is not authorized to perform the action: (ListTemplates)
Execution action not found despite having the required resources
What do I do if I failed to build and deploy an application from the Git code repository?
DescribeInstances API operation error: SDK.UnknownServerError or InvalidParameter
RAM user operation error: User has no permission to do the action: (ListTemplates)
Possible cause: The RAM user does not have the permissions to call the operation.
Solution: Log on to the RAM console as an administrator or using your Alibaba Cloud account. Grant the required permissions to the RAM user that reports the error. You can grant permissions on specific API operations or all API operations. For example,
"Action": "oos:*"grants permissions on all OOS API operations. For more information, see Access control.{ "Statement": [ { "Effect": "Allow", "Action": "oos:*", "Resource": "*" } ], "Version": "1" }
RAM user operation error: User has no permission to do the action: (PassRole)
Possible cause: The RAM user does not have the PassRole permission to call the CloudOps Orchestration Service operation.
Solution: Log on to the RAM console with an Alibaba Cloud account or an administrator account. Grant the PassRole permission to the RAM user. For more information, see Access control.
{ "Version": "1", "Statement": [ { "Effect": "Allow", "Action": "ram:PassRole", "Resource": "*" } ] }
Template execution error: Assumes role failed. Code: EntityNotExist.Role, msg: The role not exists: acs:ram::111111:role/OOSServiceRole
Possible cause: You have not created a default RAM role for your OOS service to access your Alibaba Cloud resources.
Solution: Log on to the RAM console with an Alibaba Cloud account or an administrator account. Create the default RAM role OOSServiceRole for your OOS service. For more information, see Grant RAM permissions to OOS.
Template execution error: Assumes role failed. Code: NoPermission, msg: You are not authorized to do this action. You should be authorized by RAM
Possible cause: You have not attached the required trust policy to the RAM role OOSServiceRole for your OOS service.
Solution: Log on to the RAM console using an Alibaba Cloud account or an administrator account and add the OOSServiceRole RAM role. For more information, see Set RAM permissions for OOS.
Log on to the RAM console and enter
OOSServiceNamein the search box for roles.
Click Trust Policy.

Modify the policy.

Use the following content for the policy:
{ "Statement": [ { "Action": "sts:AssumeRole", "Effect": "Allow", "Principal": { "Service": [ "oos.aliyuncs.com" ] } } ], "Version": "1" }
Template execution error: Code: Forbidden.RAM, Message: User not authorized to operate on the specified resource, or this API doesn't support RAM
Possible cause: The RAM user or RAM role does not have the permissions to access the specified resources.
Solution: Grant required permissions to the RAM user or RAM role. For more information, see Query the RAM policy required for template execution, Grant permissions to a RAM user, and Grant permissions to a RAM role.
Temporary bandwidth upgrade error: code: InvalidAccountStatus.NotEnoughBalance message: Your account does not have enough balance
Possible cause: The account balance is insufficient to pay for the new order.
Solution: Top up your account and try again.
Temporary bandwidth upgrade error: code: InvalidBandwidth.ValueNotSupported message: Instance upgrade bandwidth of temporary not allow less then existed
Possible cause: The bandwidth specified in the temporary bandwidth upgrade task is lower than the current bandwidth.
Solution:
On the Overview page of the OOS console, search for temporary bandwidth upgrade tasks based on Elastic Compute Service (ECS) instance ID. Check whether a duplicate upgrade task exists.
If a duplicate upgrade task exists, delete the task.
If such a duplicate upgrade task does not exist, go to the ECS console. In the navigation pane on the left, click Instances. On the Instance page, click the name or ID of the instance that you want to query. View the upgrade logs on the Operation Records tab.
Temporary bandwidth upgrade error: code: OperationDenied.UnpaidOrder message: The specified instance has unpaid order
Possible cause: The ECS instance that you want to manage has one or more unpaid bills.
Solution: Complete the payments for the orders.
Common command execution error: runCommand loop task fail because failures exceeded MaxErrors -> runCommand execution failed, checkInvocationResult Invocation.InvocationResults.InvocationResult[].ExitCode expect in [0] but is 1
Possible cause: The exit code of the Cloud Assistant command is not 0.
Solution: Troubleshoot the error by viewing the output and logs of the child execution. For more information, see View the details of an execution.
What do I do if I create an execution but I cannot find it?
Possible cause: The execution is in another region.
Solution: View the executions in all regions on the Overview page.
How do I troubleshoot command errors?
Solution: Check execution results and troubleshoot common issues.
What do I do if I failed to build and deploy an application from the Git code repository?
Possible cause: Code errors and dependency installation failures. You can view logs to obtain the causes of application build and deployment failures.
Solution:
Build failures
NoteIf you fail to build an application from the Git code repository, no ECS instances are created and you are not charged.
View logs to obtain error messages about build failures.

Modify the code or add a configuration file.
Modify the code or add a configuration file based on the programming language of your code repository, and submit it to the code repository. For more information, see Configure applications based on specific programming languages.
Delete the application group that fails to be built and create a new application group.
Deployment failures
View logs to obtain error messages about deployment failures.
Fix the problem and deploy the application again.

Unable to access the service after application deployment is successful
Exclude the startup delay of the application.
After the application is deployed, wait for a while to access the application again. If you still cannot access the service, proceed to the next step.
Log on to the ECS instance and run the following command to check whether the application service is started.
sudo systemctl status aliyun-applicationmanagerIf the service is started, proceed to the next step.
If the service has not started properly, check the system service logs to find the cause of the
docker runcommand failure.
View container logs
# Find the Docker container. sudo docker ps -a | grep applicationmanager # View container logs sudo docker logs applicationmanagerIf the Docker container is not started, modify the code or add configuration files based on the programming language of the code repository, and submit the code to the code repository. For more information, see Configure applications based on specific programming languages.
In the Quick Actions section of the Overview tab, click Update Application. Then, use the updated code to deploy the application again.
Common scenarios
To build and deploy applications quickly and successfully, we recommend that you debug the Buildpacks build on an on-premises machine. For more information, see Debug Buildpacks.
If you cannot resolve the issue using these methods, submit a ticket or join the DingTalk group for application management support (ID:
10880003624) to provide feedback.
DescribeInstances API operation error: SDK.UnknownServerError or InvaliParameter
Cause: If you pass more than 100 instance IDs to the DescribeInstances API operation, an InvalidParameter or SDK.UnknownServerError (414 Request-URI Too Large) error is reported.
Solution:
- Name: getInstanceDescribe Action: ACS::ExecuteAPI Description: en: Query instance type Properties: Service: ECS API: DescribeInstances Parameters: InstanceIds: Fn::Jq: - All - .[].InstanceId - '{{ getInstance.instanceIds }}' Outputs: instanceIds: Type: List ValueSelector: Instances.Instance[].InstanceId- Name: getInstanceDescribe Description: en: Views the ECS instances. Action: ACS::SelectTargets Properties: ResourceType: ALIYUN::ECS::Instance Filters: - Type: ResourceIds ResourceIds: Fn::Jq: - All - .[].InstanceId - '{{ getInstance.instanceIds }}' Outputs: instanceIds: Type: List ValueSelector: Instances.Instance[].InstanceId
Use selectTargets. Replace Code Block 1 with Code Block 2.
Solution for literally outputting "table {{.Name}}\t{{.MemUsage}}" when the script content uses the OOS parameter format
Cause: You want to run the following command as is:
docker stats --no-stream --format "table {{.Name}}\t{{.MemUsage}}" | sort -k2 -hr | head -n 6
The template engine considers the {{}} format in "table {{.Name}}\t{{.MemUsage}}" a variable. This causes a parsing issue.
Solution: Modify the command as follows:
left="{{" right="}}" docker stats --no-stream --format "table ${left}.Name${right} ${left}.MemUsage${right}" | sort -k2 -hr | head -n 6
Cloud Assistant command error: 414 Request-URI Too Large
Cause: The command is too long. The maximum length of a Cloud Assistant command after it is Base64-encoded is 24 KB.
For more information, see RunCommand - Create and run a Cloud Assistant command.
Solution: Place the command in an Object Storage Service (OSS) object. Then, use ossutil to download and run the object.