Gadgets failing to load in Jira server behind a proxy
Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.
Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles 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
Symptom
When integrating JIRA with a proxy server, the Dashboard Gadget can't be displayed with the below exception thrown in Gadget:
org.apache.shinding.gadgets.GadgetException: Unable to retrieve gadget xml. HTTP error 500.
Cause
JIRA Gadgets use the extensible REST Plugin Module framework, which provides access to resources via URI paths. The JIRA self-generated outgoing URL fails to access the requested spec XML. This failure can be caused by different reasons:
- A loop-back bug of JIRA 4.0. See (Archived) Gadgets do not display correctly after upgrade to JIRA 4.0
- A firewall restriction for JIRA self-generated outgoing request
- A mismatched domain and port in JIRA self-generated outgoing request
- A mismatched request scheme in JIRA self-generated outgoing request
- A URL domain of JIRA self-generated outgoing request can't be detected in JIRA
- Gadget feed URL healthcheck fails when JIRA is unable to request gadget information due to SSL/connectivity issues with requests originating from Jira to Jira's base URL.
Resolution
Depending on the cause above, there's a different resolution
- If you're using JIRA 4.0, please upgrade to the version above JIRA 4.0.1 or later, which includes the fix for proxy loop-back bug
- If there's a firewall between the proxy and JIRA's application server which has a restriction, remove that restriction.
Edit
<JIRA_Installation_Home>/conf/server.xml
(Standalone), or<Catalina_Home>/conf/server.xml
for Ear-War deployment. Specify scheme/proxyName/proxyPort attributes in JIRA Connector, e.g.<Connector port="8080" ... scheme="your_request_scheme" proxyName="your_proxy_name" proxyPort="your_proxy_port" />
notes: scheme should be either http or https, which's consistent with the request scheme used to access proxy (instead of JIRA application server).
Test if the domain name of proxy server can be detected on JIRA application server; for example
wget https://support.atlassian.com:443/rest/gadgets/1.0/g/com.atlassian.jira.gadgets:assigned-to-me-gadget/gadgets/assigned-to-me-gadget.xml
If the proxy's domain can't be detected on JIRA application server, adjust the hosts file or DNS to fix it.
- If the Gadget feed URL healthcheck is reporting an error refer to different possible resolutions described in https://confluence.atlassian.com/jirakb/health-check-jira-base-url-859447384.html