我一直在使用EBS,沒有任何問題。今天,我已經添加負載均衡器,並上傳了我的包具有以下配置:AWS Beanstalk命令問題
files:
"/etc/nginx/conf.d/proxy.conf":
mode: "000755"
owner: root
group: root
content: |
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
container_commands:
01_reload_nginx:
command: "service nginx reload"
然而,當我試圖啓動包,我得到以下錯誤:
Application deployment failed at 2016-11-23T14:07:40Z with exit status 7 and error: container_command 01_reload_nginx in .ebextensions/environment.config failed.
請告訴我繼續?
這些日誌:
[eb-cfn-init]: Successfully execute hooks in directory /opt/elasticbeanstalk/hooks/appdeploy/pre. [eb-cfn-init]: [2016-11-23T16:09:31.193Z] INFO [2680] - [Application deployment [email protected]/StartupStage0/EbExtensionPostBuild] : Starting activity... [eb-cfn-init]: [2016-11-23T16:09:31.506Z] INFO [2680] - [Application deployment [email protected]/StartupStage0/EbExtensionPostBuild/Infra-EmbeddedPostBuild] : Starting activity... [eb-cfn-init]: [2016-11-23T16:09:31.507Z] INFO [2680] - [Application deployment [email protected]/StartupStage0/EbExtensionPostBuild/Infra-EmbeddedPostBuild/postbuild_0_My_First_Elastic_Beanstalk_Application] : Starting activity... [eb-cfn-init]: [2016-11-23T16:09:31.842Z] INFO [2680] - [Application deployment [email protected]/StartupStage0/EbExtensionPostBuild/Infra-EmbeddedPostBuild/postbuild_0_My_First_Elastic_Beanstalk_Application/Command 01_reload_nginx] : Starting activity... [eb-cfn-init]: [2016-11-23T16:09:31.868Z] INFO [2680] - [Application deployment [email protected]/StartupStage0/EbExtensionPostBuild/Infra-EmbeddedPostBuild/postbuild_0_My_First_Elastic_Beanstalk_Application/Command 01_reload_nginx] : Activity execution failed, because: (ElasticBeanstalk::ExternalInvocationError) [eb-cfn-init]: [eb-cfn-init]: [eb-cfn-init]: [2016-11-23T16:09:31.868Z] INFO [2680] - [Application deployment [email protected]/StartupStage0/EbExtensionPostBuild/Infra-EmbeddedPostBuild/postbuild_0_My_First_Elastic_Beanstalk_Application/Command 01_reload_nginx] : Activity failed. [eb-cfn-init]: [2016-11-23T16:09:31.868Z] INFO [2680] - [Application deployment [email protected]/StartupStage0/EbExtensionPostBuild/Infra-EmbeddedPostBuild/postbuild_0_My_First_Elastic_Beanstalk_Application] : Activity failed. [eb-cfn-init]: [2016-11-23T16:09:31.868Z] INFO [2680] - [Application deployment [email protected]/StartupStage0/EbExtensionPostBuild/Infra-EmbeddedPostBuild] : Activity failed. [eb-cfn-init]: [2016-11-23T16:09:31.884Z] INFO [2680] - [Application deployment [email protected]/StartupStage0/EbExtensionPostBuild] : Activity failed. [eb-cfn-init]: [2016-11-23T16:09:31.884Z] INFO [2680] - [Application deployment [email protected]/StartupStage0] : Activity failed. [eb-cfn-init]: [2016-11-23T16:09:31.884Z] INFO [2680] - [Application deployment [email protected]] : Completed activity. Result: [eb-cfn-init]: Application deployment - Command CMD-SelfStartup failed
這怎麼可能?從字面上看,環境設置或配置文件中沒有任何變化。 – uksz