A Message Indicating an Operation Failure Is Displayed During Action Run Shell Commands Deployment
Symptoms
During action deployment, an error message is displayed, indicating that the operation fails.
Cause Analysis
Some commands entered in the text box are intercepted by cloud firewalls. As a result, the deployment fails. The following figure uses the shell command as an example.
1 2 3 4 5 6 |
cat /etc/hosts cat /etc/passwd cat /etc/shadow cat /etc/fstab mount -l || echo hello world ... |
Solution
Solution 1: Parameterization
- Add the parameter Path and set its value to /etc/hosts.
- Reference the parameter Path in the Shell Commands text box.
cat ${Path} cat /etc/passwd cat /etc/shadow cat /etc/fstab mount -l || echo hello world ……
Solution 2: Using the Shell Script
- Upload the script to CodeArts Artifact.
- Use the action Select Deployment Source to download the script to the target host.
- Deploy the action Run Shell Script.
Running Shell Commands FAQs
- A Message Indicating an Operation Failure Is Displayed During Action Run Shell Commands Deployment
- Service Is Not Started But the Log Shows That Shell Commands Are Successfully Executed
- Unidentified Shell Commands Are Used
- Shell Command References a File or Folder That Does Not Exist
- How Does a Shell Command Reference Parameters?
- Deployment of the Action Run Shell Commands Times Out
- Interactive Shell Commands Are Used
- Shell Command Deployment Times Out After the su Command Is Executed to Switch the User
- Application Deployment Interruption
- Insufficient Permissions
- Parameters Contain Backslashes (\)
- No Host Exists in the Environment
- Environment Does Not Exist
- Error Occurs During Application Deployment with the sudo Privileges
- Deployment Blocked by Third-Party Antivirus Software
- Invalid Path
- A Network Error Occurs During Software Installation on CentOS
- A Network Error Occurs During Software Installation on Ubuntu OS
- Windows Path Not Allowed on a Linux Host
- Other FAQs
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbotmore