title: OpenShift rebuild fails to push image: connection refused
body: <p>I am working with OpenShift Origin 3.9 and had an application (consisting of a service, pods, etc.) building and running alright.</p>
  
  <p>However, now rebuilds fail with this error message:</p>
  
  <pre><code>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: serviceaccount@example.org
  Registry server Password: &lt;&lt;non-empty&gt;&gt;
  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
  </code></pre>
  
  <p>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. <a href="https://access.redhat.com/documentation/en-us/openshift_enterprise/3.2/html-single/installation_and_configuration/index" rel="nofollow noreferrer">here</a>).</p>
  
  <p>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 <code>oc whoami</code>.)</p>
  
  <p>This is how I am starting the rebuild:</p>
  
  <pre><code>oc login --token=$api_token
  oc start-build --follow my_app
  </code></pre>
  
  <p>What could explain this error and how can I further diagnose and overcome it, esp. given that I don't have cluster admin rights?</p>