Open rgajason opened 4 years ago
There is a pending PR #71 which should fix the issue I hope.
Thank you - that's great news! I can help test when it is available.
Does anybody have tested this fix? I am getting the same error in my environment and have no idea how to solve it... The last build of the docker-swarm-plugin is from version 1.9 (January 2020).
Could not wait to try it by myself... The issue is fixed in the master branch. Because there is build for the current master you have to compile it by yourself and install it manually to Jenkins. I've opened the issue https://github.com/jenkinsci/docker-swarm-plugin/issues/92 to keep my stacktrace tracked.
Can you try with release 1.11 please?
Updates to my environment since original post:
Jenkins Version: 2.263.3
Swarm Plugin Version: 1.11
Java Info (Java installed using CentOS 7 RPM java-1.8.0-openjdk-1.8.0.282.b08-1.el7_9.x86_64
):
$ java -version
openjdk version "1.8.0_282"
OpenJDK Runtime Environment (build 1.8.0_282-b08)
OpenJDK 64-Bit Server VM (build 25.282-b08, mixed mode)
I get a new error message:
[2:16:46 PM] Creating Service with Name : agt-box_pipeline_45-3
[2:16:48 PM] ServiceSpec created with ID : qa5s2ciy943gqdlx8ogqyjfem
[2:16:48 PM] ServiceSpec request JSON : {"TaskTemplate":{"ContainerSpec":{"Image":"my-private-registry.foo.com:5443/repo/jenkins-agent-image:develop","Command":["sh","-cx","curl --connect-timeout 20 --max-time 60 -o agent.jar $DOCKER_SWARM_PLUGIN_JENKINS_AGENT_JAR_URL && java -jar agent.jar -jnlpUrl $DOCKER_SWARM_PLUGIN_JENKINS_AGENT_JNLP_URL -secret $DOCKER_SWARM_PLUGIN_JENKINS_AGENT_SECRET -noReconnect"],"Env":["DOCKER_TLS_VERIFY=1","COMPOSE_TLS_VERSION=TLSv1_2","DOCKER_HOST={{.Node.Hostname}}","DOCKER_SWARM_PLUGIN_JENKINS_AGENT_SECRET=biglongagentsecretwashere","DOCKER_SWARM_PLUGIN_JENKINS_AGENT_JAR_URL=https://my-jenkins-instance-foo.com/jnlpJars/agent.jar","DOCKER_SWARM_PLUGIN_JENKINS_AGENT_JNLP_URL=https://my-jenkins-instance.foo.com/computer/agt-box_pipeline_45-3/jenkins-agent.jnlp","DOCKER_SWARM_PLUGIN_JENKINS_AGENT_NAME=agt-box_pipeline_45-3"],"Dir":"/home/jenkins","User":"jenkins","DNSConfig":{"Nameservers":[],"Search":[],"Options":[]},"Mounts":[{"Target":"my_docker_volume:/home/jenkins","Source":"","Type":"tmpfs","VolumeOptions":null}],"Hosts":[],"Secrets":[],"Configs":[]},"RestartPolicy":{"Condition":"none","MaxAttempts":0},"Resources":{"Limits":{"NanoCPUs":0,"MemoryBytes":0},"Reservations":{"NanoCPUs":0,"MemoryBytes":0}},"Placement":{"Constraints":["node.platform.os==linux"],"Platforms":[{"Architecture":null,"OS":null}]}},"EndpointSpec":{"Ports":[]},"Name":"agt-box_pipeline_45-3","Labels":{"ROLE":"jenkins-agent"},"Networks":[]}
okhttp3.internal.http2.StreamResetException: stream was reset: INTERNAL_ERROR
at okhttp3.internal.http2.Http2Stream.takeResponseHeaders(Http2Stream.java:153)
at okhttp3.internal.http2.Http2Codec.readResponseHeaders(Http2Codec.java:125)
at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.java:88)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:45)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:126)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:200)
at okhttp3.RealCall.execute(RealCall.java:77)
at org.jenkinsci.plugins.docker.swarm.docker.api.request.ApiRequest.execute(ApiRequest.java:163)
at org.jenkinsci.plugins.docker.swarm.DockerSwarmAgentLauncherActor.apiRequestWithErrorHandling(DockerSwarmAgentLauncherActor.java:111)
at org.jenkinsci.plugins.docker.swarm.DockerSwarmAgentLauncherActor.createServiceSuccess(DockerSwarmAgentLauncherActor.java:99)
at org.jenkinsci.plugins.docker.swarm.DockerSwarmAgentLauncherActor.handleServiceResponse(DockerSwarmAgentLauncherActor.java:84)
at org.jenkinsci.plugins.docker.swarm.DockerSwarmAgentLauncherActor.createService(DockerSwarmAgentLauncherActor.java:79)
at org.jenkinsci.plugins.docker.swarm.DockerSwarmAgentLauncherActor.lambda$createReceive$1(DockerSwarmAgentLauncherActor.java:50)
at akka.japi.pf.UnitCaseStatement.apply(CaseStatements.scala:24)
at akka.japi.pf.UnitCaseStatement.apply(CaseStatements.scala:20)
at scala.PartialFunction.applyOrElse(PartialFunction.scala:127)
at scala.PartialFunction.applyOrElse$(PartialFunction.scala:126)
at akka.japi.pf.UnitCaseStatement.applyOrElse(CaseStatements.scala:20)
at scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:175)
at scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:176)
at akka.actor.Actor.aroundReceive(Actor.scala:539)
at akka.actor.Actor.aroundReceive$(Actor.scala:537)
at akka.actor.AbstractActor.aroundReceive(AbstractActor.scala:227)
at akka.actor.ActorCell.receiveMessage(ActorCell.scala:612)
at akka.actor.ActorCell.invoke(ActorCell.scala:581)
at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:268)
at akka.dispatch.Mailbox.run(Mailbox.scala:229)
at akka.dispatch.Mailbox.exec(Mailbox.scala:241)
at akka.dispatch.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
at akka.dispatch.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
at akka.dispatch.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
at akka.dispatch.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
Attempting to use this plugin with recent OpenJDK 8 (1.8.0.252.b09 as packaged by Red Hat/CentOS) or OpenJDK 11 fails with:
Our setup is using the Docker API over https with X509 authentication.