Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-23270

[Watcher] Deploy docker wizard: pushing image to OpenShift Docker registry refused because of self-signed certificate

XMLWordPrintable

    • Hide
      1. ASSERT: make sure that you have a Docker connection in Eclipse & Docker image that you can push to Openshift (ex. clone //github.com/redhat-helloworld-msa/aloha and build the docker image that it provides)
      2. EXEC: in "Docker Explorer", select the image and pick "Deploy to OpenShift..." in the context menu
      3. ASSERT: Deploy Docker image wizard shows up
      4. EXEC: Check "Push to Docker Registry"
      5. ASSERT: make sure that you have the URL for the Docker registry
      6. EXEC: trigger the deploy (hit "Next" and "Finish")

      Result:
      You get an error telling you that the push to the registry failed because the registry is using a self-signed certificate:

      In the Eclipse log you'll find the following log output

      org.eclipse.linuxtools.docker.core.DockerException: com.spotify.docker.client.DockerException: org.eclipse.linuxtools.docker.core.DockerImagePushFailedException: Image push failed: hub.openshift.rhel-cdk.10.1.2.2.xip.io/sample-project/aloha:latest: unable to ping registry endpoint https://hub.openshift.rhel-cdk.10.1.2.2.xip.io/v0/
      v2 ping attempt failed with error: Get https://hub.openshift.rhel-cdk.10.1.2.2.xip.io/v2/: x509: certificate signed by unknown authority
       v1 ping attempt failed with error: Get https://hub.openshift.rhel-cdk.10.1.2.2.xip.io/v1/_ping: x509: certificate signed by unknown authority
      	at org.eclipse.linuxtools.internal.docker.core.DockerConnection.pushImage(DockerConnection.java:1138)
      	at org.jboss.tools.openshift.internal.ui.dockerutils.PushImageToRegistryJob.doRun(PushImageToRegistryJob.java:67)
      	at org.jboss.tools.openshift.internal.common.core.job.AbstractDelegatingMonitorJob.run(AbstractDelegatingMonitorJob.java:37)
      	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
      Caused by: com.spotify.docker.client.DockerException: org.eclipse.linuxtools.docker.core.DockerImagePushFailedException: Image push failed: hub.openshift.rhel-cdk.10.1.2.2.xip.io/sample-project/aloha:latest: unable to ping registry endpoint https://hub.openshift.rhel-cdk.10.1.2.2.xip.io/v0/
      v2 ping attempt failed with error: Get https://hub.openshift.rhel-cdk.10.1.2.2.xip.io/v2/: x509: certificate signed by unknown authority
       v1 ping attempt failed with error: Get https://hub.openshift.rhel-cdk.10.1.2.2.xip.io/v1/_ping: x509: certificate signed by unknown authority
      	at org.eclipse.linuxtools.internal.docker.core.DockerProgressHandler.progress(DockerProgressHandler.java:42)
      	at com.spotify.docker.client.ProgressStream.tail(ProgressStream.java:74)
      	at com.spotify.docker.client.DefaultDockerClient.push(DefaultDockerClient.java:821)
      	at org.eclipse.linuxtools.internal.docker.core.DockerConnection.pushImage(DockerConnection.java:1133)
      	... 3 more
      Caused by: org.eclipse.linuxtools.docker.core.DockerImagePushFailedException: Image push failed: hub.openshift.rhel-cdk.10.1.2.2.xip.io/sample-project/aloha:latest: unable to ping registry endpoint https://hub.openshift.rhel-cdk.10.1.2.2.xip.io/v0/
      v2 ping attempt failed with error: Get https://hub.openshift.rhel-cdk.10.1.2.2.xip.io/v2/: x509: certificate signed by unknown authority
       v1 ping attempt failed with error: Get https://hub.openshift.rhel-cdk.10.1.2.2.xip.io/v1/_ping: x509: certificate signed by unknown authority
      	at org.eclipse.linuxtools.internal.docker.core.DefaultImagePushProgressHandler.processMessage(DefaultImagePushProgressHandler.java:47)
      	at org.eclipse.linuxtools.internal.docker.core.DockerProgressHandler.progress(DockerProgressHandler.java:40)
      	... 6 more
      
      !ENTRY org.eclipse.linuxtools.docker.core 4 0 2016-09-27 11:54:03.086
      !MESSAGE Request error: GET https://10.1.2.2:2376/containers/json?all=1: 500
      !STACK 0
      org.eclipse.linuxtools.docker.core.DockerException: Request error: GET https://10.1.2.2:2376/containers/json?all=1: 500
      	at org.eclipse.linuxtools.internal.docker.core.DockerConnection.listContainers(DockerConnection.java:715)
      	at org.eclipse.linuxtools.internal.docker.core.DockerConnection.getContainers(DockerConnection.java:555)
      	at org.eclipse.linuxtools.internal.docker.core.DockerContainerRefreshManager$ContainerRefreshThread.run(DockerContainerRefreshManager.java:160)
      
      Show
      ASSERT: make sure that you have a Docker connection in Eclipse & Docker image that you can push to Openshift (ex. clone //github.com/redhat-helloworld-msa/aloha and build the docker image that it provides) EXEC: in "Docker Explorer", select the image and pick "Deploy to OpenShift..." in the context menu ASSERT: Deploy Docker image wizard shows up EXEC: Check "Push to Docker Registry" ASSERT: make sure that you have the URL for the Docker registry EXEC: trigger the deploy (hit "Next" and "Finish") Result: You get an error telling you that the push to the registry failed because the registry is using a self-signed certificate: In the Eclipse log you'll find the following log output org.eclipse.linuxtools.docker.core.DockerException: com.spotify.docker.client.DockerException: org.eclipse.linuxtools.docker.core.DockerImagePushFailedException: Image push failed: hub.openshift.rhel-cdk.10.1.2.2.xip.io/sample-project/aloha:latest: unable to ping registry endpoint https: //hub.openshift.rhel-cdk.10.1.2.2.xip.io/v0/ v2 ping attempt failed with error: Get https: //hub.openshift.rhel-cdk.10.1.2.2.xip.io/v2/: x509: certificate signed by unknown authority v1 ping attempt failed with error: Get https: //hub.openshift.rhel-cdk.10.1.2.2.xip.io/v1/_ping: x509: certificate signed by unknown authority at org.eclipse.linuxtools.internal.docker.core.DockerConnection.pushImage(DockerConnection.java:1138) at org.jboss.tools.openshift.internal.ui.dockerutils.PushImageToRegistryJob.doRun(PushImageToRegistryJob.java:67) at org.jboss.tools.openshift.internal.common.core.job.AbstractDelegatingMonitorJob.run(AbstractDelegatingMonitorJob.java:37) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Caused by: com.spotify.docker.client.DockerException: org.eclipse.linuxtools.docker.core.DockerImagePushFailedException: Image push failed: hub.openshift.rhel-cdk.10.1.2.2.xip.io/sample-project/aloha:latest: unable to ping registry endpoint https: //hub.openshift.rhel-cdk.10.1.2.2.xip.io/v0/ v2 ping attempt failed with error: Get https: //hub.openshift.rhel-cdk.10.1.2.2.xip.io/v2/: x509: certificate signed by unknown authority v1 ping attempt failed with error: Get https: //hub.openshift.rhel-cdk.10.1.2.2.xip.io/v1/_ping: x509: certificate signed by unknown authority at org.eclipse.linuxtools.internal.docker.core.DockerProgressHandler.progress(DockerProgressHandler.java:42) at com.spotify.docker.client.ProgressStream.tail(ProgressStream.java:74) at com.spotify.docker.client.DefaultDockerClient.push(DefaultDockerClient.java:821) at org.eclipse.linuxtools.internal.docker.core.DockerConnection.pushImage(DockerConnection.java:1133) ... 3 more Caused by: org.eclipse.linuxtools.docker.core.DockerImagePushFailedException: Image push failed: hub.openshift.rhel-cdk.10.1.2.2.xip.io/sample-project/aloha:latest: unable to ping registry endpoint https: //hub.openshift.rhel-cdk.10.1.2.2.xip.io/v0/ v2 ping attempt failed with error: Get https: //hub.openshift.rhel-cdk.10.1.2.2.xip.io/v2/: x509: certificate signed by unknown authority v1 ping attempt failed with error: Get https: //hub.openshift.rhel-cdk.10.1.2.2.xip.io/v1/_ping: x509: certificate signed by unknown authority at org.eclipse.linuxtools.internal.docker.core.DefaultImagePushProgressHandler.processMessage(DefaultImagePushProgressHandler.java:47) at org.eclipse.linuxtools.internal.docker.core.DockerProgressHandler.progress(DockerProgressHandler.java:40) ... 6 more !ENTRY org.eclipse.linuxtools.docker.core 4 0 2016-09-27 11:54:03.086 !MESSAGE Request error: GET https: //10.1.2.2:2376/containers/json?all=1: 500 !STACK 0 org.eclipse.linuxtools.docker.core.DockerException: Request error: GET https: //10.1.2.2:2376/containers/json?all=1: 500 at org.eclipse.linuxtools.internal.docker.core.DockerConnection.listContainers(DockerConnection.java:715) at org.eclipse.linuxtools.internal.docker.core.DockerConnection.getContainers(DockerConnection.java:555) at org.eclipse.linuxtools.internal.docker.core.DockerContainerRefreshManager$ContainerRefreshThread.run(DockerContainerRefreshManager.java:160)
    • Workaround Exists
    • Hide

      in cli do "vagrant halt && vagrant destroy && vagrant up"

      Show
      in cli do "vagrant halt && vagrant destroy && vagrant up"

            Unassigned Unassigned
            adietish@redhat.com André Dietisheim
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: