Some part of the release in 2.68 seems to have changed how the environment is setup for slaves. The user my slave connects as has a home directory of: /home/SPALDING/jenkinsbuildserver however I can see in the error message that jarCache is attempting to look in master user's home directory which is /usr/share/tomcat8, which doesn't exist on the slave.
I figured I could at least work around this issue if I set the new "workDir" parameter, but the launch will still fail. Even if I create the /usr/share/tomcat8/.jenkins/cache/jars directory and ensure it is writable by the slave user, it still fails to launch.
The slave is not using the correct location for the default jar cache because it seems to be using the home directory of the master user.
Even when the 'workDir' parameter is specified, Jenkins is still trying to validate the default location.
[07/24/17 10:42:11] [SSH] Opening SSH connection to SLAVEHOST:22.
[07/24/17 10:42:11] [SSH] WARNING: SSH Host Keys are not being verified. Man-in-the-middle attacks may be possible against this connection.
[07/24/17 10:42:11] [SSH] Authentication successful.
[07/24/17 10:42:11] [SSH] java -version returned 1.8.0_131.
[07/24/17 10:42:11] [SSH] Starting sftp client.
[07/24/17 10:42:11] [SSH] Copied 730,299 bytes.
<===[JENKINS REMOTING CAPACITY]===>ERROR: Unexpected error in launching a slave. This is probably a bug in Jenkins.
[07/24/17 10:42:12] [SSH] Connection closed.
Vincent Latombe - Tomcat was started with -Dcatalina.home=/usr/share/tomcat8. And yes, the directory is not writable by the tomcat8 user. This has caused other problems for Jenkins before. For instance, when the SSH client starts, it is also looking in /usr/share/tomcat8/, which is not the user's home directory (for the .ssh directory access). Is it possible we are using catalina.home instead of the actual user's home directory?
Thanks for the fix! I can confirm all is well in the Jenkins 2.79 release.
Jesse McCormick added a comment - 2017-09-18 14:17 Thanks for the fix! I can confirm all is well in the Jenkins 2.79 release.
Daniel Beck added a comment - 2017-09-18 14:28 Fixed in 2.79.