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

Scheduled polling not run

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Not A Defect
    • Component/s: core
    • Labels:
    • Similar Issues:

      Description

      Mercurial scm polling stops after running once after restart.
      Jenkins version: 1.570 (can only choose 'current' in Jira)

      config.xml scm:

      <scm class="hudson.plugins.mercurial.MercurialSCM" plugin="mercurial@1.50">
          <installation>(Default)</installation>
          <source>http://host/path/project</source>
          <modules/>
          <revisionType>BRANCH</revisionType>
          <revision>stable</revision>
          <clean>true</clean>
          <browser class="hudson.plugins.mercurial.browser.HgWeb">
              <url>http://host/path/project/</url>
          </browser>
          <credentialsId/>
          <disableChangeLog>false</disableChangeLog>
      </scm>
      

      config.xml triggers:

      <triggers>
          <hudson.triggers.SCMTrigger>
              <spec>H 3 * * 1-6</spec>
              <ignorePostCommitHooks>false</ignorePostCommitHooks>
          </hudson.triggers.SCMTrigger>
      </triggers>
      

      scm-polling.log (today is 14-aug-2014, so it did not run for a couple of days already):

      Started on 9-aug-2014 3:27:01
      Polling SCM changes on master
      [workspace] $ hg pull --rev stable
      pulling from http://host/path/project
      no changes found
      [workspace] $ hg log --rev stable --template {node}
      [workspace] $ hg log --rev stable --template {rev}
      Done. Took 1,3 seconden
      No changes
      

        Attachments

          Issue Links

            Activity

            Hide
            danielbeck Daniel Beck added a comment -

            While you should follow the advice by Jesse and install Support Core, the following will make it easier to access older log messages:


            Try setting the System property hudson.util.RingBufferLogHandler.defaultSize to a large value. Change the Jenkins java call (if using bundled Jetty container) to add it like so:

            java -Dhudson.util.RingBufferLogHandler.defaultSize=10000 -jar jenkins.war

            Then the UI will show more messages.

            Requires a full restart of Jenkins, and not via /safeRestart. Shut it down, then start again.


            The log entries that are relevant are those logged between 2:59 and 3:05 or so. The rest is expected to not matter. "did not trigger" is expected every minute of every day, except at 3.


            There's this weird behavior in Jenkins that skips any SCM polling while Jenkins is in "quiet down" mode (the red banner "Jenkins is preparing to shut down"). Make sure you're not in this mode (one of the backup plugins does this IIRC) at the scheduled time.

            Show
            danielbeck Daniel Beck added a comment - While you should follow the advice by Jesse and install Support Core, the following will make it easier to access older log messages: Try setting the System property hudson.util.RingBufferLogHandler.defaultSize to a large value. Change the Jenkins java call (if using bundled Jetty container) to add it like so: java -Dhudson.util.RingBufferLogHandler.defaultSize=10000 -jar jenkins.war Then the UI will show more messages. Requires a full restart of Jenkins, and not via /safeRestart . Shut it down, then start again. The log entries that are relevant are those logged between 2:59 and 3:05 or so. The rest is expected to not matter. "did not trigger" is expected every minute of every day, except at 3. There's this weird behavior in Jenkins that skips any SCM polling while Jenkins is in "quiet down" mode (the red banner "Jenkins is preparing to shut down"). Make sure you're not in this mode (one of the backup plugins does this IIRC) at the scheduled time.
            Hide
            r_oosterholt Rick Oosterholt added a comment -

            There's this weird behavior in Jenkins that skips any SCM polling while Jenkins is in "quiet down" mode (the red banner "Jenkins is preparing to shut down"). Make sure you're not in this mode (one of the backup plugins does this IIRC) at the scheduled time.

            That's it! I'm using Exclusive Execution Plugin which puts Jenkins in "shutdown mode".

            Thanks for your help!
            Has anyone an idea to ensure a specific project is executed "exclusively" in Jenkins?

            Show
            r_oosterholt Rick Oosterholt added a comment - There's this weird behavior in Jenkins that skips any SCM polling while Jenkins is in "quiet down" mode (the red banner "Jenkins is preparing to shut down"). Make sure you're not in this mode (one of the backup plugins does this IIRC) at the scheduled time. That's it! I'm using Exclusive Execution Plugin which puts Jenkins in "shutdown mode". Thanks for your help! Has anyone an idea to ensure a specific project is executed "exclusively" in Jenkins?
            Hide
            danielbeck Daniel Beck added a comment -

            Not a defect, as brain dead as the current polling behavior is. (My own Jenkins builds remove that part as it's too annoying.)

            Please direct further questions to the jenkinsci-users list, or #jenkins on Freenode.

            Show
            danielbeck Daniel Beck added a comment - Not a defect, as brain dead as the current polling behavior is. (My own Jenkins builds remove that part as it's too annoying.) Please direct further questions to the jenkinsci-users list, or #jenkins on Freenode.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            core/src/main/java/hudson/triggers/SCMTrigger.java
            http://jenkins-ci.org/commit/jenkins/608517e187cb5bd1566b1c3728a4df0f7ac4dd5c
            Log:
            JENKINS-24244 If we are skipping polling due to quietingDown, at least record this fact in the system log.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: core/src/main/java/hudson/triggers/SCMTrigger.java http://jenkins-ci.org/commit/jenkins/608517e187cb5bd1566b1c3728a4df0f7ac4dd5c Log: JENKINS-24244 If we are skipping polling due to quietingDown, at least record this fact in the system log.
            Hide
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #3642
            JENKINS-24244 If we are skipping polling due to quietingDown, at least record this fact in the system log. (Revision 608517e187cb5bd1566b1c3728a4df0f7ac4dd5c)

            Result = SUCCESS
            Jesse Glick : 608517e187cb5bd1566b1c3728a4df0f7ac4dd5c
            Files :

            • core/src/main/java/hudson/triggers/SCMTrigger.java
            Show
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #3642 JENKINS-24244 If we are skipping polling due to quietingDown, at least record this fact in the system log. (Revision 608517e187cb5bd1566b1c3728a4df0f7ac4dd5c) Result = SUCCESS Jesse Glick : 608517e187cb5bd1566b1c3728a4df0f7ac4dd5c Files : core/src/main/java/hudson/triggers/SCMTrigger.java

              People

              • Assignee:
                Unassigned
                Reporter:
                r_oosterholt Rick Oosterholt
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: