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?