在构建 docker image level=error msg="无法关闭 tar writer: io: read/write on closed pipe"

Ani*_*tel 11 linux celery celerybeat docker amazon-elastic-beanstalk

time="2017-10-27T07:39:20Z" level=error msg="Can't add file /var/app/current/app/content_classifier/forest.pickle to tar: io: read/write on closed pipe" 
time="2017-10-27T07:39:20Z" level=error msg="Can't close tar writer: io: read/write on closed pipe"
Failed to build Docker image aws_beanstalk/staging-app:  tar writer: io: read/write on closed pipe" 
Error response from daemon: Untar error on re-exec cmd: fork/exec /proc/self/exe: cannot allocate memory. Check snapshot logs for details. (Executor::NonZeroExitStatus)
Run Code Online (Sandbox Code Playgroud)

我在 django_app/content_classifer 对象中有一个 Pickle 对象。有一个类可以预测结果,并且在 celery 任务文件初始化时它正在初始化。

docker build 在给出标题中的错误消息后一直失败。

rez*_*n21 20

如果您使用的是 Mac,请确保 docker hub 正在运行

  • 看到这里的同时又觉得很傻又释然 (9认同)
  • 不敢相信我竟然爱上了这个! (6认同)

小智 11

几分钟前我遇到了同样的问题,当我发现你的问题时 :) 我打开了一些文件 = 它们被另一个应用程序(GIT)使用

请确保没有使用任何文件。

希望它会有所帮助。


Ani*_*tel 5

所面临的问题是因为生成 pickle 对象的进程分配了与访问 pickle 对象的进程不同的用户。

我在设置文件中定义了 pickle 对象的位置。

picklefile = "usr/local/webapp/forest.pickle"
Run Code Online (Sandbox Code Playgroud)

我只是在 Dockerfile 中添加了以下步骤。

RUN chown -R /user/local/webapp/ 
Run Code Online (Sandbox Code Playgroud)


ben*_*hsu 5

我在 Ubuntu 中遇到了这个问题并sudo service docker restart修复了它