1

We use jenkins CI for run Appium (iOS and Android) tests on Mac-Mini (macOS Catalina v.10.15)

Time to time (several times per day) jenkins agent disabled because an error in Console Output:

[Allure] [XXXXXXX Job run [https://XXXXX/jobrun/XXXXX] stopped successfully...
15:19:58 ERROR: Failed to parse POMs
15:19:58 java.io.IOException: Backing channel 'JNLP4-connect connection from ip-XXXXXXXXXX' is disconnected.
15:19:58    at hudson.remoting.RemoteInvocationHandler.channelOrFail(RemoteInvocationHandler.java:216)
15:19:58    at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:285)
15:19:58    at com.sun.proxy.$Proxy93.isAlive(Unknown Source)
15:19:58    at hudson.Launcher$RemoteLauncher$ProcImpl.isAlive(Launcher.java:1147)
15:19:58    at hudson.maven.ProcessCache$MavenProcess.call(ProcessCache.java:166)
15:19:58    at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:879)
15:19:58    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
15:19:58    at hudson.model.Run.execute(Run.java:1856)
15:19:58    at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
15:19:58    at hudson.model.ResourceController.execute(ResourceController.java:97)
15:19:58    at hudson.model.Executor.run(Executor.java:428)
15:19:58 Caused by: java.nio.channels.ClosedChannelException
15:19:58    at org.jenkinsci.remoting.protocol.impl.ChannelApplicationLayer.onReadClosed(ChannelApplicationLayer.java:209)
15:19:58    at org.jenkinsci.remoting.protocol.ApplicationLayer.onRecvClosed(ApplicationLayer.java:221)
15:19:58    at org.jenkinsci.remoting.protocol.ProtocolStack$Ptr.onRecvClosed(ProtocolStack.java:816)
15:19:58    at org.jenkinsci.remoting.protocol.FilterLayer.onRecvClosed(FilterLayer.java:287)
15:19:58    at org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.onRecvClosed(SSLEngineFilterLayer.java:181)
15:19:58    at org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.switchToNoSecure(SSLEngineFilterLayer.java:283)
15:19:58    at org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.processWrite(SSLEngineFilterLayer.java:503)
15:19:58    at org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.processQueuedWrites(SSLEngineFilterLayer.java:248)
15:19:58    at org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.doSend(SSLEngineFilterLayer.java:200)
15:19:58    at org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.doCloseSend(SSLEngineFilterLayer.java:213)
15:19:58    at org.jenkinsci.remoting.protocol.ProtocolStack$Ptr.doCloseSend(ProtocolStack.java:784)
15:19:58    at org.jenkinsci.remoting.protocol.ApplicationLayer.doCloseWrite(ApplicationLayer.java:172)
15:19:58    at org.jenkinsci.remoting.protocol.impl.ChannelApplicationLayer$ByteBufferCommandTransport.closeWrite(ChannelApplicationLayer.java:314)
15:19:58    at hudson.remoting.Channel.close(Channel.java:1493)
15:19:58    at hudson.remoting.Channel.close(Channel.java:1446)
15:19:58    at hudson.slaves.SlaveComputer.closeChannel(SlaveComputer.java:868)
15:19:58    at hudson.slaves.SlaveComputer.access$100(SlaveComputer.java:109)
15:19:58    at hudson.slaves.SlaveComputer$2.run(SlaveComputer.java:759)
15:19:58    at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
15:19:58    at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
15:19:58    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
15:19:58    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
15:19:58    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
15:19:58    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
15:19:58    at java.lang.Thread.run(Thread.java:748)
15:19:58 ERROR: Step ‘Allure Report’ failed: no workspace for iOS All Tests - 2  #649
15:19:58 Finished: FAILURE

Error occurs after 30%-70% tests run. I mean jenkins agent works fine during 20-30 minutes and then disabling.

Java version installed on Mac-mini and specified in jenkins agent are the same.
There are a lot of free memory space in hard-drive of machine and no such problems detected with Teamcity agent. Network connection is stable (I hope). Error appears on 2 different servers (Mac-mini 2014 and Mac -mini 2017).

Restarting jenkins agent helps for several hours but error occurs again. Can anybody help to fix this?

dmytro Minz
  • 407
  • 1
  • 8
  • 19
  • This could be a frequent master & slave network disconnection, you can put the cron or login agent in mac put the Jenkin command always wherever the Jenkins process get killed, this will ensure always keep your jenkins process up & running – Mani Sep 27 '20 at 17:58
  • Thx for the comment. But devops already configured automatically start jenkins agent after disabling and this doesn't help, because job already stopped and we need to run it again. – dmytro Minz Oct 05 '20 at 09:22
  • @dmytroMinz did you manage to workaround this problem somehow? – kikeenrique Feb 23 '21 at 09:18
  • @kikeenrique Unfortunately not. We returned back to Teamcity agents on this building machines and everything still works fine. Probably, problem is in configured jenkins agent on Mac OS. For our devops team it was first experience, and they couldn't handle it, but I would like to test it in future. Maybe some server arguments for running building agent can solve the issue. – dmytro Minz Feb 23 '21 at 13:41
  • In my case installing same java versions on master and slave have worked. I got inspired here https://stackoverflow.com/a/45538297/721929 Also, needed an M1 specific build: https://stackoverflow.com/questions/64788005/java-jdk-for-apple-m1-chip/64881417#64881417 . I guess that experimental M1 openjdk (based on 16.0) from brew was problematic. – kikeenrique Feb 23 '21 at 17:50
  • We had the same java versions - specified in jenkins and installed on building machine. Actually, sometimes jenkins run job successfully, but most of time - jobs stops because of error specified in topic. I think if my problem is connected with java-jdk versions - jenkins even couldn't run such job. – dmytro Minz Feb 26 '21 at 09:05

0 Answers0