Details
-
Bug
-
Status: Resolved (View Workflow)
-
Blocker
-
Resolution: Fixed
-
Jenkins 1.500
Description
We have a JNLP slave which failed to connect.
On the slave side there was something about a connection reset as error.
On the server side we found this in the log:
Feb 5, 2013 9:36:44 AM hudson.TcpSlaveAgentListener$ConnectionHandler run INFO: Accepted connection #142 from /10.1.31.168:4798 Feb 5, 2013 9:36:44 AM hudson.TcpSlaveAgentListener$ConnectionHandler run WARNING: Connection #142 failed hudson.util.IOException2: Failed to open /opt/jenkins_home/logs/slaves/srv-nl-crd62/slave.log at hudson.util.io.ReopenableFileOutputStream.current(ReopenableFileOutputStream.java:58) at hudson.util.io.ReopenableFileOutputStream.write(ReopenableFileOutputStream.java:65) at hudson.remoting.ClassicCommandTransport.create(ClassicCommandTransport.java:137) at hudson.remoting.Channel.<init>(Channel.java:392) at hudson.remoting.Channel.<init>(Channel.java:388) at hudson.remoting.Channel.<init>(Channel.java:349) at hudson.remoting.Channel.<init>(Channel.java:345) at hudson.slaves.SlaveComputer.setChannel(SlaveComputer.java:320) at jenkins.slaves.JnlpSlaveAgentProtocol$Handler.jnlpConnect(JnlpSlaveAgentProtocol.java:120) at jenkins.slaves.JnlpSlaveAgentProtocol2$Handler2.run(JnlpSlaveAgentProtocol2.java:100) at jenkins.slaves.JnlpSlaveAgentProtocol2.handle(JnlpSlaveAgentProtocol2.java:44) at hudson.TcpSlaveAgentListener$ConnectionHandler.run(TcpSlaveAgentListener.java:150) Caused by: java.io.FileNotFoundException: /opt/jenkins_home/logs/slaves/srv-nl-crd62/slave.log (No such file or directory) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.<init>(FileOutputStream.java:209) at hudson.util.io.ReopenableFileOutputStream.current(ReopenableFileOutputStream.java:56) ... 11 more
It appeared to be that the folder /opt/jenkins_home/logs/slaves/srv-nl-crd62 did not exist.
After creating the folder, the slave could connect.
Attachments
Issue Links
- links to
Code changed in jenkins
User: Jesse Glick
Path:
core/pom.xml
core/src/main/java/hudson/util/io/RewindableFileOutputStream.java
core/src/test/java/hudson/util/io/ReopenableRotatingFileOutputStreamTest.java
core/src/test/java/hudson/util/io/RewindableRotatingFileOutputStreamTest.java
http://jenkins-ci.org/commit/jenkins/9a34d9f8b2d388ca625af3bc24801826a2f0cb64
Log:
[FIXED JENKINS-16634] Do not fail to write a log file just because something deleted the parent directory.
(cherry picked from commit afe17a4bda72dc722e505967efc88ef449c0fd75)