JIRA GUI is not rendered properly when accessed via Proxy URL
Symptoms
Upon configuring a load balancer for JIRA Data Center as per Installing JIRA Data Center, JIRA GUI is not rendered properly when accessed via the load balancer (proxy) URL. All menus and buttons appear broken (no CSS styling or JavaScript appears to take effect):
Diagnosis
- Accessing JIRA locally, by-passing the proxy, doesn't produce the same problem.
- JIRA is configured properly for Data Center in terms of cluster.properties, server.xml, JVM paramaters.
- Turning on the browser's F12 developer tools when loading the proxy URL, (almost) all CSS and JS batch files show 404 Not Found error, some with strange double slashes (//) in request URLs.
The following error appears in JIRA log:
2017-07-09 10:56:00,187 http-nio-8080-exec-14 ERROR anonymous 656x1545x1 - 137.74.162.41,217.182.67.11 // [c.a.p.internal.route.UrlRouterImpl] Failed to create requestUri // due to: Expected authority at index 2: //
Cause & Resolution
There's an unexpected slash (/) after the port number (no context path) in the load balancer's VirtualHost config e.g.:
BalancerMember http://jira.example.com:8080/ route=node1
Removing the slash (and restarting the load balancer) should fix the issue:
BalancerMember http://jira.example.com:8080 route=node1