I've been using EBS without any problems. Today, I've added load balancer, and uploaded my package with the following configuration:
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"
However, when I am trying to launch the package, I get the following error:
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.
Whats going on?
These are the logs:
[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 ttttttt@4/StartupStage0/EbExtensionPostBuild] : Starting activity... [eb-cfn-init]: [2016-11-23T16:09:31.506Z] INFO [2680] - [Application deployment ttttttt@4/StartupStage0/EbExtensionPostBuild/Infra-EmbeddedPostBuild] : Starting activity... [eb-cfn-init]: [2016-11-23T16:09:31.507Z] INFO [2680] - [Application deployment ttttttt@4/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 ttttttt@4/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 ttttttt@4/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 ttttttt@4/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 ttttttt@4/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 ttttttt@4/StartupStage0/EbExtensionPostBuild/Infra-EmbeddedPostBuild] : Activity failed. [eb-cfn-init]: [2016-11-23T16:09:31.884Z] INFO [2680] - [Application deployment ttttttt@4/StartupStage0/EbExtensionPostBuild] : Activity failed. [eb-cfn-init]: [2016-11-23T16:09:31.884Z] INFO [2680] - [Application deployment ttttttt@4/StartupStage0] : Activity failed. [eb-cfn-init]: [2016-11-23T16:09:31.884Z] INFO [2680] - [Application deployment ttttttt@4] : Completed activity. Result: [eb-cfn-init]: Application deployment - Command CMD-SelfStartup failed