2
votes

I have Jenkins 2 Master and Jenkins 2 Slave. When I start build it is successful but when I check the build console I can see multiple lines with below message:

Cannot contact slave-host: java.io.IOException: Remote call on Channel to /10.0.2.2 failed

Below is configuration:

Jenkins Master - Docker

java version "1.8.0_92"
Java(TM) SE Runtime Environment (build 1.8.0_92-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.92-b14, mixed mode)

Jenkins Slave - Running Oracle Linux

java version "1.8.0_112"
Java(TM) SE Runtime Environment (build 1.8.0_112-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.112-b15, mixed mode)

Error messages are thrown when shell commands are executed.

Part of Jenkins file

stage("deploy") {
  node("slave-host") {
    step([$class: 'WsCleanup'])
      app_home = "/apps/tomcat"
      tomcat_home = "tomcat-server"
      id = 'package'
      sh "${app_home}/${tomcat_home}/bin/shutdown.sh &"
      unstash id
      sh "unzip *.zip"
      sh "cp *.war ${app_home}/wars"
  }
}

Am I doing something wrong?

1
You'd have to include the whole build log, or at least the lines before and after and including the error message.Christopher Orr

1 Answers

3
votes

A user in this Jenkins ticket reported that they were able to get rid of the error by downgrading the "Pipeline: Nodes and Processes" plugin in Jenkins to 2.8 - available from here. I was able to get rid of the problem as well by doing that. Unfortunately there are a number of other plugins I have installed that are dependent on version 2.10. I'm not keen on backleveling all of those, so guess I'm going to have to live with this as an annoyance until there's an official fix from the plugin maintainer. Hopefully that will be soon.