savishy / devops-experiments

Examples of using the DevOps toolchain in different configurations
Apache License 2.0
1 stars 6 forks source link

Consider *not* using jenkins as base-image for jenkins container #12

Closed savishy closed 8 years ago

savishy commented 8 years ago

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?

savishy commented 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)
savishy commented 8 years ago

Apparently this might be something related to port-forwarding https://github.com/jenkinsci/docker/issues/164

savishy commented 8 years ago

Holy f**k.

The solution is to access the container using its IP and not localhost.

savishy commented 8 years ago

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.