Thursday, 1 September 2011

Browse » Home » » » » Gadgets do not Display when Failing to Access XML Specification

Gadgets do not Display when Failing to Access XML Specification

Symptom

When integrating JIRA 4.x with a proxy server, the Dashboard Gadget can't be dsiplayed with the below exception thrown in Gadget:
org.apache.shinding.gadgets.GadgetException: Unable to retrieve gadget xml. HTTP error 500.

Cause

JIRA 4.0 Gadget applies 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:
  • A loop-back bug of JIRA 4.0. See 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

Resolution

  1. 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
  2. If there's a firewall between the proxy and JIRA's application server which has a restriction, remove that restriction.
  3. 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).
  4. test if 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.

Advertisement:

No comments:

Post a Comment

Note: only a member of this blog may post a comment.