错误泊坞部署在Amazon EC2上 - 泊坞容器意外退出容器、意外、错误、Amazon

2023-09-11 09:16:28 作者:逆臣

我想部署一个Dockerfile和Dockerrun.aws.json在Amazon EC2上。我能够成功地创建了泊坞容器中,但在那之后,该实例崩溃。我不知道的为什么泊坞窗容器意外退出或如何以解决它。

日志:

 第36步:运行服务的Apache2站和放大器;&安培;服务的Apache2启动
       --->运行在1531cdba4bf1
    停止Web服务器:Apache2的。
    [91米/ usr / sbin目录/ apache2ctl:87:的ulimit:错误设定上限(不允许的操作)
    [0分[91mSetting的ulimit失败。见README.Debian所有以了解更多信息。
    [0分[91mAH00558:apache2的:无法可靠地确定了服务器的完全合格的域名,使用172.17.0.32。全局设置服务器名称指令晚饭preSS此消息
    [0mStarting Web服务器:Apache2的。

   ---> 86403887587f
  除去中间容器1531cdba4bf1
  步骤37:公开80
   --->运行在395114dad85b
   ---> 7350f1436bc2
  除去中间容器395114dad85b
  成功地建立7350f1436bc2
  成功打造aws_beanstalk /舞台应用程序内
    [2015-04-21T15:16:46.558Z]信息[1799]  -  [CMD-启动/ StartupStage0 / AppDeploy preHook / 04run.sh]:启动活动...
    [2015-04-21T15:16:54.493Z]信息[1799]  -  [CMD-启动/ StartupStage0 / AppDeploy preHook / 04run.sh]:活动执行失败,原因是:命令失败,错误code 1 :/opt/elasticbeanstalk/hooks/appdeploy/$p$p/04run.sh
    d84f98c9e97a7287ca461510866d32adec0da73cbe5a7abcb8201490332a0f48
    泊坞窗容器发射后意外退出:泊坞窗容器上周二4月21日15时16分54秒UTC 2015意外退出:。检查快照日志了解详细信息。 (遗嘱执行人:: NonZeroExitStatus)
        在/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/executor-1.0/lib/executor/exec.rb:81:in'SH'
        从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/executor-1.0/lib/executor.rb:15:in'SH'
        从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/executable.rb:63:in `执行!
        从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/hook-directory-executor.rb:29:in `块(2级)的跑!
 

从日志中其他信息:

 泊坞容器发射后意外退出:泊坞窗容器上周二意外退出04月21日十五时16分54秒UTC 2015年:。检查快照日志了解详细信息。 (遗嘱执行人:: NonZeroExitStatus)
    在/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/executor-1.0/lib/executor/exec.rb:81:in'SH'
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/executor-1.0/lib/executor.rb:15:in'SH'
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/executable.rb:63:in `执行!
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/hook-directory-executor.rb:29:in `块(2级)的跑!
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:169:in `叫'
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:169:in 'EXEC'
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:126:in `timeout_exec
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:110:in `块打造
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:109:in `instance_eval的'
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:109:in '创建'
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/hook-directory-executor.rb:28:in `块跑!
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/hook-directory-executor.rb:26:in `每个
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/hook-directory-executor.rb:26:in '跑!
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/command.rb:215:in `块(3级)的exec_stage
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:169:in `叫'
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:169:in 'EXEC'
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:126:in `timeout_exec
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:110:in `块打造
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:109:in `instance_eval的'
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:109:in '创建'
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/command.rb:209:in `块(2级)的exec_stage
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/command.rb:207:in `每个
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/command.rb:207:in `each_with_index
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/command.rb:207:in `块exec_stage
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:169:in `叫'
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:169:in 'EXEC'
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:126:in `timeout_exec
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:110:in `块打造
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:109:in `instance_eval的'
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:109:in '创建'
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/command.rb:204:in `exec_stage
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/command.rb:158:in `执行!
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/command.rb:68:in '运行'
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/command-processor.rb:64:in `块(2级)的执行!
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:169:in `叫'
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:169:in 'EXEC'
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:126:in `timeout_exec
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:110:in `块打造
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:109:in `instance_eval的'
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:109:in '创建'
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/command-processor.rb:62:in `块执行!
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/command-processor.rb:106:in `execute_command
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/command-processor.rb:60:in `执行!
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/bin/command-processor:46:in `<顶(必填)>
    从的/ opt / elasticbeanstalk / lib中/红宝石/斌/命令处理器:23:在'负荷'
    从的/ opt / elasticbeanstalk / lib中/红宝石/斌/命令处理器:23:在`<主>



[2015-04-21T15:16:54.494Z]信息[1799]  -  [CMD-启动/ StartupStage0 / AppDeploy preHook / 04run.sh]:活动失败。
[2015-04-21T15:16:54.494Z]信息[1799]  -  [CMD-启动/ StartupStage0 / AppDeploy preHook]:活动失败。
[2015-04-21T15:16:54.494Z]信息[1799]  -  [CMD-启动/ StartupStage0]:活动失败。
[2015-04-21T15:16:54.500Z]信息[1799]  -  [CMD-启动]:完成的活动。结果:
  命令CMD-启动(0级)失败。
[2015-04-21T15:17:01.435Z] INFO [31657]  -  [CMD-TailLogs]:启动活动...
[2015-04-21T15:17:02.355Z] INFO [31657]  -  [CMD-TailLogs / AddonsBefore]:启动活动...
[2015-04-21T15:17:02.355Z] INFO [31657]  -  [CMD-TailLogs / AddonsBefore]:完成的活动。
[2015-04-21T15:17:02.356Z] INFO [31657]  -  [CMD-TailLogs / TailLogsDockerPS]:启动活动...
[2015-04-21T15:17:02.356Z] INFO [31657]  -  [CMD-TailLogs / TailLogsDockerPS / DockerPS]:启动活动...
[2015-04-21T15:17:02.396Z] INFO [31657]  -  [CMD-TailLogs / TailLogsDockerPS / DockerPS]:完成的活动。
[2015-04-21T15:17:02.396Z] INFO [31657]  -  [CMD-TailLogs / TailLogsDockerPS]:完成的活动。结果:
  命令CMD-TailLogs阶段0完成。
[2015-04-21T15:17:02.396Z] INFO [31657]  -  [CMD-TailLogs / TailLogs]:启动活动...
[2015-04-21T15:17:02.396Z] INFO [31657]  -  [CMD-TailLogs / TailLogs / TailLogs]:启动活动...
[2015-04-21T15:17:02.858Z] INFO [31657]  -  [CMD-TailLogs / TailLogs / TailLogs]:完成的活动。
[2015-04-21T15:17:02.858Z] INFO [31657]  -  [CMD-TailLogs / TailLogs]:完成的活动。结果:
  命令CMD-TailLogs第一阶段完成。
[2015-04-21T15:17:02.859Z] INFO [31657]  -  [CMD-TailLogs / AddonsAfter]:启动活动...
[2015-04-21T15:17:02.859Z] INFO [31657]  -  [CMD-TailLogs / AddonsAfter]:完成的活动。
[2015-04-21T15:17:02.859Z] INFO [31657]  -  [CMD-TailLogs]:完成的活动。结果:
  命令CMD-TailLogs成功。
[2015-05-06T12:25:45.126Z] INFO [20429]  -  [CMD-TailLogs]:启动活动...
[2015-05-06T12:25:45.601Z] INFO [20429]  -  [CMD-TailLogs / AddonsBefore]:启动活动...
[2015-05-06T12:25:45.602Z] INFO [20429]  -  [CMD-TailLogs / AddonsBefore]:完成的活动。
[2015-05-06T12:25:45.602Z] INFO [20429]  -  [CMD-TailLogs / TailLogsDockerPS]:启动活动...
[2015-05-06T12:25:45.602Z] INFO [20429]  -  [CMD-TailLogs / TailLogsDockerPS / DockerPS]:启动活动...
[2015-05-06T12:25:45.640Z] INFO [20429]  -  [CMD-TailLogs / TailLogsDockerPS / DockerPS]:完成的活动。
[2015-05-06T12:25:45.640Z] INFO [20429]  -  [CMD-TailLogs / TailLogsDockerPS]:完成的活动。结果:
  命令CMD-TailLogs阶段0完成。
[2015-05-06T12:25:45.641Z] INFO [20429]  -  [CMD-TailLogs / TailLogs]:启动活动...
[2015-05-06T12:25:45.641Z] INFO [20429]  -  [CMD-TailLogs / TailLogs / TailLogs]:启动活动...



-------------------------------------
/var/log/docker-ps.log
-------------------------------------
泊坞窗PS在周三跑出5月6日12时25分45秒UTC 2015年:
集装箱识别图像命令创建的状态端口名字



-------------------------------------
/var/log/eb-commandprocessor.log
-------------------------------------
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/hook-directory-executor.rb:26:in '跑!
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/command.rb:215:in `块(3级)的exec_stage
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:169:in `叫'
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:169:in 'EXEC'
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:126:in `timeout_exec
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:110:in `块打造
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:109:in `instance_eval的'
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:109:in '创建'
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/command.rb:209:in `块(2级)的exec_stage
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/command.rb:207:in `每个
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/command.rb:207:in `each_with_index
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/command.rb:207:in `块exec_stage
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:169:in `叫'
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:169:in 'EXEC'
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:126:in `timeout_exec
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:110:in `块打造
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:109:in `instance_eval的'
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:109:in '创建'
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/command.rb:204:in `exec_stage
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/command.rb:158:in `执行!
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/command.rb:68:in '运行'
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/command-processor.rb:64:in `块(2级)的执行!
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:169:in `叫'
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:169:in 'EXEC'
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:126:in `timeout_exec
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:110:in `块打造
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:109:in `instance_eval的'
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:109:in '创建'
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/command-processor.rb:62:in `块执行!
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/command-processor.rb:106:in `execute_command
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/command-processor.rb:60:in `执行!
    从/opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/bin/command-processor:46:in `<顶(必填)>
    从的/ opt / elasticbeanstalk / lib中/红宝石/斌/命令处理器:23:在'负荷'
    从的/ opt / elasticbeanstalk / lib中/红宝石/斌/命令处理器:23:在`<主>



[2015-04-21T15:16:54.500Z]错误[1799]:命令CMD-启动(0级)失败!
[2015-04-21T15:16:54.503Z]信息[1799]:命令处理器返回结果:
{"status":"FAILURE","api_version":"1.0","truncated":"false","results":[{"status":"FAILURE","msg":"[CMD-Startup/StartupStage0/AppDeploy$p$pHook/04run.sh]命令失败,错误code 1: /opt/elasticbeanstalk/hooks/appdeploy/$p$p/04run.sh\nd84f98c9e97a7287ca461510866d32adec0da73cbe5a7abcb8201490332a0f48\nDocker容器发射后意外退出:泊坞容​​器于星期二04月21日15时16分54秒UTC 2015年意外退出:。检查快照日志了解详细信息,返回code:1,事件:[{味精:成功扳回一chuseuiti / pynusci:最新的,严重:跟踪,时间戳: 1429627195},{味精:成功地建立aws_beanstalk /舞台应用内,轻重:跟踪,时间戳:1429629406},{味精:泊坞容器意外发射后退出:泊坞容​​器意外退出于星期二04月21日15点十六分54秒UTC 2015年:。检查快照日志了解详细信息,轻重:ERROR,时间戳:1429629414}]}]}
[2015-04-21T15:17:01.431Z] DEBUG [31657]:读取配置文件:/etc/elasticbeanstalk/.aws-eb-stack.properties
   [2015-04-21T15:17:01.431Z] DEBUG [31657]:检查是否命令处理程序中执行。
[2015-04-21T15:17:01.435Z] DEBUG [31657]:检查该命令是否是适用于实例第(i-c3213b14)..
[2015-04-21T15:17:01.435Z] INFO [31657]:命令适用于这种情况(I-c3213b14)..
[2015-04-21T15:17:01.435Z] DEBUG [31657]:检查是否接收的命令阶段是有效..
[2015-04-21T15:17:01.435Z] INFO [31657]:在命令中没有stage_num。有效的舞台..
[2015-04-21T15:17:01.435Z] INFO [31657]:命令处理器要执行的命令。
[2015-04-21T15:17:01.435Z] DEBUG [31657]:保存当前阶段..
[2015-04-21T15:17:01.435Z] DEBUG [31657]:Stage_num不存在。不保存空阶段。返回..
[2015-04-21T15:17:01.435Z] INFO [31657]:执行命令:CMD-TailLogs ...
[2015-04-21T15:17:01.436Z] DEBUG [31657]:读取配置文件:/etc/elasticbeanstalk/.aws-eb-stack.properties
[2015-04-21T15:17:01.436Z] DEBUG [31657]:刷新元..
[2015-04-21T15:17:02.352Z] DEBUG [31657]:装修一新的环境下的元数据。
[2015-04-21T15:17:02.352Z] DEBUG [31657]:关键检索元数据:AWS :: ElasticBeanstalk ::内线|| _ContainerConfigFileContent ||命令..
[2015-04-21T15:17:02.354Z] DEBUG [31657]:检索元数据项:AWS :: ElasticBeanstalk ::内线|| _API || _Commands ..
[2015-04-21T15:17:02.355Z] INFO [31657]:找到启用插件:[]。
[2015-04-21T15:17:02.355Z] DEBUG [31657]:命令CMD-TailLogs的加载定义。
[2015-04-21T15:17:02.355Z] INFO [31657]:执行命令CMD-TailLogs活动...
[2015-04-21T15:17:02.355Z] DEBUG [31657]:设置环境变量..
[2015-04-21T15:17:02.355Z] INFO [31657]:对命令CMD-TailLogs运行AddonsBefore ...
[2015-04-21T15:17:02.355Z] DEBUG [31657]:从0级运行命令CMD-TailLogs的阶段阶段1 ...
[2015-04-21T15:17:02.355Z] INFO [31657]:运行CMD命令,TailLogs阶段0 ...
[2015-04-21T15:17:02.356Z] DEBUG [31657]:加载1行动为0级。
[2015-04-21T15:17:02.356Z] INFO [31657]:运行1 1的动作:DockerPS ...
[2015-04-21T15:17:02.396Z] INFO [31657]:运行CMD命令,TailLogs阶段1 ...
[2015-04-21T15:17:02.396Z] DEBUG [31657]:加载1行动为第一阶段。
[2015-04-21T15:17:02.396Z] INFO [31657]:运行1 1的动作:TailLogs ...
[2015-04-21T15:17:02.858Z] INFO [31657]:运行AddonsAfter的命令CMD-TailLogs ...
[2015-04-21T15:17:02.859Z] INFO [31657]:命令CMD-TailLogs成功了!
[2015-04-21T15:17:02.860Z] INFO [31657]:命令处理器返回结果:
{"status":"SUCCESS","api_version":"1.0","truncated":"false","results":[{"status":"SUCCESS","msg":"","return$c$c":0,"events":[{"msg":"[Instance: I-c3213b14]成功完成尾7日志(S),严重:信息,时间戳:1429629422860}]}]}
[2015-05-06T12:25:45.121Z] DEBUG [20429]:读取配置文件:/etc/elasticbeanstalk/.aws-eb-stack.properties
    [2015-05-06T12:25:45.125Z] INFO [20429]:命令适用于这种情况(I-c3213b14)..
[2015-05-06T12:25:45.125Z] DEBUG [20429]:检查是否接收的命令阶段是有效..
[2015-05-06T12:25:45.125Z] INFO [20429]:在命令中没有stage_num。有效的舞台..
[2015-05-06T12:25:45.125Z] INFO [20429]:命令处理器要执行的命令。
[2015-05-06T12:25:45.125Z] DEBUG [20429]:保存当前阶段..
[2015-05-06T12:25:45.125Z] DEBUG [20429]:Stage_num不存在。不保存空阶段。返回..
[2015-05-06T12:25:45.126Z] INFO [20429]:执行命令:CMD-TailLogs ...
[2015-05-06T12:25:45.126Z] DEBUG [20429]:读取配置文件:/etc/elasticbeanstalk/.aws-eb-stack.properties
[2015-05-06T12:25:45.126Z] DEBUG [20429]:刷新元..
[2015-05-06T12:25:45.598Z] DEBUG [20429]:装修一新的环境下的元数据。
[2015-05-06T12:25:45.599Z] DEBUG [20429]:关键检索元数据:AWS :: ElasticBeanstalk ::内线|| _ContainerConfigFileContent ||命令..
[2015-05-06T12:25:45.600Z] DEBUG [20429]:检索元数据项:AWS :: ElasticBeanstalk ::内线|| _API || _Commands ..
[2015-05-06T12:25:45.601Z] INFO [20429]:找到启用插件:[]。
[2015-05-06T12:25:45.601Z] DEBUG [20429]:命令CMD-TailLogs的加载定义。
[2015-05-06T12:25:45.601Z] INFO [20429]:执行命令CMD-TailLogs活动...
[2015-05-06T12:25:45.601Z] DEBUG [20429]:设置环境变量..
[2015-05-06T12:25:45.601Z] INFO [20429]:对命令CMD-TailLogs运行AddonsBefore ...
[2015-05-06T12:25:45.602Z] DEBUG [20429]:从0级运行命令CMD-TailLogs的阶段阶段1 ...
[2015-05-06T12:25:45.602Z] INFO [20429]:运行CMD命令,TailLogs阶段0 ...
[2015-05-06T12:25:45.602Z] DEBUG [20429]:加载1行动为0级。
[2015-05-06T12:25:45.602Z] INFO [20429]:运行1 1的动作:DockerPS ...
[2015-05-06T12:25:45.641Z] INFO [20429]:运行CMD命令,TailLogs阶段1 ...
[2015-05-06T12:25:45.641Z] DEBUG [20429]:加载1行动为第一阶段。
[2015-05-06T12:25:45.641Z] INFO [20429]:运行1 1的动作:TailLogs ...
 

我Dockerrun.aws.json如下:

  {

    AWSEBDockerrunVersion:1,
    端口:
        {
            ContainerPort:80后
        }
    ]
    卷:{

    }
}
 
ansys运行部了,出现错误,怎么解决

解决方案

答案为的什么是错误的

下面的评论后,这个问题似乎是与Apache和使用ulimit错误。因为即使正常的错误/警告并不影响Apache服务器的运行,它返回到Amazon的错误,而正在建立的容器和泊坞容器,似乎正因为如此退出。(我固定一个有关服务器名称)

和 如何

这是米歇尔的有关容器和工艺在前台的意见,我说这行我Dockerfile:

  CMD /etc/init.d/apache2启动-D FOREGROUND
 

在Apache问题:

该服务器名称很容易通过增加了的.conf:

 服务器名本地主机
 

和问题用ulimit:

一个跟进的ulimit问题:

Dockerfile特权标志泊坞容器(必要的,因为Apache的错误的ulimit)AWS

I am trying to deploy a Dockerfile and a Dockerrun.aws.json in Amazon EC2. I am able to successfully create the Docker container but after that, the instance is crashing. I dont know why the Docker container is quitting unexpectedly or how to fix it.

Log:

    Step 36 : RUN service apache2 stop && service apache2 start
       ---> Running in 1531cdba4bf1
    Stopping web server: apache2.
    [91m/usr/sbin/apache2ctl: 87: ulimit: error setting limit (Operation not  permitted)
    [0m[91mSetting ulimit failed. See README.Debian for more information.
    [0m[91mAH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.32. Set the 'ServerName' directive globally to suppress this message
    [0mStarting web server: apache2.

   ---> 86403887587f
  Removing intermediate container 1531cdba4bf1
  Step 37 : EXPOSE 80
   ---> Running in 395114dad85b
   ---> 7350f1436bc2
  Removing intermediate container 395114dad85b
  Successfully built 7350f1436bc2
  Successfully built aws_beanstalk/staging-app
    [2015-04-21T15:16:46.558Z] INFO  [1799]  - [CMD-Startup/StartupStage0/AppDeployPreHook/04run.sh] : Starting activity...
    [2015-04-21T15:16:54.493Z] INFO  [1799]  - [CMD-Startup/StartupStage0/AppDeployPreHook/04run.sh] : Activity execution failed, because: command failed with error code 1: /opt/elasticbeanstalk/hooks/appdeploy/pre/04run.sh
    d84f98c9e97a7287ca461510866d32adec0da73cbe5a7abcb8201490332a0f48
    Docker container quit unexpectedly after launch: Docker container quit unexpectedly on Tue Apr 21 15:16:54 UTC 2015:. Check snapshot logs for details. (Executor::NonZeroExitStatus)
        at /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/executor-1.0/lib/executor/exec.rb:81:in `sh'
        from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/executor-1.0/lib/executor.rb:15:in `sh'
        from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/executable.rb:63:in `execute!'
        from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/hook-directory-executor.rb:29:in `block (2 levels) in run!'

Other information from the log:

Docker container quit unexpectedly after launch: Docker container quit unexpectedly on Tue Apr 21 15:16:54 UTC 2015:. Check snapshot logs for details. (Executor::NonZeroExitStatus)
    at /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/executor-1.0/lib/executor/exec.rb:81:in `sh'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/executor-1.0/lib/executor.rb:15:in `sh'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/executable.rb:63:in `execute!'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/hook-directory-executor.rb:29:in `block (2 levels) in run!'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:169:in `call'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:169:in `exec'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:126:in `timeout_exec'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:110:in `block in create'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:109:in `instance_eval'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:109:in `create'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/hook-directory-executor.rb:28:in `block in run!'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/hook-directory-executor.rb:26:in `each'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/hook-directory-executor.rb:26:in `run!'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/command.rb:215:in `block (3 levels) in exec_stage'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:169:in `call'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:169:in `exec'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:126:in `timeout_exec'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:110:in `block in create'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:109:in `instance_eval'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:109:in `create'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/command.rb:209:in `block (2 levels) in exec_stage'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/command.rb:207:in `each'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/command.rb:207:in `each_with_index'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/command.rb:207:in `block in exec_stage'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:169:in `call'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:169:in `exec'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:126:in `timeout_exec'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:110:in `block in create'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:109:in `instance_eval'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:109:in `create'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/command.rb:204:in `exec_stage'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/command.rb:158:in `execute!'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/command.rb:68:in `run'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/command-processor.rb:64:in `block (2 levels) in execute!'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:169:in `call'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:169:in `exec'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:126:in `timeout_exec'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:110:in `block in create'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:109:in `instance_eval'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:109:in `create'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/command-processor.rb:62:in `block in execute!'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/command-processor.rb:106:in `execute_command'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/command-processor.rb:60:in `execute!'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/bin/command-processor:46:in `<top (required)>'
    from /opt/elasticbeanstalk/lib/ruby/bin/command-processor:23:in `load'
    from /opt/elasticbeanstalk/lib/ruby/bin/command-processor:23:in `<main>'



[2015-04-21T15:16:54.494Z] INFO  [1799]  - [CMD-Startup/StartupStage0/AppDeployPreHook/04run.sh] : Activity failed.
[2015-04-21T15:16:54.494Z] INFO  [1799]  - [CMD-Startup/StartupStage0/AppDeployPreHook] : Activity failed.
[2015-04-21T15:16:54.494Z] INFO  [1799]  - [CMD-Startup/StartupStage0] : Activity failed.
[2015-04-21T15:16:54.500Z] INFO  [1799]  - [CMD-Startup] : Completed activity. Result:
  Command CMD-Startup(stage 0) failed.
[2015-04-21T15:17:01.435Z] INFO  [31657] - [CMD-TailLogs] : Starting activity...
[2015-04-21T15:17:02.355Z] INFO  [31657] - [CMD-TailLogs/AddonsBefore] : Starting activity...
[2015-04-21T15:17:02.355Z] INFO  [31657] - [CMD-TailLogs/AddonsBefore] : Completed activity.
[2015-04-21T15:17:02.356Z] INFO  [31657] - [CMD-TailLogs/TailLogsDockerPS] : Starting activity...
[2015-04-21T15:17:02.356Z] INFO  [31657] - [CMD-TailLogs/TailLogsDockerPS/DockerPS] : Starting activity...
[2015-04-21T15:17:02.396Z] INFO  [31657] - [CMD-TailLogs/TailLogsDockerPS/DockerPS] : Completed activity.
[2015-04-21T15:17:02.396Z] INFO  [31657] - [CMD-TailLogs/TailLogsDockerPS] : Completed activity. Result:
  Command CMD-TailLogs stage 0 completed.
[2015-04-21T15:17:02.396Z] INFO  [31657] - [CMD-TailLogs/TailLogs] : Starting activity...
[2015-04-21T15:17:02.396Z] INFO  [31657] - [CMD-TailLogs/TailLogs/TailLogs] : Starting activity...
[2015-04-21T15:17:02.858Z] INFO  [31657] - [CMD-TailLogs/TailLogs/TailLogs] : Completed activity.
[2015-04-21T15:17:02.858Z] INFO  [31657] - [CMD-TailLogs/TailLogs] : Completed activity. Result:
  Command CMD-TailLogs stage 1 completed.
[2015-04-21T15:17:02.859Z] INFO  [31657] - [CMD-TailLogs/AddonsAfter] : Starting activity...
[2015-04-21T15:17:02.859Z] INFO  [31657] - [CMD-TailLogs/AddonsAfter] : Completed activity.
[2015-04-21T15:17:02.859Z] INFO  [31657] - [CMD-TailLogs] : Completed activity. Result:
  Command CMD-TailLogs succeeded.
[2015-05-06T12:25:45.126Z] INFO  [20429] - [CMD-TailLogs] : Starting activity...
[2015-05-06T12:25:45.601Z] INFO  [20429] - [CMD-TailLogs/AddonsBefore] : Starting activity...
[2015-05-06T12:25:45.602Z] INFO  [20429] - [CMD-TailLogs/AddonsBefore] : Completed activity.
[2015-05-06T12:25:45.602Z] INFO  [20429] - [CMD-TailLogs/TailLogsDockerPS] : Starting activity...
[2015-05-06T12:25:45.602Z] INFO  [20429] - [CMD-TailLogs/TailLogsDockerPS/DockerPS] : Starting activity...
[2015-05-06T12:25:45.640Z] INFO  [20429] - [CMD-TailLogs/TailLogsDockerPS/DockerPS] : Completed activity.
[2015-05-06T12:25:45.640Z] INFO  [20429] - [CMD-TailLogs/TailLogsDockerPS] : Completed activity. Result:
  Command CMD-TailLogs stage 0 completed.
[2015-05-06T12:25:45.641Z] INFO  [20429] - [CMD-TailLogs/TailLogs] : Starting activity...
[2015-05-06T12:25:45.641Z] INFO  [20429] - [CMD-TailLogs/TailLogs/TailLogs] : Starting activity...



-------------------------------------
/var/log/docker-ps.log
-------------------------------------
'docker ps' ran at Wed May  6 12:25:45 UTC 2015: 
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES



-------------------------------------
/var/log/eb-commandprocessor.log
-------------------------------------
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/hook-directory-executor.rb:26:in `run!'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/command.rb:215:in `block (3 levels) in exec_stage'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:169:in `call'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:169:in `exec'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:126:in `timeout_exec'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:110:in `block in create'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:109:in `instance_eval'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:109:in `create'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/command.rb:209:in `block (2 levels) in exec_stage'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/command.rb:207:in `each'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/command.rb:207:in `each_with_index'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/command.rb:207:in `block in exec_stage'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:169:in `call'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:169:in `exec'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:126:in `timeout_exec'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:110:in `block in create'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:109:in `instance_eval'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:109:in `create'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/command.rb:204:in `exec_stage'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/command.rb:158:in `execute!'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/command.rb:68:in `run'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/command-processor.rb:64:in `block (2 levels) in execute!'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:169:in `call'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:169:in `exec'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:126:in `timeout_exec'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:110:in `block in create'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:109:in `instance_eval'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/activity.rb:109:in `create'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/command-processor.rb:62:in `block in execute!'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/command-processor.rb:106:in `execute_command'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/lib/elasticbeanstalk/command-processor.rb:60:in `execute!'
    from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.1.0/gems/beanstalk-core-1.1/bin/command-processor:46:in `<top (required)>'
    from /opt/elasticbeanstalk/lib/ruby/bin/command-processor:23:in `load'
    from /opt/elasticbeanstalk/lib/ruby/bin/command-processor:23:in `<main>'



[2015-04-21T15:16:54.500Z] ERROR [1799]  : Command CMD-Startup(stage 0) failed!
[2015-04-21T15:16:54.503Z] INFO  [1799]  : Command processor returning results: 
{"status":"FAILURE","api_version":"1.0","truncated":"false","results":[{"status":"FAILURE","msg":"[CMD-Startup/StartupStage0/AppDeployPreHook/04run.sh] command failed with error code 1: /opt/elasticbeanstalk/hooks/appdeploy/pre/04run.sh\nd84f98c9e97a7287ca461510866d32adec0da73cbe5a7abcb8201490332a0f48\nDocker container quit unexpectedly after launch: Docker container quit unexpectedly on Tue Apr 21 15:16:54 UTC 2015:. Check snapshot logs for details.","returncode":1,"events":[{"msg":"Successfully pulled chuseuiti/pynusci:latest","severity":"TRACE","timestamp":1429627195},{"msg":"Successfully built aws_beanstalk/staging-app","severity":"TRACE","timestamp":1429629406},{"msg":"Docker container quit unexpectedly after launch: Docker container quit unexpectedly on Tue Apr 21 15:16:54 UTC 2015:. Check snapshot logs for details.","severity":"ERROR","timestamp":1429629414}]}]}
[2015-04-21T15:17:01.431Z] DEBUG [31657] : Reading config file: /etc/elasticbeanstalk/.aws-eb-stack.properties
   [2015-04-21T15:17:01.431Z] DEBUG [31657] : Checking if the command processor should execute.
[2015-04-21T15:17:01.435Z] DEBUG [31657] : Checking whether the command is applicable to instance (i-c3213b14)..
[2015-04-21T15:17:01.435Z] INFO  [31657] : Command is applicable to this instance (i-c3213b14)..
[2015-04-21T15:17:01.435Z] DEBUG [31657] : Checking if the received command stage is valid..
[2015-04-21T15:17:01.435Z] INFO  [31657] : No stage_num in command. Valid stage..
[2015-04-21T15:17:01.435Z] INFO  [31657] : Command processor should execute command.
[2015-04-21T15:17:01.435Z] DEBUG [31657] : Storing current stage..
[2015-04-21T15:17:01.435Z] DEBUG [31657] : Stage_num does not exist. Not saving null stage. Returning..
[2015-04-21T15:17:01.435Z] INFO  [31657] : Executing command: CMD-TailLogs...
[2015-04-21T15:17:01.436Z] DEBUG [31657] : Reading config file: /etc/elasticbeanstalk/.aws-eb-stack.properties
[2015-04-21T15:17:01.436Z] DEBUG [31657] : Refreshing metadata..
[2015-04-21T15:17:02.352Z] DEBUG [31657] : Refreshed environment metadata.
[2015-04-21T15:17:02.352Z] DEBUG [31657] : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_ContainerConfigFileContent||commands..
[2015-04-21T15:17:02.354Z] DEBUG [31657] : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_API||_Commands..
[2015-04-21T15:17:02.355Z] INFO  [31657] : Found enabled addons: [].
[2015-04-21T15:17:02.355Z] DEBUG [31657] : Loaded definition of Command CMD-TailLogs.
[2015-04-21T15:17:02.355Z] INFO  [31657] : Executing command CMD-TailLogs activities...
[2015-04-21T15:17:02.355Z] DEBUG [31657] : Setting environment variables..
[2015-04-21T15:17:02.355Z] INFO  [31657] : Running AddonsBefore for command CMD-TailLogs...
[2015-04-21T15:17:02.355Z] DEBUG [31657] : Running stages of Command CMD-TailLogs from stage 0 to stage 1...
[2015-04-21T15:17:02.355Z] INFO  [31657] : Running stage 0 of command CMD-TailLogs...
[2015-04-21T15:17:02.356Z] DEBUG [31657] : Loaded 1 actions for stage 0.
[2015-04-21T15:17:02.356Z] INFO  [31657] : Running 1 of 1 actions: DockerPS...
[2015-04-21T15:17:02.396Z] INFO  [31657] : Running stage 1 of command CMD-TailLogs...
[2015-04-21T15:17:02.396Z] DEBUG [31657] : Loaded 1 actions for stage 1.
[2015-04-21T15:17:02.396Z] INFO  [31657] : Running 1 of 1 actions: TailLogs...
[2015-04-21T15:17:02.858Z] INFO  [31657] : Running AddonsAfter for command CMD-TailLogs...
[2015-04-21T15:17:02.859Z] INFO  [31657] : Command CMD-TailLogs succeeded!
[2015-04-21T15:17:02.860Z] INFO  [31657] : Command processor returning results: 
{"status":"SUCCESS","api_version":"1.0","truncated":"false","results":[{"status":"SUCCESS","msg":"","returncode":0,"events":[{"msg":"[Instance: i-c3213b14] Successfully finished tailing 7 log(s)","severity":"INFO","timestamp":1429629422860}]}]}
[2015-05-06T12:25:45.121Z] DEBUG [20429] : Reading config file: /etc/elasticbeanstalk/.aws-eb-stack.properties
    [2015-05-06T12:25:45.125Z] INFO  [20429] : Command is applicable to this instance (i-c3213b14)..
[2015-05-06T12:25:45.125Z] DEBUG [20429] : Checking if the received command stage is valid..
[2015-05-06T12:25:45.125Z] INFO  [20429] : No stage_num in command. Valid stage..
[2015-05-06T12:25:45.125Z] INFO  [20429] : Command processor should execute command.
[2015-05-06T12:25:45.125Z] DEBUG [20429] : Storing current stage..
[2015-05-06T12:25:45.125Z] DEBUG [20429] : Stage_num does not exist. Not saving null stage. Returning..
[2015-05-06T12:25:45.126Z] INFO  [20429] : Executing command: CMD-TailLogs...
[2015-05-06T12:25:45.126Z] DEBUG [20429] : Reading config file: /etc/elasticbeanstalk/.aws-eb-stack.properties
[2015-05-06T12:25:45.126Z] DEBUG [20429] : Refreshing metadata..
[2015-05-06T12:25:45.598Z] DEBUG [20429] : Refreshed environment metadata.
[2015-05-06T12:25:45.599Z] DEBUG [20429] : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_ContainerConfigFileContent||commands..
[2015-05-06T12:25:45.600Z] DEBUG [20429] : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_API||_Commands..
[2015-05-06T12:25:45.601Z] INFO  [20429] : Found enabled addons: [].
[2015-05-06T12:25:45.601Z] DEBUG [20429] : Loaded definition of Command CMD-TailLogs.
[2015-05-06T12:25:45.601Z] INFO  [20429] : Executing command CMD-TailLogs activities...
[2015-05-06T12:25:45.601Z] DEBUG [20429] : Setting environment variables..
[2015-05-06T12:25:45.601Z] INFO  [20429] : Running AddonsBefore for command CMD-TailLogs...
[2015-05-06T12:25:45.602Z] DEBUG [20429] : Running stages of Command CMD-TailLogs from stage 0 to stage 1...
[2015-05-06T12:25:45.602Z] INFO  [20429] : Running stage 0 of command CMD-TailLogs...
[2015-05-06T12:25:45.602Z] DEBUG [20429] : Loaded 1 actions for stage 0.
[2015-05-06T12:25:45.602Z] INFO  [20429] : Running 1 of 1 actions: DockerPS...
[2015-05-06T12:25:45.641Z] INFO  [20429] : Running stage 1 of command CMD-TailLogs...
[2015-05-06T12:25:45.641Z] DEBUG [20429] : Loaded 1 actions for stage 1.
[2015-05-06T12:25:45.641Z] INFO  [20429] : Running 1 of 1 actions: TailLogs...

My Dockerrun.aws.json is the following:

{

    "AWSEBDockerrunVersion": "1",
    "Ports": [
        {
            "ContainerPort":"80"
        }
    ],
    "Volumes":{

    }
}

解决方案

The answer to what is the error:

After following the comments, the problem seems to be related to apache and the ulimit error. Because even if normally that error/warning doesn't affect the running of the apache server, it is returning to Amazon the error while is creating the container and the Docker container seems to quit because of that.(I fixed the one related to the ServerName)

and the how:

From the comments of Michel regarding the container and the process in the foreground, I added this line to my Dockerfile:

CMD /etc/init.d/apache2 start -D FOREGROUND

The Apache issues:

The ServerName is easily fixed by adding to the .conf:

ServerName localhost

and the issue with ulimit:

A follow up of the ulimit issue:

Dockerfile privileged flag for Docker container (Needed because of Apache error ulimit ) AWS