ingenieux / awseb-deployment-plugin

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

Error during deployment: "the trustAnchors parameter must be non-empty" #90

Closed chunkdaddy closed 5 years ago

chunkdaddy commented 5 years ago

I just started getting this message from Jenkins when running the plugin, just started happening today. This particular job has worked for over a year, and no changes were made to the jenkins environment that i am aware of, and no changes were made to the beanstalk environment. Any help is greatly appreciated!

16:17:15 FATAL: Deployment Failure 16:17:15 java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty 16:17:15 at java.security.cert.PKIXParameters.setTrustAnchors(Unknown Source) 16:17:15 at java.security.cert.PKIXParameters.(Unknown Source) 16:17:15 at java.security.cert.PKIXBuilderParameters.(Unknown Source) 16:17:15 Caused: java.lang.RuntimeException: Unexpected error 16:17:15 at sun.security.validator.PKIXValidator.(Unknown Source) 16:17:15 at sun.security.validator.Validator.getInstance(Unknown Source) 16:17:15 at sun.security.ssl.X509TrustManagerImpl.getValidator(Unknown Source) 16:17:15 at sun.security.ssl.X509TrustManagerImpl.checkTrustedInit(Unknown Source) 16:17:15 at sun.security.ssl.X509TrustManagerImpl.checkTrusted(Unknown Source) 16:17:15 at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source) 16:17:15 at sun.security.ssl.ClientHandshaker.serverCertificate(Unknown Source) 16:17:15 at sun.security.ssl.ClientHandshaker.processMessage(Unknown Source) 16:17:15 at sun.security.ssl.Handshaker.processLoop(Unknown Source) 16:17:15 at sun.security.ssl.Handshaker.process_record(Unknown Source) 16:17:15 at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source) 16:17:15 at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source) 16:17:15 Caused: javax.net.ssl.SSLException 16:17:15 at sun.security.ssl.Alerts.getSSLException(Unknown Source) 16:17:15 at sun.security.ssl.SSLSocketImpl.fatal(Unknown Source) 16:17:15 at sun.security.ssl.SSLSocketImpl.fatal(Unknown Source) 16:17:15 at sun.security.ssl.SSLSocketImpl.handleException(Unknown Source) 16:17:15 at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source) 16:17:15 at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source) 16:17:15 at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:396) 16:17:15 at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:355) 16:17:15 at com.amazonaws.http.conn.ssl.SdkTLSSocketFactory.connectSocket(SdkTLSSocketFactory.java:142) 16:17:15 at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142) 16:17:15 at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:373) 16:17:15 at sun.reflect.GeneratedMethodAccessor162.invoke(Unknown Source) 16:17:15 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 16:17:15 at java.lang.reflect.Method.invoke(Unknown Source) 16:17:15 at com.amazonaws.http.conn.ClientConnectionManagerFactory$Handler.invoke(ClientConnectionManagerFactory.java:76) 16:17:15 at com.amazonaws.http.conn.$Proxy15.connect(Unknown Source) 16:17:15 at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:381) 16:17:15 at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:237) 16:17:15 at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185) 16:17:15 at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185) 16:17:15 at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83) 16:17:15 at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56) 16:17:15 at com.amazonaws.http.apache.client.impl.SdkHttpClient.execute(SdkHttpClient.java:72) 16:17:15 at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeOneRequest(AmazonHttpClient.java:1256) 16:17:15 at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper(AmazonHttpClient.java:1072) 16:17:15 Also: hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from ip-10-200-10-229.us-east-2.compute.internal/10.200.10.229:60003 16:17:15 at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1741) 16:17:15 at hudson.remoting.UserResponse.retrieve(UserRequest.java:389) 16:17:15 at hudson.remoting.Channel$2.adapt(Channel.java:990) 16:17:15 at hudson.remoting.Channel$2.adapt(Channel.java:986) 16:17:15 at hudson.remoting.FutureAdapter.get(FutureAdapter.java:55) 16:17:15 at br.com.ingenieux.jenkins.plugins.awsebdeployment.DeployerRunner.perform(DeployerRunner.java:71) 16:17:15 at br.com.ingenieux.jenkins.plugins.awsebdeployment.AWSEBDeploymentBuilder.perform(AWSEBDeploymentBuilder.java:193) 16:17:15 at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:81) 16:17:15 at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) 16:17:15 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744) 16:17:15 at hudson.model.Build$BuildExecution.build(Build.java:206) 16:17:15 at hudson.model.Build$BuildExecution.doRun(Build.java:163) 16:17:15 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504) 16:17:15 at hudson.model.Run.execute(Run.java:1815) 16:17:15 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) 16:17:15 at hudson.model.ResourceController.execute(ResourceController.java:97) 16:17:15 at hudson.model.Executor.run(Executor.java:429) 16:17:15 Caused: com.amazonaws.SdkClientException: Unable to execute HTTP request: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty 16:17:15 at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleRetryableException(AmazonHttpClient.java:1134) 16:17:15 at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper(AmazonHttpClient.java:1080) 16:17:15 at com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute(AmazonHttpClient.java:745) 16:17:15 at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer(AmazonHttpClient.java:719) 16:17:15 at com.amazonaws.http.AmazonHttpClient$RequestExecutor.execute(AmazonHttpClient.java:701) 16:17:15 at com.amazonaws.http.AmazonHttpClient$RequestExecutor.access$500(AmazonHttpClient.java:669) 16:17:15 at com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl.execute(AmazonHttpClient.java:651) 16:17:15 at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:515) 16:17:15 at com.amazonaws.services.elasticbeanstalk.AWSElasticBeanstalkClient.doInvoke(AWSElasticBeanstalkClient.java:3185) 16:17:15 at com.amazonaws.services.elasticbeanstalk.AWSElasticBeanstalkClient.invoke(AWSElasticBeanstalkClient.java:3154) 16:17:15 at com.amazonaws.services.elasticbeanstalk.AWSElasticBeanstalkClient.invoke(AWSElasticBeanstalkClient.java:3143) 16:17:15 at com.amazonaws.services.elasticbeanstalk.AWSElasticBeanstalkClient.executeCreateStorageLocation(AWSElasticBeanstalkClient.java:963) 16:17:15 at com.amazonaws.services.elasticbeanstalk.AWSElasticBeanstalkClient.createStorageLocation(AWSElasticBeanstalkClient.java:934) 16:17:15 at com.amazonaws.services.elasticbeanstalk.AWSElasticBeanstalkClient.createStorageLocation(AWSElasticBeanstalkClient.java:975) 16:17:15 at br.com.ingenieux.jenkins.plugins.awsebdeployment.cmd.BuildAndUploadArchive.perform(BuildAndUploadArchive.java:46) 16:17:15 at br.com.ingenieux.jenkins.plugins.awsebdeployment.cmd.DeployerChain.perform(DeployerChain.java:54) 16:17:15 at br.com.ingenieux.jenkins.plugins.awsebdeployment.SlaveDeployerCallable.call(SlaveDeployerCallable.java:42) 16:17:15 at br.com.ingenieux.jenkins.plugins.awsebdeployment.SlaveDeployerCallable.call(SlaveDeployerCallable.java:27) 16:17:15 at hudson.remoting.UserRequest.perform(UserRequest.java:153) 16:17:15 at hudson.remoting.UserRequest.perform(UserRequest.java:50) 16:17:15 at hudson.remoting.Request$2.run(Request.java:336) 16:17:15 at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) 16:17:15 at java.util.concurrent.FutureTask.run(Unknown Source) 16:17:15 at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) 16:17:15 at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) 16:17:15 at hudson.remoting.Engine$1$1.run(Engine.java:94) 16:17:15 at java.lang.Thread.run(Unknown Source) 16:17:15 Caused: java.util.concurrent.ExecutionException 16:17:15 at hudson.remoting.Channel$2.adapt(Channel.java:992) 16:17:15 at hudson.remoting.Channel$2.adapt(Channel.java:986) 16:17:15 at hudson.remoting.FutureAdapter.get(FutureAdapter.java:55) 16:17:15 at br.com.ingenieux.jenkins.plugins.awsebdeployment.DeployerRunner.perform(DeployerRunner.java:71) 16:17:15 at br.com.ingenieux.jenkins.plugins.awsebdeployment.AWSEBDeploymentBuilder.perform(AWSEBDeploymentBuilder.java:193) 16:17:15 Caused: java.io.IOException: Deployment Failure 16:17:15 at br.com.ingenieux.jenkins.plugins.awsebdeployment.AWSEBDeploymentBuilder.perform(AWSEBDeploymentBuilder.java:197) 16:17:15 at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:81) 16:17:15 at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) 16:17:15 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744) 16:17:15 at hudson.model.Build$BuildExecution.build(Build.java:206) 16:17:15 at hudson.model.Build$BuildExecution.doRun(Build.java:163) 16:17:15 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504) 16:17:15 at hudson.model.Run.execute(Run.java:1815) 16:17:15 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) 16:17:15 at hudson.model.ResourceController.execute(ResourceController.java:97) 16:17:15 at hudson.model.Executor.run(Executor.java:429

chunkdaddy commented 5 years ago

well, like others that have seen this issue, it simply "went away" after 2 days, with no changes to Jenkins, the plugin, or the Beanstalk environment. Transient errors are my least favorite kind of error... my workaround for the last 2 days was to just skip Dev and build directly to our QA beanstalk.

aldrinleal commented 5 years ago

looks like JVM cacerts. This one looks surprisingly similar:

https://confluence.atlassian.com/jirakb/unable-to-access-ssl-services-due-to-java-security-invalidalgorithmparameterexception-218269293.html