login Command Execution Failed
Symptom 1
After you add the deployment action Run Docker Command and set Command to login, the error message unauthorized: authentication required is displayed.
Cause Analysis
Authentication fails due to incorrect username or password.
Solution
Enter the correct username and password.
Symptom 2
During the deployment of the login command in the action Run Docker Command, an error message indicating no permissions is displayed.
Cause Analysis
Only the root user and users in the Docker user group are allowed to perform operations on Docker.
Solution
Add the user to the Docker user group.
Symptom 3
During the deployment of the login command in the action Run Docker Command, the error message request canceled while waiting for connection(Client.Timeout exceeded while awaiting headers) is displayed.
Cause Analysis
1. The image repository address is incorrect. As a result, the connection fails and Docker fails to verify the v2 interface.
2. The host does not have the permission to access external networks or is not configured with a proxy. As a result, the connection to the remote image repository times out.
Solution
1. Check the image repository address to ensure that the image repository address is correct and reachable.
2. Configure a proxy for the host to connect to the image repository.
Symptom 4
During the deployment of the login command in the action Run Docker Command, two error messages are displayed: certificate signed by unknown authority and Task failed may be associated with not configured trust.
Cause Analysis
No certificates have been configured for the image repository, and the target host has not been authorized to access this repository.
Solution
- Check that the image repository address, username, and password are correct, and that the network connection and user permissions are normal.
- During host authorization, Docker will be restarted and containers will be stopped. To prevent this from happening, configure the required image repository address in advance.
Case 1
- In the deployment action details area, set Command to login and select Yes for Restart Docker.
- If you need to restart the containers, add the action Run Docker Command and set Command to restart in the action details.
- Click Save & Deploy.
Case 2
- Check whether the /etc/docker/daemon.json file exists.
- If the file does not exist, create it and add the following configuration to the file:
{ "live-restore": true }
- If the file already exists, add the following configuration to it:
- For details about how to set the live-restore parameter, visit the official website https://docs.docker.com/config/containers/live-restore/
- The live-restore parameter can be used to prevent containers from being stopped due to engine upgrades or restarts. Note that live-restore cannot be used in swarm mode. Therefore, live-restore is unavailable for clusters.
- If the file does not exist, create it and add the following configuration to the file:
- Authorize the host to access the image repository.
- In the /etc/docker/daemon.json file, configure the repository address as follows:
{ "insecure-registries" : ["10.10.**.**","10.10.**.**:8080"], "live-restore": true }
- In the /etc/docker/daemon.json file, configure the repository address as follows:
- Make the modification take effect.
- If you use systemd, run the following command to load the configuration:
systemctl reload docker
- If systemd cannot be used due to version incompatibility, run the following command to restart Docker. (Note that this operation will stop running containers.) Then, add action Restart Containers.
service docker restart
- If you use systemd, run the following command to load the configuration:
Running Docker Commands FAQs
- Docker Not Installed
- Docker Command Parameter Error
- No Deployment Permissions
- Image Does Not Exist
- login Command Execution Failed
- build Command Execution Failed
- tag Command Execution Failed
- push Command Execution Failed
- run Command Execution Failed
- start, restart, stop, or rm Command Execution Failed
- rmi Command Execution Failed
- pull Command Execution Failed
- rm Command Execution Failed
- Connection Timed Out
- Application Deployment Interruption
- Insufficient Permissions
- Parameters Contain Backslashes (\)
- No Host Exists in the Environment
- Environment Does Not Exist
- Failed to Deploy an Application on a Windows Host
- 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
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