I have an AWS ElasticBeanstalk with an autoscaler with minimum 2 instancens with rolling update/deploy. Everytime I change a configuration or do a deploy 1 instance becomes degraded because the app deploy did not work.
In the events section I always get that everything worked successfully.
If I pull the logs I always have the error Ignoring not applicable command.
The only way to solve this is to rebuild the entire environment. But that is not a solution when it will be in use.
Does anyone know what the problem could be here?
Here is a bit more of the log:
2020/11/09 09:07:26.391864 [INFO] Running command /bin/sh -c systemctl show -p ConsistsOf eb-app.target | cut -d= -f2
2020/11/09 09:07:26.396798 [INFO]
2020/11/09 09:07:26.396946 [INFO] Executing instruction: RunAppDeployPostDeployHooks
2020/11/09 09:07:26.396958 [INFO] The dir .platform/hooks/postdeploy/ does not exist in the application. Skipping this step...
2020/11/09 09:07:26.396963 [INFO] Executing cleanup logic
2020/11/09 09:07:26.397053 [INFO] CommandService Response: {"status":"SUCCESS","api_version":"1.0","results":[{"status":"SUCCESS","msg":"Engine execution has succeeded.","returncode":0,"events":[{"msg":"Instance deployment: You didn't include a 'composer.json' file in your source bundle. The deployment didn't install Composer dependencies.","timestamp":1604912843,"severity":"INFO"},{"msg":"Instance deployment completed successfully.","timestamp":1604912846,"severity":"INFO"}]}]}
2020/11/09 09:07:26.397207 [INFO] Platform Engine finished execution on command: app-deploy
2020/11/09 09:07:30.733429 [INFO] Starting...
2020/11/09 09:07:30.733481 [INFO] Starting EBPlatform-PlatformEngine
2020/11/09 09:07:30.733496 [INFO] reading event message file
2020/11/09 09:07:30.733631 [INFO] no eb envtier info file found, skip loading env tier info.
2020/11/09 09:07:30.733698 [INFO] Engine received EB command cfn-hup-exec
2020/11/09 09:07:30.803414 [INFO] Running command /bin/sh -c /opt/aws/bin/cfn-get-metadata -s arn:aws:cloudformation:eu-west-2:071446605374:stack/awseb-e-8xpbfxci3w-stack/9b3236e0-2266-11eb-848a-02d86b75fc8e -r AWSEBAutoScalingGroup --region eu-west-2
2020/11/09 09:07:31.154319 [INFO] Running command /bin/sh -c /opt/aws/bin/cfn-get-metadata -s arn:aws:cloudformation:eu-west-2:071446605374:stack/awseb-e-8xpbfxci3w-stack/9b3236e0-2266-11eb-848a-02d86b75fc8e -r AWSEBBeanstalkMetadata --region eu-west-2
2020/11/09 09:07:31.504159 [INFO] checking whether command app-deploy is applicable to this instance...
2020/11/09 09:07:31.504173 [INFO] this command is not applicable to the instance, thus instance shouldn't execute command
2020/11/09 09:07:31.504177 [INFO] skip command app-deploy for this instance...
2020/11/09 09:07:31.504184 [ERROR] Ignoring not applicable command.
2020/11/09 09:07:31.504188 [INFO] Executing cleanup logic
2020/11/09 09:07:31.504237 [INFO] CommandService Response: {"status":"FAILURE","api_version":"1.0","results":[{"status":"FAILURE","msg":"Ignoring not applicable command.","returncode":0,"events":[]}]}
2020/11/09 09:07:31.504389 [INFO] Platform Engine finished execution on command: app-deploy
I got the same error message when I added a new entry into container_commands and tried to deploy.
I solved this by setting minimum instances in Capacity configuration to 2 (previously 1). After the new instance was spun, deployment run without problems.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With