Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/three.js/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache Amazon EC2中的Docker部署错误-Docker容器意外退出_Apache_Amazon Web Services_Amazon Ec2_Docker_Dockerfile - Fatal编程技术网

Apache Amazon EC2中的Docker部署错误-Docker容器意外退出

Apache Amazon EC2中的Docker部署错误-Docker容器意外退出,apache,amazon-web-services,amazon-ec2,docker,dockerfile,Apache,Amazon Web Services,Amazon Ec2,Docker,Dockerfile,我正在尝试在Amazon EC2中部署Dockerfile和Dockerrun.aws.json。我能够成功地创建Docker容器,但是在那之后,实例崩溃了。我不知道为什么Docker容器意外退出,也不知道如何修复它 日志: 日志中的其他信息: Docker container quit unexpectedly after launch: Docker container quit unexpectedly on Tue Apr 21 15:16:54 UTC 2015:. Check sna

我正在尝试在Amazon EC2中部署Dockerfile和Dockerrun.aws.json。我能够成功地创建Docker容器,但是在那之后,实例崩溃了。我不知道为什么Docker容器意外退出,也不知道如何修复它

日志:

日志中的其他信息:

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...
错误是什么的答案是:

在评论之后,问题似乎与apache和ulimit错误有关。因为即使通常该错误/警告不会影响apache服务器的运行,它也会在创建容器时返回到Amazon,Docker容器似乎因此退出。(我修复了与ServerName相关的错误)

以及
如何:

根据Michel关于容器和前台流程的评论,我在Dockerfile中添加了这一行:

CMD /etc/init.d/apache2 start -D FOREGROUND
Apache问题:

通过向.conf中添加以下内容,可以轻松修复服务器名:

ServerName localhost
以及ulimit的问题:

ulimit问题的后续行动:


您可以使用
eb log
并检查/var/log/directory-hooks-executor.log以了解有关错误的更多信息吗?下载日志后,我找不到directory-hooks-executor.log。我找到了以下日志文件:cfn-hup.log、cfn-init.log、cnf-init-cmd.log、cloud-init.log、cloud-init-output.log、docker-events.log、eb-activity.log、eb-cfn-init.log、eb-cfn-init-call.log、eb-commadprocessor.log、eb-publish-logs.log、eb-tools.log、eb version-deployment.log和unexpected-quit-quit.log。此外,我还更新了问题中更多的日志行,以防有所帮助。从您的日志来看,您的docker容器似乎正在退出,当您的apache构建出现问题时,您可以手动启动此容器吗?当您以交互方式启动它并尝试启动apache时会发生什么情况?我只是按照dockerfile中的步骤手动创建了容器,它没有崩溃。关于apache,它工作正常,我可以从外部连接到实例。但是,由于其他一些问题(我已经确定),它无法显示web应用程序,但是apache给出了错误500(预期的情况)。这就是为什么我不理解为什么自动版本退出实例。容器必须在前台有一个正在运行的进程,而没有看到dockerfile,我假设它是apache,如果apache无法启动,容器将退出。
CMD /etc/init.d/apache2 start -D FOREGROUND
ServerName localhost