java.lang.RuntimeException: Failed to run docker image docker-registry.dev.cybozu.xyz/kintone/jenkins-build-base

Jenkins JIRA | Miyata Jumpei | 1 year ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    The following error happened in my environment which cannot connect to index.docker.io. {noformat} $ docker run --rm --entrypoint /bin/true alpine:3.2 Unable to find image 'alpine:3.2' locally Pulling repository docker.io/library/alpine docker: Error while pulling image: Get https://index.docker.io/v1/repositories/library/alpine/images: dial tcp 54.152.78.181:443: getsockopt: connection refused. See 'docker run --help'. FATAL: Failed to run docker image docker-registry.dev.cybozu.xyz/kintone/jenkins-build-base java.lang.RuntimeException: Failed to run docker image docker-registry.dev.cybozu.xyz/kintone/jenkins-build-base at com.cloudbees.jenkins.plugins.docker_build_env.Docker.getDocker0Ip(Docker.java:249) at com.cloudbees.jenkins.plugins.docker_build_env.Docker.runDetached(Docker.java:178) at com.cloudbees.jenkins.plugins.docker_build_env.DockerBuildWrapper.startBuildContainer(DockerBuildWrapper.java:202) at com.cloudbees.jenkins.plugins.docker_build_env.DockerBuildWrapper.setUp(DockerBuildWrapper.java:175) at hudson.model.Build$BuildExecution.doRun(Build.java:156) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534) at hudson.model.Run.execute(Run.java:1738) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) {noformat} It seems that the following pull request is cause of this bug. https://github.com/jenkinsci/docker-custom-build-environment-plugin/pull/36 The plugin was modified to use external image "alpine:3.2". However, this change is backward incompatible for environments in internal network with private docker registry. It is internal specification that the plugin uses the image, though building "alpine:3.2" image in a build environment can be a workaround. I think there should be a config option to specify the image for "/sbin/ip".

    Jenkins JIRA | 1 year ago | Miyata Jumpei
    java.lang.RuntimeException: Failed to run docker image docker-registry.dev.cybozu.xyz/kintone/jenkins-build-base
  2. 0

    The following error happened in my environment which cannot connect to index.docker.io. {noformat} $ docker run --rm --entrypoint /bin/true alpine:3.2 Unable to find image 'alpine:3.2' locally Pulling repository docker.io/library/alpine docker: Error while pulling image: Get https://index.docker.io/v1/repositories/library/alpine/images: dial tcp 54.152.78.181:443: getsockopt: connection refused. See 'docker run --help'. FATAL: Failed to run docker image docker-registry.dev.cybozu.xyz/kintone/jenkins-build-base java.lang.RuntimeException: Failed to run docker image docker-registry.dev.cybozu.xyz/kintone/jenkins-build-base at com.cloudbees.jenkins.plugins.docker_build_env.Docker.getDocker0Ip(Docker.java:249) at com.cloudbees.jenkins.plugins.docker_build_env.Docker.runDetached(Docker.java:178) at com.cloudbees.jenkins.plugins.docker_build_env.DockerBuildWrapper.startBuildContainer(DockerBuildWrapper.java:202) at com.cloudbees.jenkins.plugins.docker_build_env.DockerBuildWrapper.setUp(DockerBuildWrapper.java:175) at hudson.model.Build$BuildExecution.doRun(Build.java:156) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534) at hudson.model.Run.execute(Run.java:1738) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) {noformat} It seems that the following pull request is cause of this bug. https://github.com/jenkinsci/docker-custom-build-environment-plugin/pull/36 The plugin was modified to use external image "alpine:3.2". However, this change is backward incompatible for environments in internal network with private docker registry. It is internal specification that the plugin uses the image, though building "alpine:3.2" image in a build environment can be a workaround. I think there should be a config option to specify the image for "/sbin/ip".

    Jenkins JIRA | 1 year ago | Miyata Jumpei
    java.lang.RuntimeException: Failed to run docker image docker-registry.dev.cybozu.xyz/kintone/jenkins-build-base
  3. 0

    Not able to use a Dockerfile when using Jenkins CloudBees Docker Custom Build Environment Plugin

    Stack Overflow | 2 years ago | wshichao
    java.lang.RuntimeException: Failed to build docker image from project Dockerfile
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Cloudbees jenkins plugin fails to start containers

    Stack Overflow | 1 year ago | varesa
    java.lang.RuntimeException: Failed to run docker image
  6. 0

    in https://github.com/jenkinsci/docker-custom-build-environment-plugin/blob/docker-custom-build-environment-1.6.0/src/main/java/com/cloudbees/jenkins/plugins/docker_build_env/Docker.java#L192, the {{getDocker0Ip}} method is using {{ifconfig docker0}} but the result cannot be used in https://github.com/jenkinsci/docker-custom-build-environment-plugin/blob/docker-custom-build-environment-1.6.0/src/main/java/com/cloudbees/jenkins/plugins/docker_build_env/Docker.java#L164 for the docker command {{--add-host}} parameter. {noformat} $ ifconfig docker0 invalid value "dockerhost:flags=4099<UP,BROADCAST,MULTICAST>" for flag --add-host: invalid IP address in add-host: "flags=4099<UP,BROADCAST,MULTICAST>" See 'docker run --help'. FATAL: Failed to run docker image java.lang.RuntimeException: Failed to run docker image at com.cloudbees.jenkins.plugins.docker_build_env.Docker.runDetached(Docker.java:186) at com.cloudbees.jenkins.plugins.docker_build_env.DockerBuildWrapper.startBuildContainer(DockerBuildWrapper.java:176) at com.cloudbees.jenkins.plugins.docker_build_env.DockerBuildWrapper.setUp(DockerBuildWrapper.java:151) at hudson.model.Build$BuildExecution.doRun(Build.java:154) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:536) at hudson.model.Run.execute(Run.java:1741) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:374) Finished: FAILURE {noformat}

    Jenkins JIRA | 2 years ago | Adrien Lecharpentier
    java.lang.RuntimeException: Failed to run docker image

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.RuntimeException

      Failed to run docker image docker-registry.dev.cybozu.xyz/kintone/jenkins-build-base

      at com.cloudbees.jenkins.plugins.docker_build_env.Docker.getDocker0Ip()
    2. com.cloudbees.jenkins
      DockerBuildWrapper.setUp
      1. com.cloudbees.jenkins.plugins.docker_build_env.Docker.getDocker0Ip(Docker.java:249)
      2. com.cloudbees.jenkins.plugins.docker_build_env.Docker.runDetached(Docker.java:178)
      3. com.cloudbees.jenkins.plugins.docker_build_env.DockerBuildWrapper.startBuildContainer(DockerBuildWrapper.java:202)
      4. com.cloudbees.jenkins.plugins.docker_build_env.DockerBuildWrapper.setUp(DockerBuildWrapper.java:175)
      4 frames
    3. Hudson
      Executor.run
      1. hudson.model.Build$BuildExecution.doRun(Build.java:156)
      2. hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
      3. hudson.model.Run.execute(Run.java:1738)
      4. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      5. hudson.model.ResourceController.execute(ResourceController.java:98)
      6. hudson.model.Executor.run(Executor.java:410)
      6 frames