Reputation: 1801
I have a PHP application that is deployed on Elastic Beanstalk
for latest changes, code directory is zipped (Development on windows environment) and then uploaded by "Upload & Deploy" option. It process every thing and finally fails due to some health check issue.
ERROR During an aborted deployment, some instances may have deployed the new application version. To ensure all instances are running the same version, re-deploy the appropriate application version.
ERROR Failed to deploy application.
ERROR Instance id(s) 'unique-instance-id' did not pass health check after command execution. Aborting the operation.
INFO Command execution completed on 1 of 2 instances in environment.
INFO Deploying new version to instance(s).
This problem does not occur if code directory is zipped on MacBook
and then uploaded.
I can assume there could be some issue with EOL End of line
or may be other zip format for windows
and linux
I googled a lot but the solution are to upload the to environment and then run dos2unix
command. but I have no access to the instance. only Amazon Front end panel to upload a file.
Question:
I just need to know how can I view the detailed log of Elastic Beanstalk
process log for "upload and deployment" of application process (Not the trace as I have pasted above).
I have also tried the "Logs" tab(link) left side menu. It helps to download zip file for logs contains httpd
(access_log, error_log[very old error messages]) and some other log files.
However these log files does not help to understand why deployment failed.
Upvotes: 1
Views: 4618
Reputation: 369
For me the issue of the deployment process getting stuck on "Command execution completed on 1 of 2 instances in environment." was because the health checks were failing. They were failing because my application was expecting a 200 status code on the health check but was receiving a 302 (as seen in the access logs). This is configured in elastic beanstalk under load balancer > processes > edit > health check > HTTP code. I was debugging this for several days so I hope this helps someone!
Upvotes: 1
Reputation: 516
Upvotes: 0