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

"Queue refused to schedule" WARNING log messages for disabled jobs

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • Jenkins 2.303.2 with OpenJDK 11 on RHEL7
      cloudbees-folder-plugin 6.16
      bitbucket-branch-source-plugin 2.9.11

      We're seeing lots of WARNING log messages such as:
      WARNING c.c.h.p.f.c.PeriodicFolderTrigger#run: Queue refused to schedule org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject@37177326[foo/bar/jobname]

      We're using bitbucket and multibranch pipelines and what seems to be shared by the jobs in the warning log messages is that they are disabled.
      Checking the code this log messages comes from com.cloudbees.hudson.plugins.folder.computed.PeriodicFolderTrigger.run() when scheduling a build returns null. Checking that logic there is a check if the job (or parent) is disabled and the nreturn null, which would support what we're seeing.

      I'm thinking that the logic is either wrong or the log messages is wrong. It is not the queue that is refusing to schedule a build but it's the job that's disabled. I would suggest first checking if the job is disabled and in that case log that (at debug or info). If not disabled, try to schedule a build and if that fails log a warning messages.

          [JENKINS-67103] "Queue refused to schedule" WARNING log messages for disabled jobs

          Janusz Szeligowski added a comment - - edited

          I noticed the same issue for the following configuration

          • Jenkins 2.319.2 with OpenJDK 11 on CentOS 6
          • cloudbees-folder plugin 6.17
          • github-branch-source plugin 2.11.4 

          All the jobs/projects/modules have been disabled but the alerts like below still appeared in a log.

           

          01-Feb-2022 07:58:00.585 WARNING [jenkins.util.Timer [#3]] com.cloudbees.hudson.plugins.folder.computed.PeriodicFolderTrigger.run Queue refused to schedule org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject@412d952a[folder-name]
          

          It seems to be quite likely that this issue could cause another one that we encountered too. The Jenkins instance mentioned above was prepared for the testing purposes. Actually, it was an upgraded clone of a prod Jenkins instance. Our goal was to put a test instance aside a prod one and test selectively how some jobs build after the upgrade.  That was why I disabled all the jobs on the test machine, to not cause any conflict. Unfortunately, as soon as we put the test instance in LAN, some builds unexpectedly started on one of the agent nodes, creating a massive queue. Eventually, we managed to handle that situation. Here is what we observed:

          • The above log alerts stopped appearing on the test machine immediately after we connected it to LAN.
          • We observed the messages like below in a log on the prod instance.

           

          01-Feb-2022 12:45:00.215 INFO [SCM polling for org.jenkinsci.plugins.workflow.job.WorkflowJob@3831721b[folder-name/branch1]] hudson.triggers.SCMTrigger$Runner.run SCM changes detected in folder-name » branch1. Triggering #12 
          01-Feb-2022 12:45:00.216 INFO [SCM polling for org.jenkinsci.plugins.workflow.job.WorkflowJob@58d60879[folder-name/branch2]] hudson.triggers.SCMTrigger$Runner.run SCM changes detected in folder-name » branch2. Triggering #11 
          01-Feb-2022 12:45:00.222 INFO [SCM polling for org.jenkinsci.plugins.workflow.job.WorkflowJob@41620b29[folder-name/branch3]] hudson.triggers.SCMTrigger$Runner.run SCM changes detected in folder-name » branch3. Triggering #8 
          01-Feb-2022 12:45:00.374 INFO [SCM polling for org.jenkinsci.plugins.workflow.job.WorkflowJob@65732353[folder-name/branch4]] hudson.triggers.SCMTrigger$Runner.run SCM changes detected in folder-name » branch4. Triggering #303
          
          • The builds started just for Multi Branch Projects that appeared in the test instance log, and were configured to poll SCM, and were triggered by SCM changes.

          It worth mentioning that as soon as we removed the test instance from LAN, the alerts Queue refused to schedule started showing up in its log again, though all the jobs were remaining disabled.

           

          Janusz Szeligowski added a comment - - edited I noticed the same issue for the following configuration Jenkins 2.319.2 with OpenJDK 11 on CentOS 6 cloudbees-folder plugin 6.17 github-branch-source plugin 2.11.4  All the jobs/projects/modules have been disabled but the alerts like below still appeared in a log.   01-Feb-2022 07:58:00.585 WARNING [jenkins.util.Timer [#3]] com.cloudbees.hudson.plugins.folder.computed.PeriodicFolderTrigger.run Queue refused to schedule org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject@412d952a[folder-name] It seems to be quite likely that this issue could cause another one that we encountered too. The Jenkins instance mentioned above was prepared for the testing purposes. Actually, it was an upgraded clone of a prod Jenkins instance. Our goal was to put a test instance aside a prod one and test selectively how some jobs build after the upgrade.  That was why I disabled all the jobs on the test machine, to not cause any conflict. Unfortunately, as soon as we put the test instance in LAN, some builds unexpectedly started on one of the agent nodes, creating a massive queue. Eventually, we managed to handle that situation. Here is what we observed: The above log alerts stopped appearing on the test machine immediately after we connected it to LAN. We observed the messages like below in a log on the prod instance.   01-Feb-2022 12:45:00.215 INFO [SCM polling for org.jenkinsci.plugins.workflow.job.WorkflowJob@3831721b[folder-name/branch1]] hudson.triggers.SCMTrigger$Runner.run SCM changes detected in folder-name » branch1. Triggering #12 01-Feb-2022 12:45:00.216 INFO [SCM polling for org.jenkinsci.plugins.workflow.job.WorkflowJob@58d60879[folder-name/branch2]] hudson.triggers.SCMTrigger$Runner.run SCM changes detected in folder-name » branch2. Triggering #11 01-Feb-2022 12:45:00.222 INFO [SCM polling for org.jenkinsci.plugins.workflow.job.WorkflowJob@41620b29[folder-name/branch3]] hudson.triggers.SCMTrigger$Runner.run SCM changes detected in folder-name » branch3. Triggering #8 01-Feb-2022 12:45:00.374 INFO [SCM polling for org.jenkinsci.plugins.workflow.job.WorkflowJob@65732353[folder-name/branch4]] hudson.triggers.SCMTrigger$Runner.run SCM changes detected in folder-name » branch4. Triggering #303 The builds started just for Multi Branch Projects that appeared in the test instance log, and were configured to poll SCM, and were triggered by SCM changes. It worth mentioning that as soon as we removed the test instance from LAN, the alerts Queue refused to schedule started showing up in its log again, though all the jobs were remaining disabled.  

          Where is the bug? There are two plugins mentioned. This bug was reported a year and a half ago and no one is assigned. What would be the best way to have someone take a look at this?

          Doug Whitfield added a comment - Where is the bug? There are two plugins mentioned. This bug was reported a year and a half ago and no one is assigned. What would be the best way to have someone take a look at this?

          Nikolas Falco added a comment -

          I am removing bitbucket-branch-source-plugin from the component list since the logging logic you are asking to modify is not in the Bitbucket source plugin

          Nikolas Falco added a comment - I am removing bitbucket-branch-source-plugin from the component list since the logging logic you are asking to modify is not in the Bitbucket source plugin

            Unassigned Unassigned
            ahammar Anders Hammar
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: