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

Console output stops populating after several seconds

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Major Major
    • core
    • Jenkins 1.582 from Bitnami, running on AWS in m3.medium instance type
      Server OS: Ubuntu 14.04 64bit
      JDK: Oracle JDK 1.7.0_67
      Browser: Chrome 37 64bit

      Console output is populating log in browser window, but after several seconds stops. User has to refresh the page but it happens again. It looks like populating works only when log grown quickly and stops when job doesn't log for a while.

      It seems that problem is on the server side, browser repeats AJAX requests to progressiveHtml path and all of them have "X-More-Data: true" response header, but the last one hasn't (wrongly, because job logging on server side continues).

      Latest version I have seen this working: 1.466

          [JENKINS-25026] Console output stops populating after several seconds

          Martin Schayna created issue -

          Daniel Beck added a comment -

          You marked this 'regression' but do not mention which version was known to work.

          Please provide the information requested here: https://wiki.jenkins-ci.org/display/JENKINS/How+to+report+an+issue

          Is this really about console-tail plugin, or did you just not read the note that says issues with Jenkins itself should use the 'core' component?

          Daniel Beck added a comment - You marked this 'regression' but do not mention which version was known to work. Please provide the information requested here: https://wiki.jenkins-ci.org/display/JENKINS/How+to+report+an+issue Is this really about console-tail plugin, or did you just not read the note that says issues with Jenkins itself should use the 'core' component?

          Sorry for unclear information, updated components and added previous version where I have seen this working.

          Martin Schayna added a comment - Sorry for unclear information, updated components and added previous version where I have seen this working.
          Martin Schayna made changes -
          Component/s New: core [ 15593 ]
          Component/s Original: console-tail [ 18144 ]
          Description Original: Console output is populating log in browser window, but after several seconds stops. User has to refresh the page but it happens again. It looks like populating works only when log grown quickly and stops when job doesn't log for a while.

          It seems that problem is on the server side, browser repeats AJAX requests to progressiveHtml path and all of them have "X-More-Data: true" response header, but the last one hasn't (wrongly, because job logging on server side continues).
          New: Console output is populating log in browser window, but after several seconds stops. User has to refresh the page but it happens again. It looks like populating works only when log grown quickly and stops when job doesn't log for a while.

          It seems that problem is on the server side, browser repeats AJAX requests to progressiveHtml path and all of them have "X-More-Data: true" response header, but the last one hasn't (wrongly, because job logging on server side continues).

          Latest version I have seen this working: 1.466
          Martin Schayna made changes -
          Environment Original: Jenkins 1.582 from Bitnami, running on AWS in m3.medium instance type New: Jenkins 1.582 from Bitnami, running on AWS in m3.medium instance type
          Server OS: Ubuntu 14.04 64bit
          JDK: Oracle JDK 1.7.0_67
          Browser: Chrome 37 64bit

          Daniel Beck added a comment -

          Does the spinner (or "indeterminate progress indicator") at the bottom of the log disappear as well? Does the browser stop sending ajax update requests?

          IIRC X-More-Data only applies when there's more data, so if logging is quiet, it'll not have more data for a while. The client should still continue polling for changes.

          Daniel Beck added a comment - Does the spinner (or "indeterminate progress indicator") at the bottom of the log disappear as well? Does the browser stop sending ajax update requests? IIRC X-More-Data only applies when there's more data, so if logging is quiet, it'll not have more data for a while. The client should still continue polling for changes.

          The spinner disappears and the browser stops polling for changes.

          There is a javascript function fetchNext(...) in the console page which does polling. The code is pretty straightforward, it doesn't re-instantiate setTimeout when X-More-Data header is missing in the response and it stops polling (I think) forever:

              if (rsp.getResponseHeader("X-More-Data") == "true")
                  setTimeout(function() {
                      fetchNext(e, href);
                  }, 1000);
              else
                  $("spinner").style.display = "none";
          

          Martin Schayna added a comment - The spinner disappears and the browser stops polling for changes. There is a javascript function fetchNext(...) in the console page which does polling. The code is pretty straightforward, it doesn't re-instantiate setTimeout when X-More-Data header is missing in the response and it stops polling (I think) forever: if (rsp.getResponseHeader( "X-More-Data" ) == " true " ) setTimeout(function() { fetchNext(e, href); }, 1000); else $( "spinner" ).style.display = "none" ;

          Daniel Beck added a comment -

          Daniel Beck added a comment - Stapler sets X-More-Data if the file being read hasn't been completed yet though, so I was simply wrong about the behavior of this header: https://github.com/stapler/stapler/blob/master/core/src/main/java/org/kohsuke/stapler/framework/io/LargeText.java#L266 The Jenkins parts also look reasonable: https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/model/Run.java#L1439 https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/model/Run.java#L501 https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/model/Run.java#L234 Does this occur for all jobs? Are you doing weird things in Groovy scripts?

          It happens for all job types, I have pure Java Maven jobs (e.g. "mvn clean compile test") and some Grails jobs ("grails prod war"). No weird things I hope, I'll try to attach screencast.

          Martin Schayna added a comment - It happens for all job types, I have pure Java Maven jobs (e.g. "mvn clean compile test") and some Grails jobs ("grails prod war"). No weird things I hope, I'll try to attach screencast.

          Screencast demonstrating bug, currently running job was Maven test goal.

          Martin Schayna added a comment - Screencast demonstrating bug, currently running job was Maven test goal.
          Martin Schayna made changes -
          Attachment New: console-error-screencast.gif [ 27777 ]

            Unassigned Unassigned
            mschayna Martin Schayna
            Votes:
            4 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: