'AWS EB Error: Incorrect application version found on all instances
I am trying to use the EB CLI to deploy an application into an environment but I seem to be getting strange errors. Is there a way to empty out previous application versions so I can upload a fresh application?
The message I see after I execute eb deploy.
Update environment operation is complete, but with errors. For more information, see troubleshooting documentation.
I am currently getting this error:
Incorrect application version found on all instances. Expected version [app version]
The logs file also seems to be getting deleted for some reason.
Solution 1:[1]
Solution 2:[2]
The operation completed but there were errors means that your deployment did not succeed. When an application update is unsuccessful eb will keep using the last good version. So if the last good version is 48 but this deployment is 55 and eb is expecting 54, then that "error" will be present... More of a warning than an error.
Something in your application is causing the application update to fail... Use the GUI to get the full logs which will reveal the error... Fix the error and when your deployment is successful your "Incorrect application version" error will resolve.
Solution 3:[3]
I found out that the issue was due to incompleteness of the permissions granted to the codepipeline/deployment service role.
You should grant UpdateApplicationversion permission to the associated elastic beanstalk resources for the role that you use to deploy your app.
Solution 4:[4]
I faced the same problem and the cause was the command timeout
Default max deployment time -Command timeout- is 600 (10 minutes)
Go to Your Environment ? Configuration ? Deployment preferences ? Command timeout
Increase the Deployment preferences for example 1800
or upgrade the instance type to work faster
Solution 5:[5]
Rebuilding the environment and deploying the new application version should solve the issue.
Solution 6:[6]
Also faced this problem, and also the real problem seems to be a previous one, in my case I have CodeDeploy lacking permission on Cloud Watch, which made the deployment fail.
I can see both problems in the events section of Elastic Beanstalk.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Gerardo BLANCO |
| Solution 2 | hephalump |
| Solution 3 | informeto |
| Solution 4 | Dharman |
| Solution 5 | palden |
| Solution 6 | doper |

