Closed KJlmfe closed 6 years ago
This should now be fixed as of the latest updates to the tutorial in #96.
Hi Vic,
I just used the most current branch to build a Jenkins in k8s cluster. I have got the following failure, which seems still an issue as originally reported. Could you please advise? Thanks!
FATAL: java.nio.channels.ClosedChannelException
java.nio.channels.ClosedChannelException
Also: hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from 10.250.17.21/10.250.17.21:56626
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1741)
at hudson.remoting.Request.call(Request.java:202)
at hudson.remoting.Channel.call(Channel.java:954)
at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:283)
at com.sun.proxy.$Proxy101.isAlive(Unknown Source)
at hudson.Launcher$RemoteLauncher$ProcImpl.isAlive(Launcher.java:1137)
at hudson.maven.ProcessCache$MavenProcess.call(ProcessCache.java:166)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:879)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
at hudson.model.Run.execute(Run.java:1798)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Caused: hudson.remoting.RequestAbortedException
at hudson.remoting.Request.abort(Request.java:340)
at hudson.remoting.Channel.terminate(Channel.java:1038)
at org.jenkinsci.remoting.protocol.impl.ChannelApplicationLayer.onReadClosed(ChannelApplicationLayer.java:209)
at org.jenkinsci.remoting.protocol.ApplicationLayer.onRecvClosed(ApplicationLayer.java:222)
at org.jenkinsci.remoting.protocol.ProtocolStack$Ptr.onRecvClosed(ProtocolStack.java:832)
at org.jenkinsci.remoting.protocol.FilterLayer.onRecvClosed(FilterLayer.java:287)
at org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.onRecvClosed(SSLEngineFilterLayer.java:172)
at org.jenkinsci.remoting.protocol.ProtocolStack$Ptr.onRecvClosed(ProtocolStack.java:832)
at org.jenkinsci.remoting.protocol.NetworkLayer.onRecvClosed(NetworkLayer.java:154)
at org.jenkinsci.remoting.protocol.impl.NIONetworkLayer.ready(NIONetworkLayer.java:142)
at org.jenkinsci.remoting.protocol.IOHub$OnReady.run(IOHub.java:795)
at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
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)
Finished: FAILURE
@alan-ma-umg can you post your pipeline config? Did you change any additional configuration?
Also do you have any additional network policies in place?
Hi Vic,
Thanks for following up. I have resolved the issue by setting higher CPU/Memory. The settings locates in manage jenkins->configure system->images->kubernetes pod template->container template->advanced section. HTH for future users.
As @alan-ma-umg initially suggested, I too had with the slave causing failures on a simple hello world job. Settings the CPU Request and Limit to 400m and Memory to 512mb resolved the issue. I will say these values better align with my use case, so others might want to toy with these values.
Increasing the slave resource requests & limits also solved this issue for me. Thanks.
Updated the defaults in: https://github.com/GoogleCloudPlatform/continuous-deployment-on-kubernetes/pull/133
This thread was a lifesaver. We setup our own pipeline using jenkins on kubernetes and our slave kept crashing due to the same reason. We were using the kubernetes jenkins plugin and the default limits for the pods were not set. On setting the limits, the jobs run just fine!
Hi all, I have a similar issue in Jenkins (both Master & Agents on Windows 2102). I don't see the option to increase CPU/ Memory under manage jenkins->configure system. Though i increased memory in jenkins.xml or jenkins-slave.xml it did not help resolve the issue. Can you please guide me with possible solution ?
I follow this tutorial https://cloud.google.com/solutions/configuring-jenkins-kubernetes-engine
But it doesn't work for me.