Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Jira Webhook (Integration with Jenkins) - 404 Error

Em August 12, 2019

Hello, I'm trying to integrate Jenkins with Jira to trigger a Jenkins job after a transition. 

I've tried using multiple plugins and creating my own webhook and keep getting the same 404 error with all methods:

httpclient-callbacks:thread-75 WARN anonymous 1140x30x1 1bvkbgt 172.17.0.1 /secure/SetupLicense.jspa [c.a.webhooks.plugin.PublishTaskFactoryImpl$PublishTaskImpl] Client error - 404 when posting to web hook at 'http://localhost:8080/generic-webhook-trigger/invoke?token=qwer1234'

I've read through multiple posts but none have solved my problem. I can curl the same link with a POST request and trigger the job. I can paste the link into a web browser and trigger the job. Jira is validated successfully in my Jenkin's configuration (add Jira sites) and has HTTP enabled. I have tried using an authenticator (http://admin:api-token@localhost:8080/generic-webhook-trigger/invoke?token=1234asdf) with no luck. I have also tried both GET and POST requests in Postman, which both also trigger jobs.

Does anyone know what might be going on? I'm running out of ideas on what to do at this point :<
Thank you for your help!

Screen Shot 2019-08-12 at 1.53.48 PM.png

1 answer

1 accepted

0 votes
Answer accepted
Em August 13, 2019

Okay, so I managed to figure out the problem and will post my solution here in case anyone needs it. So the Jira and Jenkins services are running on containers and need to talk to one another, not through localhost but through an internal ip with an exposed port. I had Jenkins running locally but Jira was trying to reach it from within the VM, which is why I was getting a 404 error. It was looking at Jira's localhost (duh!). Once I configured some security settings and exposed the internal ip/port of the Jenkins instance, they were able to connect :) 

Maximiliano Javier Julio May 17, 2024

Hello Em, 

How did you do this: Once I configured some security settings and exposed the internal ip/port of the Jenkins instance, they were able to connect :) ?

|

Suggest an answer

Log in or Sign up to answer