Closed savishy closed 8 years ago
I encountered the same issue when building a CLI job using a non-Jenkins-base image.
Caused by: java.io.IOException: Unexpected termination of the channel
at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:73)
Caused by: java.io.EOFException
at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2353)
at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2822)
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:804)
at java.io.ObjectInputStream.<init>(ObjectInputStream.java:301)
at hudson.remoting.ObjectInputStreamEx.<init>(ObjectInputStreamEx.java:48)
Apparently this might be something related to port-forwarding https://github.com/jenkinsci/docker/issues/164
Holy f**k.
The solution is to access the container using its IP and not localhost
.
So the conclusion is, we could have used the official jenkins image, or we could have built our own. I guess it depends on your comfort factor.
The key is to use the correct IP address in Jenkins CLI.
Since I've built my own image, going with it.
Some of the issues encountered with Jenkins CLI could be because we used Jenkins CLI as the base image).
eg see commit 2359a191 - I am encountering https://issues.jenkins-ci.org/browse/JENKINS-25858
java.io.IOException: Unexpected termination of the channel
. Observations:So possibly it could be the way Jenkins is set up in the base image?