I have setup AWS Elastic Beanstalk Worker Environment (Load Balanced) and random deployment failure issue. Many times, deployment works well. Sometimes it fails, here's what I found:
When I have multiple instances, deployment fails with error in EB events log Unsuccessful command execution on instance id(s) 'i-*******'. Aborting the operation.
I downloaded bundle log for particular instance and checked eb-engine.log
, it shows sqsd starting failed. Other instances has no such issue.
eb-engine.log
2022/xx/xx xx:xx:xx.590911 [INFO] Executing instruction: configureSqsd
2022/xx/xx xx:xx:xx.595059 [INFO] get sqsd conf from cfn metadata and write into sqsd conf file ...
2022/xx/xx xx:xx:xx.596414 [INFO] Executing instruction: startSqsd
2022/xx/xx xx:xx:xx.596442 [INFO] Running command /bin/sh -c systemctl show -p PartOf sqsd.service
2022/xx/xx xx:xx:xx.658752 [INFO] Running command /bin/sh -c systemctl is-active sqsd.service
2022/xx/xx xx:xx:xx.697070 [INFO] Running command /bin/sh -c systemctl start sqsd.service
2022/xx/xx xx:xx:xx.566439 [INFO] Job for sqsd.service failed because the control process exited with error code. See "systemctl status sqsd.service" and "journalctl -xe" for details.
2022/xx/xx xx:xx:xx.566462 [ERROR] An error occurred during execution of command [app-deploy] - [startSqsd]. Stop running the command. Error: startProcess Failure: starting process "sqsd" failed: Command /bin/sh -c systemctl start sqsd.service failed with error exit status 1. Stderr:Job for sqsd.service failed because the control process exited with error code. See "systemctl status sqsd.service" and "journalctl -xe" for details.