빌드 실행 중에 Jenkins 슬레이브가 종료되는 문제가 있습니다.
- OS: Windows 2012 R2(마스터 및 슬레이브 모두)
- Java: 1.8.0_211(Mater 및 Salve 모두)
- 젠킨스 버전: 2.176.2Slave
- 실행방법 : Java Web start, JNLP(마스터에 연결하여 실행)
문제: 실행 중 'CLI 모드에서 ServiceWrapper 시작' 후 슬레이브가 종료되기 때문에 주로 실패하는 Jenkins 프로젝트가 있습니다. 하위 프로세스를 찾고 conhost.exe
대체 프로세스로 Killing으로 인해 실패했습니다.
이는 내부 URL을 핑하는 Python 스크립트가 있는 프로젝트/파이프라인에서만 발생합니다(https://URL/핑), 설치된 네트워크 에뮬레이터 도구를 호출하고, 네트워크 대기 시간을 조정하고, 파일에 쓰거나 ELK에 푸시합니다. .pac 파일을 사용하여 인터넷 프록시를 설정했습니다.
프로젝트의 모든 단계를 완료하고 마지막에 슬레이브가 종료되어 빌드가 실패로 표시됩니다.
참고: 동일한 프로젝트/파이프라인이 문제 없이 작동하는 또 다른 이전 버전의 Jenkins 2.76도 설치되어 있습니다. 이제 최신 Jenkins로 업그레이드하려고 합니다. 슬레이브가 종료되는 문제가 있습니다. 이제 매번 네트워크 에뮬레이터 도구를 닫고 Jenkins 서비스를 다시 시작하여 다시 온라인 상태로 만들어야 합니다.
Jenkins-slave.wrapper.log에서 관찰된 오류:
2019-07-24 03:51:59,751 INFO - Stopping jenkinsslave-e__jenkins
2019-07-24 03:51:59,751 DEBUG - ProcessKill 6872
2019-07-24 03:51:59,860 INFO - Found child process: 6408 Name: conhost.exe
2019-07-24 03:51:59,892 INFO - Stopping process 6408
2019-07-24 03:51:59,907 INFO - Send SIGINT 6408
2019-07-24 03:51:59,907 WARN - SIGINT to 6408 failed - Killing as fallback
2019-07-24 03:51:59,907 INFO - Stopping process 6872
2019-07-24 03:51:59,907 INFO - Send SIGINT 6872
2019-07-24 03:51:59,907 WARN - SIGINT to 6872 failed - Killing as fallback
2019-07-24 03:51:59,907 INFO - Finished jenkinsslave-e__jenkins
2019-07-24 03:51:59,907 DEBUG - Completed. Exit code is 0
jenkins-slave.error.log에서 관찰된 오류:
Jul 24, 2019 3:57:23 AM hudson.remoting.jnlp.Main$CuiListener statusJul
24, 2019 3:57:23 AM hudson.remoting.jnlp.Main$CuiListener statusINFO: Terminated
Jul 24, 2019 3:57:23 AM hudson.util.ProcessTree getWARNING: Error while determining if vetoers existhudson.remoting.RequestAbortedException: java.nio.channels.ClosedChannelException
at hudson.remoting.Request.abort(Request.java:340) at hudson.remoting.Channel.terminate(Channel.java:1040)
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:816)
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:816)
at org.jenkinsci.remoting.protocol.NetworkLayer.onRecvClosed(NetworkLayer.java:154)
at org.jenkinsci.remoting.protocol.impl.BIONetworkLayer.access$1800(BIONetworkLayer.java:48)
at org.jenkinsci.remoting.protocol.impl.BIONetworkLayer$Reader.run(BIONetworkLayer.java:264)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:93)
at java.lang.Thread.run(Unknown Source) Suppressed: hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection to jenkinsmater/IP address:33131
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1743)
at hudson.remoting.Request.call(Request.java:202) at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:286)
at com.sun.proxy.$Proxy6.fetch3(Unknown Source)
at hudson.remoting.RemoteClassLoader.findClass(RemoteClassLoader.java:209)
at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source) at hudson.remoting.RemoteClassLoader.loadClassFile(RemoteClassLoader.java:383) at hudson.remoting.RemoteClassLoader.findClass(RemoteClassLoader.java:307)
at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source) at hudson.remoting.RemoteClassLoader.loadClassFile(RemoteClassLoader.java:383) at hudson.remoting.RemoteClassLoader.findClass(RemoteClassLoader.java:307)
at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source) at hudson.remoting.RemoteClassLoader.loadClassFile(RemoteClassLoader.java:383) at hudson.remoting.RemoteClassLoader.findClass(RemoteClassLoader.java:307)
at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source)
at hudson.util.ProcessTree.get(ProcessTree.java:415)
at hudson.Launcher$RemoteLauncher$KillTask.call(Launcher.java:1103) at hudson.Launcher$RemoteLauncher$KillTask.call(Launcher.java:1094)
at hudson.remoting.UserRequest.perform(UserRequest.java:212)
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(Unknown Source) ... 4 moreCaused by: java.nio.channels.ClosedChannelException ... 7 more
Jul 24, 2019 3:57:23 AM hudson.util.ProcessTree getWARNING: Failed to load winp. Reverting to the defaultjava.lang.NoClassDefFoundError: hudson/util/ProcessTree$WindowsOSProcessException
at hudson.util.ProcessTree.get(ProcessTree.java:430)
at hudson.Launcher$RemoteLauncher$KillTask.call(Launcher.java:1103) at hudson.Launcher$RemoteLauncher$KillTask.call(Launcher.java:1094)
at hudson.remoting.UserRequest.perform(UserRequest.java:212)
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(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:93)
at java.lang.Thread.run(Unknown Source)Caused by: java.lang.ClassNotFoundException: hudson.util.ProcessTree$WindowsOSProcessException at java.net.URLClassLoader.findClass(Unknown Source)
at hudson.remoting.RemoteClassLoader.findClass(RemoteClassLoader.java:171) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 12 more
Jul 24, 2019 3:57:23 AM hudson.remoting.Request$2 runINFO: Failed to send back a reply to the request hudson.remoting.Request$2@626d990c: hudson.remoting.ChannelClosedException: Channel "hudson.remoting.Channel@4d834d1e:JNLP4-connect connection to jenkinsmaster/IP Address:33131": channel is already closed
Jul 24, 2019 3:57:33 AM hudson.remoting.jnlp.Main$CuiListener statusINFO: Performing onReconnect operation.
누군가 이 문제를 도와주실 수 있나요?