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

Jira Trigger Plugin not triggered due to slow JIRA login

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Won't Fix
    • Component/s: jira-trigger-plugin
    • Labels:
    • Environment:
      Jenkins version:2.73.2
      JIRA version:7.4.0
      JIRA trigger plugin version:0.5.1
    • Similar Issues:

      Description

      Hello,

      May I ask for your help in using the jira-trigger-plugin? 

      I want to trigger jenkins jobs once there's an issue update in JIRA. 

      Currently, the job can be triggered only when there is NOT any restriction in JQL filter, as graph 1.

      If there is any restriction in JQL filter(just configured in JQL filter, other fields' configuration are the same with before, and I have tried many kinds of restriction), the job will NEVER be triggered. as graph 2.

      To troubleshoot:

      Enable Jenkins logging at ALL level for troubleshooting:com.ceilfors.jenkins.plugins.jiratrigger.webhook.JiraWebhook

      From the log, I can get the info as graph 3 and 4.

      Configuration:

      JIRA webhook configuration: graph 5.

      Jenkins configuration graph 6.

       

      Why the job can NOT be triggered when there is restriction in Jenkins filed "JQL filter", I think Jenkins received info from JIRA is correct, right?

      And another more stranger thing is If I set "RESOLVED" on Jenkins filed:"New Value" , even there is no restriction on Jenkins filed:"JQL filter", the job can NOT be triggered neither.

        Attachments

        1. 1 job can be triggered cfg.png
          1 job can be triggered cfg.png
          33 kB
        2. 2 job can NOT be triggered cfg.png
          2 job can NOT be triggered cfg.png
          35 kB
        3. 3.png
          3.png
          55 kB
        4. 4.png
          4.png
          34 kB
        5. 5 JIRA webhook .png
          5 JIRA webhook .png
          29 kB
        6. 6 Jenkins cfg.png
          6 Jenkins cfg.png
          14 kB
        7. jira-trigger-log
          79 kB
        8. jira-trigger-log
          79 kB
        9. system-log
          90 kB

          Activity

          Hide
          ceilfors Wisen Tanasa added a comment -

          It's a little bit difficult as there is no other error as far as I can see. Can you check if your Jenkins can actually talk to JIRA? JQL Filter requires Jenkins to be able to talk to JIRA, this is one of the few feature that need bi directional communication in between Jenkins and JIRA. Try to SSH to your Jenkins machine, then curl to http://jira.n.xiomi.com.

          If this doesn't help, I might require the full logs that you have to see if there's anything I can find.

          Show
          ceilfors Wisen Tanasa added a comment - It's a little bit difficult as there is no other error as far as I can see. Can you check if your Jenkins can actually talk to JIRA? JQL Filter requires Jenkins to be able to talk to JIRA, this is one of the few feature that need bi directional communication in between Jenkins and JIRA. Try to SSH to your Jenkins machine, then curl to http://jira.n.xiomi.com . If this doesn't help, I might require the full logs that you have to see if there's anything I can find.
          Hide
          hnbyhnby hnbyhnby xu added a comment -

          I checked my jenkins can talk to JIRA.

          After checked it, I try again update JIRA issue status, this time, the job can be triggered with JQL: labels = D2A-TBD.

          Then, I configured another job in Jenkins with JQL: labels = E6-TBD, and modify JIRA issue's labels to E6-TBD, update issue status, but this time it can NOT be triggered.

          I modified the JIRA issue's labels back to D2A-TBD, update the status, the first job I tried in Jenkins doesn't be triggered.

          I tested many times, these 2 jobs can NOT be triggered no matter what I modify.

          I checked the jira-trigger-log and system log as attached. And found the system log said: "

          Error while serving http://10.132.56.10/jira-trigger-webhook-receiver/ java.util.concurrent.TimeoutException: Timeout waiting for task.

          "

          But I still don't know how to resolve the timeout issue? where should I adjust?

           

           

           

          Show
          hnbyhnby hnbyhnby xu added a comment - I checked my jenkins can talk to JIRA. After checked it, I try again update JIRA issue status, this time, the job can be triggered with JQL: labels = D2A-TBD. Then, I configured another job in Jenkins with JQL: labels = E6-TBD, and modify JIRA issue's labels to E6-TBD, update issue status, but this time it can NOT be triggered. I modified the JIRA issue's labels back to D2A-TBD, update the status, the first job I tried in Jenkins doesn't be triggered. I tested many times, these 2 jobs can NOT be triggered no matter what I modify. I checked the jira-trigger-log and system log as attached. And found the system log said: " Error while serving http://10.132.56.10/jira-trigger-webhook-receiver/ java.util.concurrent.TimeoutException: Timeout waiting for task. " But I still don't know how to resolve the timeout issue? where should I adjust?      
          Hide
          ceilfors Wisen Tanasa added a comment -

          I can see that the error is coming out from this line:

          at com.ceilfors.jenkins.plugins.jiratrigger.jira.JrjcJiraClient.validateIssueKey(JrjcJiraClient.groovy:62)
          

          This is the part of the plugin that actually hits JIRA. May I ask how many jobs do you actually have configured with Jira Trigger Plugin? There was a similar issue that has been filed here when someone is using the plugin for 600+ jobs.

          Show
          ceilfors Wisen Tanasa added a comment - I can see that the error is coming out from this line: at com.ceilfors.jenkins.plugins.jiratrigger.jira.JrjcJiraClient.validateIssueKey(JrjcJiraClient.groovy:62) This is the part of the plugin that actually hits JIRA. May I ask how many jobs do you actually have configured with Jira Trigger Plugin? There was a similar issue that has been filed here when someone is using the plugin for 600+ jobs.
          Hide
          hnbyhnby hnbyhnby xu added a comment -

          Many thanks, Tanasa.

          I know the reason of this issue, I checked there was timeout error in the jenkins log. when I login JIRA with my account, it spent long time, so I think jenkins' timeout shorter than the time using to login JIRA. Then I change my account to a public account which can login JIRA faster, after that, the Jenkins job can be triggered normally.

          Thanks again for your kindly analysis~

          Show
          hnbyhnby hnbyhnby xu added a comment - Many thanks, Tanasa. I know the reason of this issue, I checked there was timeout error in the jenkins log. when I login JIRA with my account, it spent long time, so I think jenkins' timeout shorter than the time using to login JIRA. Then I change my account to a public account which can login JIRA faster, after that, the Jenkins job can be triggered normally. Thanks again for your kindly analysis~
          Hide
          ceilfors Wisen Tanasa added a comment -

          Glad it worked out for you!

          Show
          ceilfors Wisen Tanasa added a comment - Glad it worked out for you!

            People

            • Assignee:
              ceilfors Wisen Tanasa
              Reporter:
              hnbyhnby hnbyhnby xu
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: