ingenieux / awseb-deployment-plugin

Jenkins Plugin for AWS Elastic Beanstalk
Apache License 2.0
29 stars 53 forks source link

"Zero Deployment" throws error "Cannot terminate environment" #67

Open nikydobrev opened 7 years ago

nikydobrev commented 7 years ago

Guys,

Please help. I've struggling for quite a lot now. I've been trying to achieve Blue/Green Deployment using Jenkins and AWS Elastic Beanstalk plugin for Jenkins. My scenario is: I've up and running application "Quantum" and "Quantumeb-env" environment in AWS Elastic Beanstalk. I configured my AWS Elastic Beanstalk Jenkins build step as follows:

So the problem is that in AWS new environment is being created, but Jenkins fails with following error: "FATAL: Deployment Failure com.amazonaws.services.elasticbeanstalk.model.AWSElasticBeanstalkException: Cannot terminate environment named Quantumeb-env-4. It is currently pending creation. (Service: AWSElasticBeanstalk; Status Code: 400; Error Code: InvalidParameterValue; Request ID: c7dd28fc-8978-11e7-a896-8396a1ae7982) at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleErrorResponse(AmazonHttpClient.java:1588) at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeOneRequest(AmazonHttpClient.java:1258) at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper(AmazonHttpClient.java:1030) at com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute(AmazonHttpClient.java:742) at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer(AmazonHttpClient.java:716) at com.amazonaws.http.AmazonHttpClient$RequestExecutor.execute(AmazonHttpClient.java:699) at com.amazonaws.http.AmazonHttpClient$RequestExecutor.access$500(AmazonHttpClient.java:667) at com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl.execute(AmazonHttpClient.java:649) at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:513) at com.amazonaws.services.elasticbeanstalk.AWSElasticBeanstalkClient.doInvoke(AWSElasticBeanstalkClient.java:2716) at com.amazonaws.services.elasticbeanstalk.AWSElasticBeanstalkClient.invoke(AWSElasticBeanstalkClient.java:2692) at com.amazonaws.services.elasticbeanstalk.AWSElasticBeanstalkClient.executeTerminateEnvironment(AWSElasticBeanstalkClient.java:2304) at com.amazonaws.services.elasticbeanstalk.AWSElasticBeanstalkClient.terminateEnvironment(AWSElasticBeanstalkClient.java:2280) at br.com.ingenieux.jenkins.plugins.awsebdeployment.cmd.ZeroDowntime.terminateEnvironment(ZeroDowntime.java:142) at br.com.ingenieux.jenkins.plugins.awsebdeployment.cmd.ZeroDowntime.release(ZeroDowntime.java:199) at br.com.ingenieux.jenkins.plugins.awsebdeployment.cmd.DeployerChain.perform(DeployerChain.java:70) at br.com.ingenieux.jenkins.plugins.awsebdeployment.SlaveDeployerCallable.call(SlaveDeployerCallable.java:42) at br.com.ingenieux.jenkins.plugins.awsebdeployment.SlaveDeployerCallable.call(SlaveDeployerCallable.java:27) at hudson.remoting.LocalChannel$1.call(LocalChannel.java:52) at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused: java.util.concurrent.ExecutionException at java.util.concurrent.FutureTask.report(Unknown Source) at java.util.concurrent.FutureTask.get(Unknown Source) at hudson.remoting.LocalChannel$2.get(LocalChannel.java:77) at br.com.ingenieux.jenkins.plugins.awsebdeployment.DeployerRunner.perform(DeployerRunner.java:71) at br.com.ingenieux.jenkins.plugins.awsebdeployment.AWSEBDeploymentBuilder.perform(AWSEBDeploymentBuilder.java:193) Caused: java.io.IOException: Deployment Failure at br.com.ingenieux.jenkins.plugins.awsebdeployment.AWSEBDeploymentBuilder.perform(AWSEBDeploymentBuilder.java:197) at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:81) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:735) at hudson.model.Build$BuildExecution.build(Build.java:206) at hudson.model.Build$BuildExecution.doRun(Build.java:163) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:490) at hudson.model.Run.execute(Run.java:1735) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:405) Finished: FAILURE"

aldrinleal commented 7 years ago

Does https://aws.amazon.com/support/ tells you something, given the request id?

nikydobrev commented 7 years ago

I didn't check the requested id issue in amazon, because actually my cloned environment is being created successfully, but Jenkins plugin throws the above error? Am I doing my build step configuration wrong?

aldrinleal commented 7 years ago

Seems not. Could you paste your configuration and build log in here?

(I'll close if I see any screenshots. All text content only. Metadata has to be respected)

nikydobrev commented 7 years ago

I am attaching full.log and configuration file of my job. Config&Log.zip

aldrinleal commented 5 years ago

Same as #70