Unable to Load Jira Dashboard seeing an HTTP 500 error when using F5 BigIP as a reverse proxy.

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

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

Problem

Jira fails to load its Dashboard showing a brief error message and then an HTTP 500 error page showing the below exception:

The issue is reproducible on all browsers and is seen by all users who have a default dashboard having at least 1 gadget added.




The following appears in the atlassian-jira.log:

2019-05-1 11:00:00,284 http-nio-8080-exec-1 ERROR user1 111x111x1 aaaaa 1.1.1.1 / [c.a.j.web.servlet.InternalServerErrorServlet] {errorId=qqqqq-qqqqqq-qqqqqq-qqqqqq-qqqqq-qqqq, interpretedMsg=, cause=java.lang.RuntimeException: javax.servlet.ServletException: java.lang.RuntimeException: com.google.template.soy.tofu.SoyTofuException: In 'print' tag, expression "$dashboardTitle" evaluates to undefined., stacktrace=java.lang.RuntimeException: javax.servlet.ServletEx
ception: java.lang.RuntimeException: com.google.template.soy.tofu.SoyTofuException: In 'print' tag, expression "$dashboardTitle" evaluates to undefined.
at com.atlassian.web.servlet.plugin.DynamicAuthorizationServletForwarder.forward(DynamicAuthorizationServletForwarder.java:55) [?:?]
....
Caused by: javax.servlet.ServletException: java.lang.RuntimeException: com.google.template.soy.tofu.SoyTofuException: In 'print' tag, expression "$dashboardTitle" evaluates to undefined.
at com.atlassian.jira.web.dispatcher.JiraWebworkActionDispatcher.onActionException(JiraWebworkActionDispatcher.java:217) [classes/:?]
at com.atlassian.jira.web.dispatcher.JiraWebworkActionDispatcher.service(JiraWebworkActionDispatcher.java:169) [classes/:?]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) [servlet-api.jar:?]
.....
... 236 more
Caused by: java.lang.RuntimeException: com.google.template.soy.tofu.SoyTofuException: In 'print' tag, expression "$dashboardTitle" evaluates to undefined.
at com.atlassian.web.servlet.plugin.DynamicAuthorizationServletForwarder.forward(DynamicAuthorizationServletForwarder.java:55) [?:?]
at com.atlassian.web.servlet.plugin.DynamicAuthorizationServletForwarder.forwardSafely(DynamicAuthorizationServletForwarder.java:83) [?:?]
at com.atlassian.web.servlet.plugin.SanitizingServletForwarder.forwardSafely(SanitizingServletForwarder.java:48) [?:?]
at com.atlassian.web.servlet.plugin.RememberingServletForwarder.forwardSafely(RememberingServletForwarder.java:75) [?:?]
at com.atlassian.web.servlet.plugin.ResolvingServletForwarder.forwardSafely(ResolvingServletForwarder.java:50) [?:?]
at com.atlassian.web.servlet.plugin.request.RedirectInterceptingResponse.lambda$null$0(RedirectInterceptingResponse.java:50) [?:?]
at java.util.Optional.map(Optional.java:215) [?:1.8.0_181]
at com.atlassian.web.servlet.plugin.request.RedirectInterceptingResponse.lambda$forward$1(RedirectInterceptingResponse.java:50) [?:?]
at java.util.Optional.flatMap(Optional.java:241) [?:1.8.0_181]
at com.atlassian.web.servlet.plugin.request.RedirectInterceptingResponse.forward(RedirectInterceptingResponse.java:50) [?:?]
at com.atlassian.web.servlet.plugin.request.RedirectInterceptingResponse.sendRedirect(RedirectInterceptingResponse.java:36) [?:?]
at com.atlassian.jira.web.action.JiraWebActionSupport.forceRedirect(JiraWebActionSupport.java:498) [jira-api-7.13.1.jar:?]
at com.atlassian.jira.web.action.JiraWebActionSupport.getRedirect(JiraWebActionSupport.java:460) [jira-api-7.13.1.jar:?]
at com.atlassian.jira.web.action.JiraWebActionSupport.getRedirect(JiraWebActionSupport.java:411) [jira-api-7.13.1.jar:?]
at com.atlassian.jira.web.action.MyJiraHome.doExecute(MyJiraHome.java:34) [classes/:?]
at webwork.action.ActionSupport.execute(ActionSupport.java:165) [webwork-1.4-atlassian-30.jar:?]
at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:63) [jira-api-7.13.1.jar:?]
.....
Caused by: com.google.template.soy.tofu.SoyTofuException: In 'print' tag, expression "$dashboardTitle" evaluates to undefined.
at Jira.Dashboard.page.dashboard(dashboard.soy:12) [?:?]
at com.google.template.soy.tofu.internal.BaseTofu.renderMainHelper(BaseTofu.java:369) [?:?]
at com.google.template.soy.tofu.internal.BaseTofu.renderMain(BaseTofu.java:322) [?:?]

Accessing other Jira pages by going to direct URLs is reported to be working fine.

Diagnosis

Environment

  • Jira is running behind F5 BigIP reverse proxy.

Diagnostic Steps

  • Creating an empty Dashboard (has no gadgets) and making it user default  doesn't reproduce the error, Jira is able to load the empty dashboard successfully.


  • Enable Jira Http user access logs and http dump logs, this would allow us to see all the incoming requests and the header/cookie details of each, to do this navigate to from the Jira page: <Jira_BASE_URL>/secure/admin/ViewLogging.jspa.


  • Enable Debug logging on the package org.apache.http, this would allow Jira to log all http requests coming out of Jira including the ones used by Jira to connect to itself to render the gadgets. 

    The logs debug logs could be found in atlassian-jira.log.


  • On accessing a dashboard that contains 1 or more gadgets, Inspecting the http access logs, we see that Jira doesn’t seem to be able to load any gadget XML spec, there is no requests coming from Jira to itself at all.

    Inspecting the org.apache.http logs, shows that Jira try to connect to itself indeed, but is getting an unexpected HTTP 302 redirect from F5 BigIP to the location /my.policy

    2019-01-01 11:39:55,618 http-nio-8080-exec-1 DEBUG user1 111x111x11 aaaab 1.1.1.1 / [o.a.h.impl.execchain.MainClientExec] Target auth state: UNCHALLENGED
    2019-01-01 11:39:55,618 http-nio-8080-exec-1 DEBUG user1 111x111x11 aaaab 1.1.1.1 / [o.apache.http.headers] http-outgoing-15 >> GET /jira/rest/gadgets/1.0/g/messagebundle/und/gadget.common%2Cgadget.issuetable%2Cgadget.assignedtome%2Cgadget.issuetable.common HTTP/1.1
    2019-01-01 11:39:55,618 http-nio-8080-exec-1 DEBUG user1 111x111x11 aaaab 1.1.1.1 / [o.apache.http.headers] http-outgoing-15 >> X-shindig-dos: on
    2019-01-01 11:39:55,618 http-nio-8080-exec-1 DEBUG user1 111x111x11 aaaab 1.1.1.1 / [o.apache.http.headers] http-outgoing-15 >> Accept-Encoding: gzip, deflate
    2019-01-01 11:39:55,618 http-nio-8080-exec-1 DEBUG user1 111x111x11 aaaab 1.1.1.1 / [o.apache.http.headers] http-outgoing-15 >> Host: jira.base.url.com
    2019-01-01 11:39:55,619 http-nio-8080-exec-1 DEBUG user1 111x111x11 aaaab 1.1.1.1 / [o.apache.http.headers] http-outgoing-15 >> Connection: Keep-Alive
    2019-01-01 11:39:55,619 http-nio-8080-exec-1 DEBUG user1 111x111x11 aaaab 1.1.1.1 / [o.apache.http.headers] http-outgoing-15 >> User-Agent: Apache-HttpClient/4.5.5 (Java/1.8.0_181)
    2019-01-01 11:39:55,619 http-nio-8080-exec-1 DEBUG user1 111x111x11 aaaab 1.1.1.1 / [o.apache.http.wire] http-outgoing-15 >> "GET /jira/rest/gadgets/1.0/g/messagebundle/und/gadget.common%2Cgadget.issuetable%2Cgadget.assignedtome%2Cgadget.issuetable.common HTTP/1.1[\r][\n]"
    2019-01-01 11:39:55,619 http-nio-8080-exec-1 DEBUG user1 111x111x11 aaaab 1.1.1.1 / [o.apache.http.wire] http-outgoing-15 >> "X-shindig-dos: on[\r][\n]"
    2019-01-01 11:39:55,619 http-nio-8080-exec-1 DEBUG user1 111x111x11 aaaab 1.1.1.1 / [o.apache.http.wire] http-outgoing-15 >> "Accept-Encoding: gzip, deflate[\r][\n]"
    2019-01-01 11:39:55,619 http-nio-8080-exec-1 DEBUG user1 111x111x11 aaaab 1.1.1.1 / [o.apache.http.wire] http-outgoing-15 >> "Host: jira.base.url.com[\r][\n]"
    2019-01-01 11:39:55,619 http-nio-8080-exec-1 DEBUG user1 111x111x11 aaaab 1.1.1.1 / [o.apache.http.wire] http-outgoing-15 >> "Connection: Keep-Alive[\r][\n]"
    2019-01-01 11:39:55,619 http-nio-8080-exec-1 DEBUG user1 111x111x11 aaaab 1.1.1.1 / [o.apache.http.wire] http-outgoing-15 >> "User-Agent: Apache-HttpClient/4.5.5 (Java/1.8.0_181)[\r][\n]"
    2019-01-01 11:39:55,619 http-nio-8080-exec-1 DEBUG user1 111x111x11 aaaab 1.1.1.1 / [o.apache.http.wire] http-outgoing-15 >> "[\r][\n]"
    2019-01-01 11:39:55,620 http-nio-8080-exec-1 DEBUG user1 111x111x11 aaaab 1.1.1.1 / [o.apache.http.wire] http-outgoing-15 << "HTTP/1.0 302 Found[\r][\n]"
    2019-01-01 11:39:55,620 http-nio-8080-exec-1 DEBUG user1 111x111x11 aaaab 1.1.1.1 / [o.apache.http.wire] http-outgoing-15 << "Server: BigIP[\r][\n]"
    2019-01-01 11:39:55,620 http-nio-8080-exec-1 DEBUG user1 111x111x11 aaaab 1.1.1.1 / [o.apache.http.wire] http-outgoing-15 << "Connection: Close[\r][\n]"
    2019-01-01 11:39:55,620 http-nio-8080-exec-1 DEBUG user1 111x111x11 aaaab 1.1.1.1 / [o.apache.http.wire] http-outgoing-15 << "Content-Length: 0[\r][\n]"
    2019-01-01 11:39:55,620 http-nio-8080-exec-1 DEBUG user1 111x111x11 aaaab 1.1.1.1 / [o.apache.http.wire] http-outgoing-15 << "Location: /my.policy[\r][\n]"
    2019-01-01 11:39:55,620 http-nio-8080-exec-1 DEBUG user1 111x111x11 aaaab 1.1.1.1 / [o.apache.http.wire] http-outgoing-15 << "Set-Cookie: LastMRH_Session=11111b1; domain=jira.base.url.com;path=/;secure[\r][\n]"
    2019-01-01 11:39:55,620 http-nio-8080-exec-1 DEBUG user1 111x111x11 aaaab 1.1.1.1 / [o.apache.http.wire] http-outgoing-15 << "Set-Cookie: MRHSession=aaaaaaaaaaaaaaaaaaaaaaaaaaaaab1; domain=jira.base.url.com;path=/;secure[\r][\n]"
    2019-01-01 11:39:55,621 http-nio-8080-exec-1 DEBUG user1 111x111x11 aaaab 1.1.1.1 / [o.apache.http.wire] http-outgoing-15 << "Set-Cookie: MRHSHint=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/[\r][\n]"
    2019-01-01 11:39:55,621 http-nio-8080-exec-1 DEBUG user1 111x111x11 aaaab 1.1.1.1 / [o.apache.http.wire] http-outgoing-15 << "[\r][\n]"
    2019-01-01 11:39:55,621 http-nio-8080-exec-1 DEBUG user1 111x111x11 aaaab 1.1.1.1 / [o.apache.http.headers] http-outgoing-15 << HTTP/1.0 302 Found
    2019-01-01 11:39:55,621 http-nio-8080-exec-1 DEBUG user1 111x111x11 aaaab 1.1.1.1 / [o.apache.http.headers] http-outgoing-15 << Server: BigIP
    2019-01-01 11:39:55,621 http-nio-8080-exec-1 DEBUG user1 111x111x11 aaaab 1.1.1.1 / [o.apache.http.headers] http-outgoing-15 << Connection: Close
    2019-01-01 11:39:55,621 http-nio-8080-exec-1 DEBUG user1 111x111x11 aaaab 1.1.1.1 / [o.apache.http.headers] http-outgoing-15 << Content-Length: 0
    2019-01-01 11:39:55,621 http-nio-8080-exec-1 DEBUG user1 111x111x11 aaaab 1.1.1.1 / [o.apache.http.headers] http-outgoing-15 << Location: /my.policy
    2019-01-01 11:39:55,621 http-nio-8080-exec-1 DEBUG user1 111x111x11 aaaab 1.1.1.1 / [o.apache.http.headers] http-outgoing-15 << Set-Cookie: LastMRH_Session=11111b1; domain=jira.base.url.com;path=/;secure
    2019-01-01 11:39:55,621 http-nio-8080-exec-1 DEBUG user1 111x111x11 aaaab 1.1.1.1 / [o.apache.http.headers] http-outgoing-15 << Set-Cookie: MRHSession=aaaaaaaaaaaaaaaaaaaaaaaaaaaaab1; domain=jira.base.url.com;path=/;secure
    2019-01-01 11:39:55,621 http-nio-8080-exec-1 DEBUG user1 111x111x11 aaaab 1.1.1.1 / [o.apache.http.headers] http-outgoing-15 << Set-Cookie: MRHSHint=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/
    2019-01-01 11:39:55,621 http-nio-8080-exec-1 DEBUG user1 111x111x11 aaaab 1.1.1.1 / [o.a.h.impl.conn.DefaultManagedHttpClientConnection] http-outgoing-15: Close connection
    2019-01-01 11:39:55,623 http-nio-8080-exec-1 DEBUG user1 111x111x11 aaaab 1.1.1.1 / [o.a.h.impl.execchain.MainClientExec] Connection discarded
    2019-01-01 11:39:55,623 http-nio-8080-exec-1 DEBUG user1 111x111x11 aaaab 1.1.1.1 / [o.a.h.client.protocol.ResponseProcessCookies] Cookie accepted [LastMRH_Session="11111b1", version:0, domain:jira.base.url.com, path:/, expiry:null]
    2019-01-01 11:39:55,623 http-nio-8080-exec-1 DEBUG user1 111x111x11 aaaab 1.1.1.1 / [o.a.h.client.protocol.ResponseProcessCookies] Cookie accepted [MRHSession="aaaaaaaaaaaaaaaaaaaaaaaaaaaaab1", version:0, domain:jira.base.url.com, path:/, expiry:null]
    2019-01-01 11:39:55,624 http-nio-8080-exec-1 DEBUG user1 111x111x11 aaaab 1.1.1.1 / [o.a.h.client.protocol.ResponseProcessCookies] Cookie accepted [MRHSHint="deleted", version:0, domain:jira.base.url.com, path:/, expiry:Thu Jan 01 00:00:01 UTC 1970]
    2019-01-01 11:39:55,631 http-nio-8080-exec-1 ERROR user1 111x111x11 aaaab 1.1.1.1 / [o.a.c.c.C.[.[localhost].[/jira].[action]] Servlet.service() for servlet [action] threw exception
    com.google.template.soy.tofu.SoyTofuException: In 'print' tag, expression "$dashboardTitle" evaluates to undefined.
    at Jira.Dashboard.page.dashboard(dashboard.soy:12)
    at com.google.template.soy.tofu.internal.BaseTofu.renderMainHelper(BaseTofu.java:369)


Cause

F5 BigIP is using its BIG-IP Access Policy Manager (APM) to allow more control on who is allowed to login to the underlying website.

Jira tries to load the Dashboard gadgets by connecting to itself (using the Base URL) to load the gadget XML spec and gets redirected to /my.policy URL to authenticate, but Jira can’t process the HTTP 302 redirect and is not expecting to get a redirect while trying to connect to itself.

Thus the the process of loading the gadget fails since Jira not designed to handle redirect to a login page when connecting to itself to load the gadget XML spec.

This failure in loading the gadgets propagates until the code rendering the Dashboard fails and The above exception is thrown in the logs and in the browser screen later.

The standard logs doesn't show any hint about the failed connection from Jira to itself or about getting a redirect while trying to load the gadget spec.

Resolution

The primary solution to this issue is to white-list the Jira application server IP address(s) from being redirected by F5 BigIP APM module.

Jira should be allowed to connect to itself (using the Base URL) directly without any redirects or authentication forms.

Other Possible Causes

You may check the following page for other possible causes for a similar issue:
Jira server throws 500 error page when logging in or visiting dashboards



Useful Read: http://blog.garraux.net/2013/05/f5-access-policy-manager-multi-domain-sso/

DescriptionUnable to Load Jira Dashboard seeing an HTTP 500 error when using F5 BigIP as a reverse proxy.
ProductJira

Last modified on Jul 30, 2021

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.