【问题标题】:Getting "Cannot connect to the Docker daemon" error when creating new app from git repo in fabric8从fabric8中的git repo创建新应用程序时出现“无法连接到Docker守护程序”错误
【发布时间】:2017-05-02 11:04:53
【问题描述】:

我在 openshift origin 3.3 上设置了 fabric8,fabric8 版本是“版本 0.4.121”。无论我在哪里尝试从 fabric8 中的 git repo 创建新应用程序,都会出现此错误:

[firstapp-testapp] Running shell script Executing shell script inside container [maven] of pod [kubernetes-085de53dd4cb4cfe990a727e68371b63-148fdbb6eea48] Executing command: sh -c echo $$ > '/home/jenkins/workspace/firstapp-testapp@tmp/durable-0d2c8f03/pid'; jsc=durable-f46e5a369ce24d99986ef5171a328446; JENKINS_SERVER_COOKIE=$jsc '/home/jenkins/workspace/firstapp-testapp@tmp/durable-0d2c8f03/script.sh'
> '/home/jenkins/workspace/firstapp-testapp@tmp/durable-0d2c8f03/jenkins-log.txt' 2>&1; echo $? > '/home/jenkins/workspace/firstapp-testapp@tmp/durable-0d2c8f03/jenkins-result.txt' [?1034hsh-4.2# cd /home/jenkins/workspace/firstapp-testapp sh-4.2# sh
-c echo $$ > '/home/jenkins/workspace/firstapp-testapp@tmp/durable-0d2  c8f03/pid'; jsc=durable-f46e5a369ce24d99986ef5171a328446; JENKINS_SERVER_COOKIE=  $jsc '/home/jenkins/workspace/firstapp-testapp@tmp/durable-0d2c8f03/script.sh'
>   '/home/jenkins/workspace/firstapp-testapp@tmp/durable-0d2c8f03/jenkins-log.txt' 2 
>&1; echo $? > '/home/jenkins/workspace/firstapp-testapp@tmp/durable-0d2c8f03/jen  kins-result.txt' 
+ docker tag accenture/firstapp-testapp:1.0.4 172.30.158.59:80/accenture/firstapp-testapp:1.0.4 Cannot connect to the Docker daemon. Is the docker daemon running on this host? sh-4.2# exit exit script returned exit code 1

为什么会出现这个错误?

【问题讨论】:

    标签: openshift openshift-origin fabric8 openshift-enterprise


    【解决方案1】:

    由于内部 OpenShift 问题而发生错误。 请确保您的 OpenShift 实例已正确安装。

    为此,您可以部署目录中的示例应用程序之一。 要手动解决此问题,您可以在 OpenShift 机器上执行以下语句

    service docker restart
    

    【讨论】:

    • 感谢您的响应,OpenShift 运行良好,我已经测试了几个应用程序,但问题是当我从 fabric8 控制台执行此操作时。 Docker 在 openshift 上运行良好。对这个 fabric8 问题有任何帮助吗?
    【解决方案2】:

    您是否尝试从容器中调用docker?您需要更改 SCC 才能做到这一点,但我不建议这样做。可能有更好的方法来完成同样的事情。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-10-12
      • 1970-01-01
      • 2015-03-27
      • 2021-02-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多