Jira activity stream gadget throws gadget.common.error.500
Problem
The following appears in the activity gadget stream when viewed from any of the JIRA UI displaying the activity gadget. This happens to all users irrespective of their permissions
Diagnosis
Diagnostic Steps
Looking for the requests made to the gadgets from the atlassian-jira.log the following errors can be seen from the HAR file and the atlassian-jira.log
Request : "https://<url>/plugins/servlet/gadgets/makeRequest",
Response : {"https://<url>/rest/webResources/1.0/resources":{"rc":500,"headers":{},"body":""}}"
Request https://<url>/rest/webResources/1.0/resources":{"rc":403
,"headers":{},...
.....
,"oauthErrorText":"No oauth_token returned from serviceprovider
response : HTTP/1.1 500 Date: Thu, 18 Apr 2019 13:25:22 GMT ====","body":"","oauthError"
:"UNKNOWN_PROBLEM"}}
2019-04-19 08:35:35,981 https-jsse-nio-10.32.1.60-443-exec-24 ERROR xxxx 515x11705x1 xxxxx 10.125.34.35 /plugins/servlet/gadgets/makeRequest[c.a.g.r.internal.http.HttpClientFetcher] Unable to perform a request to: https://<url>/rest/webResources/1.0/resources
javax.net.ssl.SSLHandshakeException:
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested targetat sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
Cause
Since the gadgets work by making a request in JIRA to itself, an invalid or absence of a certificate can lead to such errors.
Resolution
Modify the certificate or provide the correct certificate path to avoid errors on the activity gadget stream load: Unable to connect to SSL services due to "PKIX Path Building Failed" error
As per How to import a public SSL certificate into a JVM