如何解决这个错误" tar:/ tmp:无法打开:权限被拒绝"在openshift起源的app构建阶段

时间:2018-02-05 22:05:01

标签: docker openshift centos7 openshift-origin

在GCP上成功安装多主机主机后,从openshift模板目录创建应用程序在应用程序的构建阶段抛出此错误:

Cloning "https://github.com/openshift/cakephp-ex.git " ...
    Commit: fbda3d301f534128de359962569117e576dd155a (Merge pull request #89 from bparees/interval)
    Author: Ben Parees <bparees@users.noreply.github.com>
    Date:   Fri Jan 19 11:50:17 2018 -0500
tar: /tmp: Cannot open: Permission denied
tar: Error is not recoverable: exiting now
ERROR: Error copying file "/tmp/upload/src/.git/objects/pack/pack-33ae8e32ac7976585b2c18880e7c38cd98a2f0dd.pack" to tar: io: read/write on closed pipe
ERROR: Error writing tar: io: read/write on closed pipe
error: build error: write unix @->/var/run/docker.sock: write: broken pipe

我需要一些建议如何解决这个问题。我也试过了目录中的另一个模板,比如Node.js,我得到了 同样的问题

Cloning "https://github.com/openshift/nodejs-ex.git " ...
    Commit: ef1b71a300b58a35f37acfa69f871fc18075669d (Merge pull request #160 from aliok/patch-1)
    Author: Ben Parees <bparees@users.noreply.github.com>
    Date:   Fri Jan 12 10:16:26 2018 -0500
tar: /tmp: Cannot open: Permission denied
tar: Error is not recoverable: exiting now
error: build error: read unix @->/var/run/docker.sock: read: connection reset by peer

有关GCP环境的信息:

- Centos 7
- 3 Masters w/ etcd & 2 Infras & 2 Nodes
  + OpenShift Master: v3.7.0+7ed6862
  + Kubernetes Master: v1.7.6+a08f5eeb62
  + Docker
docker version
Client:
 Version:         1.12.6
 API version:     1.24
 Package version: docker-1.12.6-71.git3e8e77d.el7.centos.1.x86_64
 Go version:      go1.8.3
 Git commit:      3e8e77d/1.12.6
 Built:           Tue Jan 30 09:17:00 2018
 OS/Arch:         linux/amd64
Cannot connect to the Docker daemon. Is the docker daemon running on this host?

感谢您的支持

1 个答案:

答案 0 :(得分:0)

/ tmp目录的permisions应具有读/写访问权限。 chmod -R 755 / tmp