AWS EB,Play框架和Docker:应用程序已在运行 [英] AWS EB, Play Framework and Docker: Application Already running

查看:107
本文介绍了AWS EB,Play框架和Docker:应用程序已在运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在AWS Elastic Beanstalk上运行Play 2.2.3 Web应用程序,使用SBT生成Docker映像的能力.通常可以从EB管理界面上载图像,但是有时它会进入一种持续出现以下错误的状态:

I am running a Play 2.2.3 web application on AWS Elastic Beanstalk, using SBTs ability to generate Docker images. Uploading the image from the EB administration interface usually works, but sometimes it gets into a state where I consistently get the following error:

Docker容器在UTC 2014年11月27日星期四10:05:37意外退出: 播放服务器进程ID为1.此应用程序已在运行(或者 删除/opt/docker/RUNNING_PID文件).

Docker container quit unexpectedly on Thu Nov 27 10:05:37 UTC 2014: Play server process ID is 1 This application is already running (Or delete /opt/docker/RUNNING_PID file).

部署失败.除了终止环境并重新设置之外,我无法通过其他任何方法来摆脱困境.如何避免环境进入这种状态?

And deployment fails. I cannot get out of this by doing anything else than terminating the environment and setting it up again. How can I avoid that the environment gets into this state?

推荐答案

听起来像是您遇到了臭名昭著的Pid 1问题. Docker为每个容器使用了一个新的pid名称空间,这意味着第一个进程将获得PID1.PID 1是一个特殊的ID,只有设计使用该ID的进程才能使用.您可以尝试使用 Supervisord 而不是将playframework作为主要过程运行,看看是否能解决您的问题问题?希望主管能够比Play框架更好地处理Amazon的终止命令.

Sounds like you may be running into the infamous Pid 1 issue. Docker uses a new pid namespace for each container, which means first process gets PID 1. PID 1 is a special ID which should be used only by processes designed to use it. Could you try using Supervisord instead of having playframework running as the primary processes and see if that resolves your issue? Hopefully, supervisord handles Amazon's termination commands better than the play framework.

这篇关于AWS EB,Play框架和Docker:应用程序已在运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆