JIRA webhook throws error 502

NOTE: Spaces intentionally added to URLs below to allow posting.


JIRA is throwing error 502 when attempting to use the Webhook to send a message to Mattermost

Steps to reproduce

How can we reproduce the issue (what version are you using?)
JIRA 7.2.7
Mattermost Enterprise Edition 4.8.0

  • Followed instructions at https://docs.mattermost.com/integrations/jira.html to configure JIRA plugin and webhook.
  • Webhook URL looks like: http: // mattermost. ourdomain. com:8065/plugins/jira/webhook?secret=3i0ng9sZjahOXDcz7ZY4XO9wtS5tLY71&team=test&channel=notifications (We have an Apache proxy in place, so also tried with https: // mattermost. ourdomain. com / - same result)
  • Created JIRA which triggers webhook

Expected behavior

Notification should be posted to the specified Mattermost channel

Observed behavior

Notification is not posted. In the JIRA Catalina log, we see the following message:

2018-05-30 09:27:26,900 httpclient-callbacks:thread-6 WARN anonymous [c.a.webhooks.plugin.PublishTaskFactoryImpl$PublishTaskImpl] Server error - 502 when posting to web hook at 'http :// mattermost. ourdomain. com : 8065/plugins/jira/webhook?secret=3i0ng9sZjahOXDcz7ZY4XO9wtS5tLY71&team=test&channel=notifications'

Nothing is logged on the Mattermost side.

Same error if going to https on 443 through Apache proxy

What we have tried

  • two different JIRA instances
  • restarting Mattermost
  • activating/deactivating JIRA plugin
  • regenerating secret key
  • curl command to Mattermost URLs from JIRA servers connects successfully

Hi @mahoney2! Thank you for reporting this.

As a first step, can you help confirm if you have tried these troubleshooting tips: https://docs.mattermost.com/integrations/jira.html#why-doesn-t-my-jira-webhook-post-any-messages?

If you already have, or if they didn’t help, please let me know and I’ll have one of our engineers take a look at this!

Yes, looked through the FAQ - no help there. There is the bit about webhooks only being able to use 80 or 443, but we’ve tried using both the Apache SSL front end, as well as directly to port 8065, and get the same result.


Hi @mahoney2 - thank you!

One thing we usually recommend is upgrading to the latest server version (v4.10) as there might be bugs fixed related to this in recent versions.
If upgrading is not an option at this point, just let me know and I will have an engineer take a look at the Jira log and URLs that you posted above.

This appears to be a problem with JIRA, possibly the Webhooks plugin. Doesn’t matter what we try to point the JIRA webhook to, we get the same error. Communication is never reaching the Mattermost server. We’ll need to follow up with Atlassian on this one.

Thanks for your assistance.


I found this on the Atlassian support site: https://confluence.atlassian.com/jirakb/how-to-collect-data-for-atlassian-support-for-troubleshooting-jira-webhooks-397083035.html

I went through the steps, and sending to the webhook.site works fine. Sending to Mattermost results in the same error.

2018-06-01 10:01:53,893 httpclient-callbacks:thread-21 WARN anonymous [c.a.webhooks.plugin.PublishTaskFactoryImpl$PublishTaskImpl] Server error - 502 when posting to web hook at 'https://ourdomain.com/plugins/jira/webhook?secret=bigsecret&team=test&channel=notifications'

Mattermost has been upgraded to the latest version.

Hi @mahoney2 Apologies for the delay - I will ask a colleague to take a look at the log you posted earlier and to find out whether there is any additional information that we can help gather to troubleshoot this.

We appear to have it figured out. This is really weird…

Our JIRA instance had webproxy parameters specified in its java startup:

-Dhttp.proxyHost=webproxy.ourdomain.com -Dhttp.proxyPort=80 -Dhttp.nonProxyHosts='135.*|*.ourdomain.com|localhost' -Dhttps.proxyHost=webproxy.ourdomain.com -Dhttps.proxyPort=80 -Dhttps.nonProxyHosts='135.*|*.ourdomain.com|localhost'

With the webproxy configured, the EXTERNAL traffic to that webhook test site was working fine. Internal traffic, however, was not getting through. We believe we had it configured correctly, though. Our internal applinks between Atlassian applications worked fine.

As nothing else was making sense, we removed these startup parameters. Now, the webhook to Mattermost is working fine.

So, no idea if there was something wrong with our webproxy config, or if the Atlassian webhook engine is just cracked.