Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-64924

httpKeepAliveTimeout option not taken into account

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Critical
    • Resolution: Unresolved
    • Component/s: cli, winstone-jetty
    • Labels:
    • Environment:
    • Similar Issues:

      Description

      Hello,

      With my previous version of Jenkins (2.176.4), I successfully used the

      --httpKeepAliveTimeout=15000

      option to solve TimeoutException when dealing with long running jobs called remotely via the jenkins-cli (see https://issues.jenkins.io/browse/JENKINS-59267).

      A couple of days ago, Jenkins has been upgraded to 2.263.3 (both war and jenkins-cli.jar files) and same issues are back. 

      According to the logs below, timeout value is not taken into account anymore (no idea where this 1000ms value comes from).

      This is how the call is performed :

      java -jar jenkins-cli.jar -s http://blabla.host.com:8080 -http -auth @/usr/home/blablauser/.jenkins-cli build -r 900 -s -v /path/to/my/pipeline

      Here's how the Jenkins process is defined (started as a service) :

      /etc/alternatives/java -Dcom.sun.akuma.Daemon=daemonized -Djava.awt.headless=true -DJENKINS_HOME=/var/lib/jenkins -jar /usr/lib/jenkins/jenkins.war --logfile=/var/log/jenkins/jenkins.log --webroot=/var/cache/jenkins/war --daemon --httpPort=8080 --debug=5 --handlerCountMax=100 --handlerCountMaxIdle=20 --httpKeepAliveTimeout=15000
      

       

      Error on client side :

      java.net.SocketException: Unexpected end of file from server
       at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:851)
       at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:678)
       at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:848)
       at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:678)
       at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1587)
       at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)
       at hudson.cli.FullDuplexHttpStream.<init>(FullDuplexHttpStream.java:74)
       at hudson.cli.CLI.plainHttpConnection(CLI.java:374)
       at hudson.cli.CLI._main(CLI.java:312)
       at hudson.cli.CLI.main(CLI.java:96)

      Error on server side :

       

      Diagnosis problem:
       java.io.IOException: java.util.concurrent.TimeoutException: Idle timeout expired: 1512/1000 ms
       at org.eclipse.jetty.server.HttpInput$ErrorState.noContent(HttpInput.java:1091)
       at org.eclipse.jetty.server.HttpInput.read(HttpInput.java:321)
       at org.eclipse.jetty.server.HttpInput.read(HttpInput.java:258)
       at io.jenkins.cli.shaded.org.apache.commons.io.input.ProxyInputStream.read(ProxyInputStream.java:62)
       at hudson.cli.FlightRecorderInputStream$1.run(FlightRecorderInputStream.java:61)
       Caused by: java.util.concurrent.TimeoutException: Idle timeout expired: 1512/1000 ms
       at org.eclipse.jetty.io.IdleTimeout.checkIdleTimeout(IdleTimeout.java:171)
       at org.eclipse.jetty.io.IdleTimeout.idleCheck(IdleTimeout.java:113)
       at org.eclipse.jetty.io.IdleTimeout.activate(IdleTimeout.java:136)
       at org.eclipse.jetty.io.IdleTimeout.setIdleTimeout(IdleTimeout.java:100)
       at org.eclipse.jetty.server.LowResourceMonitor.setLowResources(LowResourceMonitor.java:412)
       at org.eclipse.jetty.server.LowResourceMonitor.monitor(LowResourceMonitor.java:352)
       at org.eclipse.jetty.server.LowResourceMonitor$1.run(LowResourceMonitor.java:84)
       at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
       at java.util.concurrent.FutureTask.run(FutureTask.java:266)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
      

       

      FYI : there's no proxy since the Automic software (i.e. the client) is installed on the same host than Jenkins.

        Attachments

          Activity

          Hide
          orion666 Phil added a comment -

          Olivier Lamy 

          Dear Olivier,

          Sorry to bother you.  I had a look at HttpConnectorFactory.java and Option.java classes (in jenkinsci/winstone repository) and the httpKeepAliveTimeout switch seems to be still taken into account.  Can you please confirm ?

          Cheers.

          Show
          orion666 Phil added a comment - Olivier Lamy   Dear Olivier, Sorry to bother you.  I had a look at HttpConnectorFactory.java and Option.java classes (in jenkinsci/winstone repository) and the httpKeepAliveTimeout switch seems to be still taken into account.  Can you please confirm ? Cheers.

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            orion666 Phil
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: