我使用亚马逊网络服务CodePipeline在Elastic Beanstalk上部署一个多容器码头应用程序。该应用程序需要将EFS中的文件系统附加为已挂载的卷。为了连接并访问卷,我似乎需要重新启动docker。这在这个问题中得到了解释:Using AWS EFS with Docker。虽然我可以根据这些说明成功附加文件系统,但我的部署有时会“失败”,并显示以下错误:
Action execution failed Deployment completed, but with errors: ECS task stopped due to: Task failed to start. Failed to start ECS task: arn:aws… is STOPPED.在这些情况下,应用程序成功部署,并且功能完全正常,但我收到一条失败消息,因为docker在检查过程中尚未重新启动。
发生这种情况时,我在Beanstalk日志中看到以下内容:
-------------------------------------
/var/log/ecs/ecs-init.log
-------------------------------------
2020-04-27T15:06:41Z [INFO] pre-start
2020-04-27T15:06:44Z [INFO] start
2020-04-27T15:06:44Z [INFO] No existing agent container to remove.
2020-04-27T15:06:44Z [INFO] Starting Amazon Elastic Container Service Agent
2020-04-27T15:07:20Z [INFO] Agent exited with code 0
2020-04-27T15:07:20Z [INFO] Error connecting to docker, backing off for 1.14777941s, error: Get http://unix.sock/v1.25/version: dial unix /var/run/docker.sock: connect: no such file or directory
2020-04-27T15:07:21Z [INFO] Error connecting to docker, backing off for 2.282153551s, error: Get http://unix.sock/v1.25/version: dial unix /var/run/docker.sock: connect: no such file or directory
2020-04-27T15:07:23Z [INFO] post-stop
2020-04-27T15:07:23Z [INFO] Cleaning up the credentials endpoint setup for Amazon Elastic Container Service Agent
2020-04-27T15:07:23Z [INFO] pre-start
2020-04-27T15:07:23Z [INFO] start
2020-04-27T15:07:23Z [INFO] Container name: /ecs-agent
2020-04-27T15:07:23Z [INFO] Removing existing agent container ID:
2020-04-27T15:07:23Z [INFO] Starting Amazon Elastic Container Service Agent有没有办法防止这些错误的失败?
https://stackoverflow.com/questions/61463728
复制相似问题