Reputation: 2617
I am working with OpenShift Origin 3.9 and had an application (consisting of a service, pods, etc.) building and running alright.
However, now rebuilds fail with this error message:
Successfully built 1234567890ab
Pushing image docker- registry.default.svc:5000/my_project/my_app:latest ...
Warning: Push failed, retrying in 5s ...
Warning: Push failed, retrying in 5s ...
Warning: Push failed, retrying in 5s ...
Warning: Push failed, retrying in 5s ...
Warning: Push failed, retrying in 5s ...
Warning: Push failed, retrying in 5s ...
Warning: Push failed, retrying in 5s ...
Registry server Address:
Registry server User Name: serviceaccount
Registry server Email: [email protected]
Registry server Password: <<non-empty>>
error: build error: Failed to push image:
After retrying 6 times, Push image still failed due to error:
Get https://docker-registry.default.svc:5000/v1/_ping: dial tcp 1.2.3.4:5000:
getsockopt: connection refused
I don't have admin privileges on that cluster, so it is unlikely that this is due the the nodes' DNS setup, as similar answers would suggest (e.g. here).
One possibly contributing cause could be that I had created a service account in the meantime (since the last successful build) and temporarily logged in with its API token. However I am no logged in again with (an API token for) my full account (e.g. according to oc whoami
.)
This is how I am starting the rebuild:
oc login --token=$api_token
oc start-build --follow my_app
What could explain this error and how can I further diagnose and overcome it, esp. given that I don't have cluster admin rights?
Upvotes: 1
Views: 2753
Reputation: 11
I just had the same problem.
In my case it was the image registry volume that was full.
The reason it worked again for the author of the post is the image-pruner job that is run every day by OpenShift (see CronJob section in the openshift-image-registry namespace).
Hope it will help some of us !
Upvotes: 0
Reputation: 196
You missed one steps
oc policy add-role-to-user system:image-builder
Please follow this doc
https://blog.openshift.com/remotely-push-pull-container-images-openshift/
Upvotes: 0
Reputation: 2617
The problem "somehow" went away after some days. Whether by operator intervention or otherwise I cannot tell.
Upvotes: 0