ingenieux / awseb-deployment-plugin

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

Null pointer Exception using version 0.3.20 #94

Open cullenp opened 4 years ago

cullenp commented 4 years ago

After updating, we received this error when deployment was attempted. Rolling back solved the issue.

AWSEB Deployment 0.3.20 Jenkins ver. 2.229 java-1.8.0-openjdk.x86_64 1:1.8.0.242.b08-0.50.amzn1 @amzn-updates

08:34:58 FATAL: Deployment Failure 08:34:58 java.lang.NullPointerException 08:34:58 at br.com.ingenieux.jenkins.plugins.awsebdeployment.DeployerRunner.<init>(DeployerRunner.java:46) 08:34:58 at br.com.ingenieux.jenkins.plugins.awsebdeployment.AWSEBDeploymentBuilder.perform(AWSEBDeploymentBuilder.java:243) 08:34:58 Caused: java.io.IOException: Deployment Failure 08:34:58 at br.com.ingenieux.jenkins.plugins.awsebdeployment.AWSEBDeploymentBuilder.perform(AWSEBDeploymentBuilder.java:245) 08:34:58 at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78) 08:34:58 at br.com.ingenieux.jenkins.plugins.awsebdeployment.AWSEBDeploymentBuilder.perform(AWSEBDeploymentBuilder.java:79) 08:34:58 at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) 08:34:58 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741) 08:34:58 at hudson.model.Build$BuildExecution.build(Build.java:206) 08:34:58 at hudson.model.Build$BuildExecution.doRun(Build.java:163) 08:34:58 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504) 08:34:58 at hudson.model.Run.execute(Run.java:1880) 08:34:58 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) 08:34:58 at hudson.model.ResourceController.execute(ResourceController.java:97) 08:34:58 at hudson.model.Executor.run(Executor.java:428)

aldrinleal commented 4 years ago

Interesting. Will check. The problem with rolling back is a CVE.

https://nvd.nist.gov/vuln/detail/CVE-2020-2174

cullenp commented 4 years ago

Understood. Thank you!

aldrinleal commented 4 years ago

Can you perhaps do your config from zero?

cullenp commented 4 years ago

I don't think I follow, what do you mean?

marksmithson commented 4 years ago

I had this - it turned out my jobs had lost their configuration

packplusplus commented 4 years ago

I also ran into this. After upgrade from 3.19 to 3.20, I had a warning for old / unmanaged data in my config files. All my beanstalk jobs were missing their AWS cred and eb deploy configuration. I downgraded back to 3.19 and everything worked again.

I'm not sure how to troubleshoot problems like this.

edit: Jobs with 3.20 work again if you replace the missing configuration values. So "config from zero" works, and the values save correctly.

natechadwick commented 4 years ago

We ran into this but had to roll back the plugin version. Just populating the missing jobs with the lost config data didn't work for all jobs. On one job it would get through 2 deployments no problem but after the second would crash out. I tried deleting the config for subsequent jobs but that didn't clear it.

Versions reported: (current: null, underDeployment: redirect-ui-server-142). Should I move on? false Environment Status is &#039;Ready&#039; and Health is &#039;Green&#039;. Moving on. Deployment marked as &#039;successful&#039;. Starting post-deployment cleanup. Cleaning up temporary file /tmp/awseb-5524554165158907027.zip ERROR: Failed to parse POMs java.io.IOException: Deployment Failure at br.com.ingenieux.jenkins.plugins.awsebdeployment.AWSEBDeploymentBuilder.perform(AWSEBDeploymentBuilder.java:245) at jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:112) at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78) at br.com.ingenieux.jenkins.plugins.awsebdeployment.AWSEBDeploymentBuilder.perform(AWSEBDeploymentBuilder.java:79) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.build(MavenModuleSetBuild.java:946) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:896) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504) at hudson.model.Run.execute(Run.java:1880) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:428) Caused by: java.util.concurrent.ExecutionException: java.lang.NullPointerException at java.util.concurrent.FutureTask.report(FutureTask.java:122) at java.util.concurrent.FutureTask.get(FutureTask.java:192) at hudson.remoting.LocalChannel$2.get(LocalChannel.java:84) at br.com.ingenieux.jenkins.plugins.awsebdeployment.DeployerRunner.perform(DeployerRunner.java:64) at br.com.ingenieux.jenkins.plugins.awsebdeployment.AWSEBDeploymentBuilder.perform(AWSEBDeploymentBuilder.java:243) ... 12 more Caused by: java.lang.NullPointerException at br.com.ingenieux.jenkins.plugins.awsebdeployment.cmd.DeployerCommand$VerifyVersion.release(DeployerCommand.java:478) 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:55) at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Build did not succeed and the project is configured to only push after a successful build, so no pushing will occur.

When I rolled back to the previous version of the plugin (AND re-entered the config again) the app deployed successfully.