Failed to Push Images to SWR
When you execute the action Build Image and Push to SWR or the action Run Docker Commands, an image may fail to be pushed due to incorrect parameters or environment problems. In this case, rectify the fault by referring to the following solutions provided for different scenarios.
- Insufficient Permissions (denied: you do not have the permission)
- Number of Organizations Reaches the Upper Limit (denied: The number of namespaces exceeds the upper limit)
- You Have Not Logged In (denied: You may not log in yet)
- Authentication Failure (denied: Authenticate Error)
- Invalid Organization Name (invalid reference format)
- The Local Image Does Not Exist (An image does not exist locally with the tag: ***)
- Invalid Abstract (digest invalid: Invalid digest)
Insufficient Permissions
Error Log
When an image is uploaded to SWR, the following error message is displayed:
denied: you do not have the permission [ERROR] : [pluginFrame] step run failed, errorMessage: DEV.CB.0210044, Docker push failed
Analysis and Solution
This error indicates that the current user does not have the permission on the target organization. Check the following possible causes:
- Edit the build task file, click Create Image and Push to SWR, and view the organization name.
- Log in to SWR and check whether the organization exists on the organization management page.
- The organization does not exist. Please create an organization. (The number of organizations cannot exceed the upper limit.)
- If the current user does not have the editing permission for the organization or image that exists in SWR, the preceding error will occur when the image is pushed. The administrator can authorize the current user by referring to User Permissions.
- If the organization exists and the user has the edit permission on the organization, log in to the Identity and Access Management (IAM) console and check whether the user is in a user group with the read-only permission. If yes, remove the user.
Number of Organizations Reaches the Upper Limit
Error Log
denied: The number of namespaces exceeds the upper limit [ERROR] : [pluginFrame] step run failed, errorMessage: DEV.CB.0210044, Docker push failed
Analysis and Solution
By default, if an unused new organization name is specified for pushing an image, SWR automatically creates an organization with the name for the current tenant. SWR limits the number of organizations that can be created by each tenant. If the number of organizations exceeds the limit, the preceding error occurs.
If this error occurs, use the administrator account (or any account with the SWR organization management permissions) to go to the Organization Management page, switch to the corresponding region, view the existing organization list, and select an existing organization or delete unnecessary organizations.
You Have Not Logged In
Error Log
denied: You may not login yet [ERROR] : [pluginFrame] step run failed, errorMessage: fail to execute docker command
Analysis and Solution
The two possible causes are as follows:
- If you have not run the docker login command to log in before pushing an image, add the corresponding login command.
- The login command is executed, but the SWR address in the login command is incorrect. As a result, no error is reported but the login does not take effect. Check whether the login command is correct.
Authentication Failure
Error Log
Error response from daemon: Get https://swr.example.example.com/v2/: denied: Authenticate Error [ERROR] : [pluginFrame] step run failed, errorMessage: fail to execute docker command.
Analysis and Solution
The possible cause is that the account or password in the login command is incorrect or the temporary login information has expired. Obtain a valid login command by referring to Obtaining a Valid Login Command and try again.
Invalid Organization Name
Error Log
invalid reference format [ERROR] : [pluginFrame] step run failed, errorMessage: fail to execute docker command.
Analysis and Solution
The SWR service has requirements on the organization name format. This error occurs when the organization name used to push an image does not meet the format requirements.
If this error occurs, go to the Organization Management page, switch to the corresponding region, and check whether the entered organization name is correct. If yes, manually create an organization with a valid name and try again.
Local Image Does Not Exist
Error Log
[2022-03-05 17:01:05.816] An image does not exist locally with the tag: swr.example.example.com/demo/faqdemo1 [ERROR] : [pluginFrame] step run failed, errorMessage: fail to execute docker command.
Analysis and Solution
The possible cause is that the image fails to be created or the image name and tag in the push command are incorrect. As a result, the expected image in the push command is inconsistent with the image generated from the build or tag command. Check whether the image creation process or push parameters are correct.
In this example, faqdemo1 in the image docker push swr.example.example.com/demo/faqdemo1:v1.1 is incorrect. The image name specified in the build parameter is faqdemo. Modify the push parameter and try again.
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.
Chatbot