[JIRA] (JENKINS-61488) Jenkins Build not getting triggered even after receiving Jira Webhook Callback

23 views
Skip to first unread message

amrut.dengre@udchalo.com (JIRA)

unread,
Mar 16, 2020, 2:56:03 AM3/16/20
to jenkinsc...@googlegroups.com
Amrut dengre created an issue
 
Jenkins / Task JENKINS-61488
Jenkins Build not getting triggered even after receiving Jira Webhook Callback
Issue Type: Task Task
Assignee: Wisen Tanasa
Attachments: amrut_config.png, amrut_jenkins_Logs, amrut_webhook.png
Components: jira-trigger-plugin
Created: 2020-03-16 06:55
Priority: Blocker Blocker
Reporter: Amrut dengre

Hi Wisen Tanasa

I have configured my jenkins https url in jira's webhook. Also I am receiving "Received Webhook callback from comment. Event type: comment_created" in my jenkins logs when I add a comment in my Jira ticket.

However the build is not getting triggered. Could you please help me in fixing this?

We are on Jira cloud and my jenkins is running on Ec2 Instance.I have followed all the Troubleshooting steps listed on page https://github.com/jenkinsci/jira-trigger-plugin

I am not able to understand  "If you are seeing "Received Webhook callback ..." but your build is not triggered, your configuration for this plugin in Jenkins might be too restrictive, please double check." this part from troubleshooting steps.

My Project name in Jira is "TEST_PROJECT" and Key is "TP".  Please refer amrut_config.png image to view the configuration done in jenkins job.Also find attached the webhook configuration(amrut_webhook.png) done at Jira end.

Attached are the logs (amrut_jenkins_Logs)from jenkins post commenting in Jira issue .

Please let me know if anything else is needed from my end.

 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo

wisen@ceilfors.com (JIRA)

unread,
Mar 16, 2020, 2:59:02 AM3/16/20
to jenkinsc...@googlegroups.com
Wisen Tanasa commented on Task JENKINS-61488
 
Re: Jenkins Build not getting triggered even after receiving Jira Webhook Callback

Amrut dengre Thank you for raising this issue. To help the community navigate JIRA better, do kindly move your comments from JENKINS-58987 here too.

wisen@ceilfors.com (JIRA)

unread,
Mar 16, 2020, 3:01:03 AM3/16/20
to jenkinsc...@googlegroups.com

To troubleshoot:

  1. Can you try to remove the "JQL Filter" and see if that triggers the build? (Check if you have configured Jenkins to talk to JIRA)
  2. If a build is still not triggered, can you remove the "Comment pattern" and see if that triggers the build?

amrut.dengre@udchalo.com (JIRA)

unread,
Mar 16, 2020, 4:44:02 AM3/16/20
to jenkinsc...@googlegroups.com

Hi Wisen Tanasa,

As asked I tried to remove "JQL Filter" from job config at jenkins end and kept only comment pattern as 'CODEBUILD'. But this didnt triggered the build.However when I added comment in Jira issue as 'CODEBUILD' I could see "Received Webhook callback from comment. Event type: comment_created"  in jenkins logs.

What do you meant by "Check if I have configured Jenkins to talk to JIRA"? Do you want me to add any new plugin to facilitate this communication?

Also If I remove the 'Comment Pattern" then on which event by webhook should be called?

amrut.dengre@udchalo.com (JIRA)

unread,
Mar 16, 2020, 4:56:04 AM3/16/20
to jenkinsc...@googlegroups.com

Hi Wisen Tanasa

Since I have removed the JQL Filter and also the "comment pattern" I am getting the webhook logs for each and every comment made in Jira ticket for all the projects.

So I am sure that the webhook call is being received properly but not sure what is causing build not to trigger.  

wisen@ceilfors.com (JIRA)

unread,
Mar 16, 2020, 5:00:05 AM3/16/20
to jenkinsc...@googlegroups.com

Amrut dengre That's great, at least you're not actually hitting network issue. Can you add back the "comment pattern", but keep the "JQL Filter"? Will it get the build triggered? I'm not quite sure why the "CODEBUILD" comment is not triggering the build, it should trigger it.

On talking back to JIRA, this is required for JQL Filter to work, please see this section in the documentation: https://github.com/jenkinsci/jira-trigger-plugin#jenkins-global-configuration-one-time

amrut.dengre@udchalo.com (JIRA)

unread,
Mar 16, 2020, 5:13:02 AM3/16/20
to jenkinsc...@googlegroups.com

Hi Wisen Tanasa,

Thanks for your promt responses.

I have checked the checkbox for 'Build when comment is added to JIRA' and kept JQL Filter as ---> project = "TEST_PROJECT"

and comment pattern as -----> CODEBUILD but no luck.

Also please find attached the Jira Trigger Configuration that I had already done before reporting the issue. Please refer once Jira_Trigger_Config.png

 

 

amrut.dengre@udchalo.com (JIRA)

unread,
Mar 16, 2020, 5:14:03 AM3/16/20
to jenkinsc...@googlegroups.com

amrut.dengre@udchalo.com (JIRA)

unread,
Mar 16, 2020, 5:16:02 AM3/16/20
to jenkinsc...@googlegroups.com

amrut.dengre@udchalo.com (JIRA)

unread,
Mar 16, 2020, 5:44:05 AM3/16/20
to jenkinsc...@googlegroups.com

Hi Wisen Tanasa,

I just checked 'All Logs' in jenkins and could see below error -

Error while serving https://XXXX.udchalo.com/jira-trigger-webhook-receiver/ org.codehaus.jettison.json.JSONException: JSONObject["name"] not found. at org.codehaus.jettison.json.JSONObject.get(JSONObject.java:360)

Any thoughts how to fix this?

amrut.dengre@udchalo.com (JIRA)

unread,
Mar 16, 2020, 5:46:02 AM3/16/20
to jenkinsc...@googlegroups.com
Amrut dengre updated an issue
Change By: Amrut dengre
Comment: Hi [~ceilfors],


I just checked 'All Logs' in jenkins and could see below error -

Error while serving https://XXXX.udchalo.com/jira-trigger-webhook-receiver/ org.codehaus.jettison.json.JSONException: JSONObject["name"] not found. at org.codehaus.jettison.json.JSONObject.get(JSONObject.java:360)

Any thoughts how to fix this?

amrut.dengre@udchalo.com (JIRA)

unread,
Mar 16, 2020, 5:48:02 AM3/16/20
to jenkinsc...@googlegroups.com
 
Re: Jenkins Build not getting triggered even after receiving Jira Webhook Callback

Hi Wisen Tanasa,

Just checked the 'All Logs' in jenkins from UI and can see below error - 

Error while serving https://XXXX.udchalo.com/jira-trigger-webhook-receiver/ org.codehaus.jettison.json.JSONException: JSONObject["name"] not found. at org.codehaus.jettison.json.JSONObject.get(JSONObject.java:360) at org.codehaus.jettison.json.JSONObject.getString(JSONObject.java:487) at com.atlassian.jira.rest.client.internal.json.JsonParseUtil.parseBasicUser(JsonParseUtil.java:192) at com.atlassian.jira.rest.client.internal.json.AttachmentJsonParser.parse(AttachmentJsonParser.java:35) at com.atlassian.jira.rest.client.internal.json.AttachmentJsonParser.parse(AttachmentJsonParser.java:27) at com.atlassian.jira.rest.client.internal.json.JsonWeakParserForJsonObject.parse(JsonWeakParserForJsonObject.java:39) at com.atlassian.jira.rest.client.internal.json.IssueJsonParser.parseOptionalArray(IssueJsonParser.java:166) at com.atlassian.jira.rest.client.internal.json.IssueJsonParser.parse(IssueJsonParser.java:222) at com.atlassian.jira.rest.client.internal.json.IssueJsonParser$parse.call(Unknown Source) at com.ceilfors.jenkins.plugins.jiratrigger.webhook.WebhookChangelogEventJsonParser.parse(WebhookChangelogEventJsonParser.groovy:35) at com.ceilfors.jenkins.plugins.jiratrigger.webhook.WebhookChangelogEventJsonParser$parse.call(Unknown Source) at com.ceilfors.jenkins.plugins.jiratrigger.webhook.JiraWebhook.processEvent(JiraWebhook.groovy:63) at com.ceilfors.jenkins.plugins.jiratrigger.webhook.JiraWebhook$processEvent.callCurrent(Unknown Source) at com.ceilfors.jenkins.plugins.jiratrigger.webhook.JiraWebhook.doIndex(JiraWebhook.groovy:51) at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627) at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:396)

Caused: java.lang.reflect.InvocationTargetException at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:400) at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:408)

amrut.dengre@udchalo.com (JIRA)

unread,
Mar 16, 2020, 5:48:02 AM3/16/20
to jenkinsc...@googlegroups.com

wisen@ceilfors.com (JIRA)

unread,
Mar 16, 2020, 3:54:36 PM3/16/20
to jenkinsc...@googlegroups.com
Wisen Tanasa closed an issue as Duplicate
 

Thanks for all the details. Apologies, but apparently based on the error above, this is a duplicate of JENKINS-58987, closing this.

Change By: Wisen Tanasa
Status: Open Closed
Resolution: Duplicate
Reply all
Reply to author
Forward
0 new messages