Health check failed due to java.lang.IllegalArgumentException: Host name may not contain blanks
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
Application links got broken after upgrading to Jira 9.0.x version. The following exception has been observed in the logs:
1
2022-07-05 11:17:58,258-0500 support-zip ERROR username 677x46401x1 17ssi72 X.X.XX.XX,XX.X.X.XX /rest/troubleshooting/latest/support-zip/local [c.a.t.healthcheck.concurrent.SupportHealthCheckProcess] Health check 'Security Vulnerabilities' failed with severity 'major': 'Exception during health check invocation java.lang.IllegalArgumentException: Host name may not contain blanks'
Environment
9.0.0
Cause
This exception has been observed after upgrading a Jira instance that was running behind a reverse proxy to the 9.0.x version.
After looking at the JAVA input arguments in the setenv.sh file, we noticed the following line:
1
JVM_SUPPORT_RECOMMENDED_ARGS="'-Dhttp.proxyHost=XX.X.X.XX -Dhttp.proxyPort=3128 -Dhttps.proxyHost=XX.X.X.XX -Dhttps.proxyPort=3128 -Dhttp.nonProxyHosts=*.xyz.org'"
Because of the apostrophe within the arguments in the setenv.sh file, the http.proxyHost property considered all the entries as a unique value as shown in the atlassian-jira.log.
1
http.proxyHost : XX.X.X.XX -Dhttp.proxyPort=3128 -Dhttps.proxyHost=XX.X.X.XX -Dhttps.proxyPort=3128 -Dhttp.nonProxyHosts=*.xyz.org
Solution
1. Stop Jira;
2. Edit the system properties and remove the apostrophe from the JVM_SUPPORT_RECOMMENDED_ARGS in the setenv.sh file as below:
1
JVM_SUPPORT_RECOMMENDED_ARGS="-Dhttp.proxyHost=XX.X.X.XX -Dhttp.proxyPort=3128 -Dhttps.proxyHost=XX.X.X.XX -Dhttps.proxyPort=3128 -Dhttp.nonProxyHosts=*.xyz.org"
3. Also ensure that there are no typos or blank spaces on each property=value;
4. Start Jira;
5. Test the application links.
Was this helpful?