• Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Blocker Blocker
    • core
    • None
    • Master: Hudson ver. 1.363, RHEL Linux 2.6.18-164.el5
      Slaves: RHEL Linux 2.6.9-55.0.2.ELhugemem & Windows XP SP3

      After Hudson update from version 1.361 to 1.363 we occasionally see jobs being triggered twice. This seems to happen in both cases, when upstream job triggers downstream job, and remotely triggering a job via curl in a script.

      All of our jobs are free-style jobs.

          [JENKINS-6819] Jobs are triggered twice occasionally

          Sorin Sbarnea added a comment -

          This is still happening with most recent versions of Jenkins, like Jenkins ver. 2.46.1

          I can easily double tick the build button, especial on a MBP with touchpad, doing a double click is so easy.

          Sorin Sbarnea added a comment - This is still happening with most recent versions of Jenkins, like  Jenkins ver. 2.46.1 I can easily double tick the build button, especial on a MBP with touchpad, doing a double click is so easy.

          I am also facing this issue with Jenkins ver. 2.46.1. I have a upstream job which is triggering a downstream job.

          post build actions>Build other projects>The downstream job is getting triggered twice.

          Also post build actions>Trigger parameterized build on other projects>The downstream job is getting triggered twice.

          sangeeta wakhale added a comment - I am also facing this issue with  Jenkins ver. 2.46.1 . I have a upstream job which is triggering a downstream job. post build actions>Build other projects>The downstream job is getting triggered twice. Also post build actions>Trigger parameterized build on other projects>The downstream job is getting triggered twice.

          This issue is fixed for me by doing below:

          Define the downstream job name in upstream job using either Build other projects OR Trigger parameterized build on other projects.

          Removed the upstream job name in downstream job defined by Build Triggers>Build after other projects are built

           

          sangeeta wakhale added a comment - This issue is fixed for me by doing below: Define the downstream job name in upstream job using either Build other projects OR Trigger parameterized build on other projects. Removed the upstream job name in downstream job defined by Build Triggers>Build after other projects are built  

          I still see this issue. Do we have any workaround for this?  @Sangeeta - I don't understand your workaround.  can you please explain in detail

          sunitha prabhu added a comment - I still see this issue. Do we have any workaround for this?  @Sangeeta - I don't understand your workaround.  can you please explain in detail

          I'm also seeing the same issue. 

          updating issue description for others:

          Downstream job is getting invoked twice when 'Trigger parameterized build on other projects' option is selected in upstream project.

          If anybody found a solution or workaround to mitigate this, please post.

          Bharath Shiluveru added a comment - I'm also seeing the same issue.  updating issue description for others: Downstream job is getting invoked twice when ' Trigger parameterized build on other projects ' option is selected in upstream project. If anybody found a solution or workaround to mitigate this, please post.

          I have tried steps mentioned by  sangeetawakhale , this got resolved.

          Thanks !

          Bharath Shiluveru added a comment - I have tried steps mentioned by   sangeetawakhale , this got resolved. Thanks !

          Sam Talebbeik added a comment -

          Thanks sangeetawakhale for the tip. Your workaround fixed the issue.

          My "upstream job" was triggering a "downstream job" twice all the time using "Trigger parametrized build on other projects" plugin. My Jenkins version is 2.73.2

          I had to go to the "downstream job" -> Build Trigger -> remove "Build after other projects are built" 

          Sam Talebbeik added a comment - Thanks sangeetawakhale for the tip. Your workaround fixed the issue. My "upstream job" was triggering a "downstream job" twice all the time using "Trigger parametrized build on other projects" plugin. My Jenkins version is 2.73.2 I had to go to the "downstream job" -> Build Trigger -> remove "Build after other projects are built" 

          Alex Earl added a comment -

          It looks like this was mainly improper upstream/downstream job relationships that were defined.

          Alex Earl added a comment - It looks like this was mainly improper upstream/downstream job relationships that were defined.

          Jayan MN added a comment -

          I was searching for another issue but this masked it. Adding a link if that helps someone : https://issues.jenkins-ci.org/browse/JENKINS-58296  Projects are triggered twice when using File Parameter and Firefox 67

          Jayan MN added a comment - I was searching for another issue but this masked it. Adding a link if that helps someone :  https://issues.jenkins-ci.org/browse/JENKINS-58296   Projects are triggered twice when using File Parameter and Firefox 67

          Lenny added a comment -

          This is still happening.

          Perhaps unrelated, but this is an exception that was coincidental with the duplicate trigger:

          Sep 21, 2021 5:23:44 PM SEVERE io.jenkins.blueocean.autofavorite.FavoritingScmListener onCheckoutUnexpected error when retrieving changeset
          hudson.plugins.git.GitException: Error: git whatchanged --no-abbrev -M "--format=commit %H%ntree %T%nparent %P%nauthor %aN <%aE> %ai%ncommitter %cN <%cE> %ci%n%n%w(0,4,4)%B" -n 1 1bad1afcb14a41a82963e987511d6536874709c4 in /Users/software/var/jenkins/workspace/owlogix-org-repo_flowlogix_PR-85
          	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$6.execute(CliGitAPIImpl.java:1272)
          	at io.jenkins.blueocean.autofavorite.FavoritingScmListener.getChangeSet(FavoritingScmListener.java:159)
          	at io.jenkins.blueocean.autofavorite.FavoritingScmListener.onCheckout(FavoritingScmListener.java:84)
          	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:155)
          	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:97)
          	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:84)
          	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
          	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
          	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
          	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
          	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
          	at java.base/java.lang.Thread.run(Thread.java:829)
          

          Lenny added a comment - This is still happening. Perhaps unrelated, but this is an exception that was coincidental with the duplicate trigger: Sep 21, 2021 5:23:44 PM SEVERE io.jenkins.blueocean.autofavorite.FavoritingScmListener onCheckoutUnexpected error when retrieving changeset hudson.plugins.git.GitException: Error: git whatchanged --no-abbrev -M "--format=commit %H%ntree %T%nparent %P%nauthor %aN <%aE> %ai%ncommitter %cN <%cE> %ci%n%n%w(0,4,4)%B" -n 1 1bad1afcb14a41a82963e987511d6536874709c4 in /Users/software/ var /jenkins/workspace/owlogix-org-repo_flowlogix_PR-85 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$6.execute(CliGitAPIImpl.java:1272) at io.jenkins.blueocean.autofavorite.FavoritingScmListener.getChangeSet(FavoritingScmListener.java:159) at io.jenkins.blueocean.autofavorite.FavoritingScmListener.onCheckout(FavoritingScmListener.java:84) at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:155) at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:97) at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:84) at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang. Thread .run( Thread .java:829)

            kohsuke Kohsuke Kawaguchi
            tiainpa tiainpa
            Votes:
            22 Vote for this issue
            Watchers:
            28 Start watching this issue

              Created:
              Updated:
              Resolved: