Encountering 500 error when logging in to Jira after environment refresh
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
Following the environment refresh from production, attempts to access the Jira login page result in a 500 error:

Environment
Jira 9.x
Diagnosis
The Jira application logs reveal the following errors:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
2024-01-12 12:03:50,911+0100 http-nio-8080-exec-8 url: /internal-error ERROR - [c.a.j.web.servlet.InternalServerErrorServlet] {errorId=3fbc24b2-44d1-415b-9878-e51efac4fd1b, interpretedMsg=, cause=java.lang.IllegalStateException: java.net.URISyntaxException: Illegal character in scheme name at index 0: <https://JIRA_BASE_URL>, stacktrace=java.lang.IllegalStateException: java.net.URISyntaxException: Illegal character in scheme name at index 0: <https://JIRA_BASE_URL>
at com.atlassian.plugins.authentication.sso.util.HttpsValidator.isBaseUrlHttps(HttpsValidator.java:61) [?:?]
at com.atlassian.plugins.authentication.sso.util.HttpsValidator.isBaseUrlSecure(HttpsValidator.java:46) [?:?]
at com.atlassian.plugins.authentication.sso.util.ApplicationStateValidator.checkBaseUrlIsHttps(ApplicationStateValidator.java:65) [?:?]
at com.atlassian.plugins.authentication.sso.util.ApplicationStateValidator.checkSsoIsAllowed(ApplicationStateValidator.java:61) [?:?]
at com.atlassian.plugins.authentication.sso.util.ApplicationStateValidator.checkCanProcessAuthenticationRequest(ApplicationStateValidator.java:50) [?:?]
at com.atlassian.plugins.authentication.sso.util.ApplicationStateValidator.canProcessAuthenticationRequest(ApplicationStateValidator.java:40) [?:?]
.... and goes on
at java.base/java.lang.Thread.run(Thread.java:829) [?:?]
Caused by: java.net.URISyntaxException: Illegal character in scheme name at index 0: <https://JIRA_BASE_URL>
at java.base/java.net.URI$Parser.fail(URI.java:2913) [?:?]
at java.base/java.net.URI$Parser.checkChars(URI.java:3084) [?:?]
at java.base/java.net.URI$Parser.checkChar(URI.java:3094) [?:?]
at java.base/java.net.URI$Parser.parse(URI.java:3109) [?:?]
at java.base/java.net.URI.<init>(URI.java:600) [?:?]
at com.atlassian.plugins.authentication.sso.util.HttpsValidator.isBaseUrlHttps(HttpsValidator.java:59) [?:?]
... 312 more
, referer=Unknown, servletErrorMessage=}
Cause
In this specific instance, application configurations remained intact. The issue arose from the incorrect addition of angle brackets (<>) to the Jira base URL during the environment refresh process:
1
2
3
4
5
6
7
8
jira=> select propertyvalue from propertyentry PE
join propertystring PS on PE.id=PS.id
where PE.property_key = 'jira.baseurl';
propertyvalue
------------------------------
<http://jira.servername.com>
(1 row)
jira=>
Solution
Rectify the problem by directly updating the Jira Base URL in the database using the steps outlined in the article Change the Base URL of Jira server in the database.
Was this helpful?