Skip to content

Commit

Permalink
[FIXED JENKINS-11130] SEVERE: I/O error in channel Chunked connection…
Browse files Browse the repository at this point in the history
… when using jenkins-cli.jar

When using HTTP full duplex connections the upstream channel can be idle for
long periods of time and the webserver will time the connection out. Jenkins
sees this and terminates the downstream channel causing the unexpected closure
of the read channel in the CLI client.

Timeout of 15 seconds is based on the 20 second default timeout as seen in
Ubuntu Oneiric Tomcat 6 installations.
  • Loading branch information
oldelvet authored and kohsuke committed Nov 7, 2011
1 parent 87995e9 commit 92496f9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions changelog.html
Expand Up @@ -55,6 +55,9 @@
<!-- Record your changes in the trunk here. -->
<div id="trunk" style="display:none"><!--=TRUNK-BEGIN=-->
<ul class=image>
<li class=bug>
java.io.IOException: Unexpected termination of the channel - SEVERE: I/O error in channel Chunked connection when using jenkins-cli.jar (works on older Hudson version)
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-11130">issue 11130</a>)
<li class=>
</ul>
</div><!--=TRUNK-END=-->
Expand Down
2 changes: 1 addition & 1 deletion cli/src/main/java/hudson/cli/CLI.java
Expand Up @@ -122,7 +122,7 @@ private Channel connectViaHttp(String url) throws IOException {
FullDuplexHttpStream con = new FullDuplexHttpStream(jenkins);
Channel ch = new Channel("Chunked connection to "+jenkins,
pool,con.getInputStream(),con.getOutputStream());
new PingThread(ch,30*1000) {
new PingThread(ch,15*1000) {
protected void onDead() {
// noop. the point of ping is to keep the connection alive
// as most HTTP servers have a rather short read time out
Expand Down

0 comments on commit 92496f9

Please sign in to comment.