kubernetes-cd-plugin icon indicating copy to clipboard operation
kubernetes-cd-plugin copied to clipboard

ERROR: ERROR: java.lang.RuntimeException: io.kubernetes.client.openapi.ApiException: okhttp3.internal.http2.ConnectionShutdownException

Open logand22 opened this issue 4 years ago • 6 comments

Attempting to use kubernetesDeploy w/ pipeline syntax. Receive this error:

ERROR: ERROR: java.lang.RuntimeException: io.kubernetes.client.openapi.ApiException: okhttp3.internal.http2.ConnectionShutdownException hudson.remoting.ProxyException: java.lang.RuntimeException: io.kubernetes.client.openapi.ApiException: okhttp3.internal.http2.ConnectionShutdownException at com.microsoft.jenkins.kubernetes.wrapper.ResourceManager.handleApiExceptionExceptNotFound(ResourceManager.java:180) at com.microsoft.jenkins.kubernetes.wrapper.V1ResourceManager$DeploymentUpdater.getCurrentResource(V1ResourceManager.java:213) at com.microsoft.jenkins.kubernetes.wrapper.V1ResourceManager$DeploymentUpdater.getCurrentResource(V1ResourceManager.java:201) at com.microsoft.jenkins.kubernetes.wrapper.ResourceManager$ResourceUpdater.createOrApply(ResourceManager.java:93) at com.microsoft.jenkins.kubernetes.wrapper.KubernetesClientWrapper.handleResource(KubernetesClientWrapper.java:289) at com.microsoft.jenkins.kubernetes.wrapper.KubernetesClientWrapper.apply(KubernetesClientWrapper.java:256) at com.microsoft.jenkins.kubernetes.command.DeploymentCommand$DeploymentTask.doCall(DeploymentCommand.java:172) at com.microsoft.jenkins.kubernetes.command.DeploymentCommand$DeploymentTask.call(DeploymentCommand.java:124) at com.microsoft.jenkins.kubernetes.command.DeploymentCommand$DeploymentTask.call(DeploymentCommand.java:106) at hudson.remoting.UserRequest.perform(UserRequest.java:211) at hudson.remoting.UserRequest.perform(UserRequest.java:54) at hudson.remoting.Request$2.run(Request.java:369) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) 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) Suppressed: hudson.remoting.Channel$CallSiteStackTrace: Remote call to houcicdsec03.eogresources.com at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1788) at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356) at hudson.remoting.Channel.call(Channel.java:998) at hudson.FilePath.act(FilePath.java:1159) at com.microsoft.jenkins.kubernetes.command.DeploymentCommand.execute(DeploymentCommand.java:68) at com.microsoft.jenkins.kubernetes.command.DeploymentCommand.execute(DeploymentCommand.java:45) at com.microsoft.jenkins.azurecommons.command.CommandService.runCommand(CommandService.java:88) at com.microsoft.jenkins.azurecommons.command.CommandService.execute(CommandService.java:96) at com.microsoft.jenkins.azurecommons.command.CommandService.executeCommands(CommandService.java:75) at com.microsoft.jenkins.azurecommons.command.BaseCommandContext.executeCommands(BaseCommandContext.java:77) at com.microsoft.jenkins.kubernetes.KubernetesDeploy.perform(KubernetesDeploy.java:42) at com.microsoft.jenkins.azurecommons.command.SimpleBuildStepExecution.run(SimpleBuildStepExecution.java:54) at com.microsoft.jenkins.azurecommons.command.SimpleBuildStepExecution.run(SimpleBuildStepExecution.java:35) at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ... 4 more Caused by: hudson.remoting.ProxyException: io.kubernetes.client.openapi.ApiException: okhttp3.internal.http2.ConnectionShutdownException at io.kubernetes.client.openapi.ApiClient.execute(ApiClient.java:898) at io.kubernetes.client.openapi.apis.AppsV1Api.readNamespacedDeploymentWithHttpInfo(AppsV1Api.java:7299) at io.kubernetes.client.openapi.apis.AppsV1Api.readNamespacedDeployment(AppsV1Api.java:7275) at com.microsoft.jenkins.kubernetes.wrapper.V1ResourceManager$DeploymentUpdater.getCurrentResource(V1ResourceManager.java:210) ... 15 more Caused by: hudson.remoting.ProxyException: okhttp3.internal.http2.ConnectionShutdownException at okhttp3.internal.http2.Http2Connection.newStream(Http2Connection.java:242) at okhttp3.internal.http2.Http2Connection.newStream(Http2Connection.java:225) at okhttp3.internal.http2.Http2ExchangeCodec.writeRequestHeaders(Http2ExchangeCodec.java:116) at okhttp3.internal.connection.Exchange.writeRequestHeaders(Exchange.java:72) at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.java:43) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117) at io.kubernetes.client.openapi.ApiClient$2.intercept(ApiClient.java:1232) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142) at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:43) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117) at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:94) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117) at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142) at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:88) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117) at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:221) at okhttp3.RealCall.execute(RealCall.java:81) at io.kubernetes.client.openapi.ApiClient.execute(ApiClient.java:894) ... 18 more

I am using a serviceaccount kube config with limited permissions.

KubeCD Plugin Version: 2.3.0 Kubernetes Version 1.18.4

logand22 avatar Aug 26 '20 20:08 logand22

I am facing the same issue

avadhut007 avatar Aug 27 '20 13:08 avadhut007

Downgrading version of Kubernetes Continuous Deploy Plugin to 2.2.0 worked for me.

avadhut007 avatar Aug 28 '20 07:08 avadhut007

Thanks I will try that out

logand22 avatar Aug 28 '20 12:08 logand22

I am facing the same issue

Danteeswararao avatar Sep 04 '20 12:09 Danteeswararao

Downgrading version of Kubernetes Continuous Deploy Plugin to 2.2.0 worked for me.

useful,thanks hahaha~

dunhanson avatar Oct 26 '20 22:10 dunhanson

I can confirm this issue with kubernetes-cd 2.3.1. Same error with Kubernetes 1.19.2 on AWS bootstrapped with kops, however working fine with Kubernetes 1.19.2 on Minikube. In case of Kubernetes 1.19.2 on AWS - Kubernetes api-server logs are empty. Looks like issue somewhere between Jenkins agent and ELB, probably during TLS termination.

Can also confirm that downgrade plugin to 2.2.0 works in my case

Brightside56 avatar Nov 14 '20 00:11 Brightside56