Assets Gadget reports running on an incorrect hostname
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
You have an Assets Gadget that is not loading. Other gadgets may or may not be affected. The rest of Assets appears to be operating properly.
Environment
Any in which Jira is being accessed through two hostnames.
Diagnosis
Log entries appear similar to the following:
1
2
3
4
5
6
7
2024-11-12 17:11:50,702-0700 https-openssl-nio-443-exec-64 ERROR user1 890x7986184x2 1bqjeg9 10.1.1.1 /plugins/servlet/gadgets/dashboard-diagnostics [c.a.g.d.internal.diagnostics.DiagnosticsServlet] DIAGNOSTICS: FAILED
com.atlassian.gadgets.dashboard.internal.diagnostics.UrlHostnameMismatchException: Detected URL hostname, 'jirasrv' does not match expected hostname, 'jirasrv.hostname.tld'
at com.atlassian.gadgets.dashboard.internal.diagnostics.Diagnostics.checkExpectedHostname(Diagnostics.java:62)
at com.atlassian.gadgets.dashboard.internal.diagnostics.Diagnostics.check(Diagnostics.java:32)
at com.atlassian.gadgets.dashboard.internal.diagnostics.DiagnosticsServlet.executeDiagnostics(DiagnosticsServlet.java:80)
at com.atlassian.gadgets.dashboard.internal.diagnostics.DiagnosticsServlet.doPost(DiagnosticsServlet.java:56)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:555)
The following error message may appear on the page where the widget should be:
Dashboard Diagnostics: Mismatched URL Hostname
Jira is reporting that it is running on the hostname 'jirasrv', which does not match the hostname used to run these diagnostics, 'jirasrv.hostname.tld'. This is known to cause Jira to construct URLs using the incorrect hostname, which will result in errors in the dashboard, among other issues.
The most common cause of this is the use of a reverse-proxy HTTP server (often Apache or IIS) in front of the application server running Jira. While this configuration is supported, some additional setup might be necessary in order to ensure that Jira detects the correct hostname.
The following articles describe the issue and the steps you should take to ensure that your web server and app server are configured correctly:
If you believe this diagnosis is in error, or you have any other questions, please contact Atlassian Support.
Cause
Jira's base-url is set to one value (jirasrv.hostname.tld) but Jira is also being accessed through a second url (jirasrv). The Assets gadget stores only one URL in its metadata and cannot be accessed through any other URL than that one.
Solution
Restart Jira to clear the gadget's metadata
Access Jira only through the address it has set as its base-url.
If access from both URLs is somehow required, make use of a proxy server in front of Jira to allow there to be access to the program through only one base-url
Was this helpful?