JIRA Webhooks stopped working
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
Jira webhooks configured stopped working and the call might work when you hit endpoint using postman or any similar applications.
Environment
Applies for any version
Diagnosis
You might notice that the Webhooks configured in your Jira are not working properly. For example, a webhook configured to update Servicenow whenever an issue is updated in Jira will not be updating the Servicenow ticket.
The API call will work if you try to hit the Servicenow endpoint using Postman.
If you enable the com.atlassian.webhooks debugging, on checking the logs, you will see that the Webhook has been sent out from Jira successfully.
1
2022-05-10 08:16:52,136+0000 httpclient-callbacks:thread-143 DEBUG anonymous [c.a.webhooks.plugin.PublishTaskFactoryImpl$PublishTaskImpl] WebHook successfully sent
Cause
This could be happening because Jira is decoding the UTF-8 based url using a non UTF-8 decoder. Basically Jira is decoding the Token from the callback URL generated from ServiceNow using a non UTF-8 decoder, this is causing issues while Servicenow checks for the token received in the query params from Jira after hitting the callback URL. Eventually, Authentication is failing with Bad Token error at Servicenow/the target application end.
Solution
Go to $JIRA_INSTALL folder/conf/server.xml file to check the Connectors in Jira.
Check if the connectors has URIEncoding="UTF-8" property added to it.
Sometimes the encoding would have been changed to something different like URIEncoding="ISO-8859-X", also if nothing is specified the encoding used by tomcat would be ISO-8859.
Edit the Server.xml file and add the UTF-8 value to encoding.
Restart Jira
NOTE : Depending on the reverse proxy settings, there might be multiple connectors where you have to update the parameter.
Was this helpful?