Health check failed due to java.lang.IllegalArgumentException: Host name may not contain blanks

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

Summary

Application links got broken after upgrading to Jira 9.0.x version. The following exception has been observed in the logs:

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:

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.

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:

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.


Last modified on Nov 4, 2022

Was this helpful?

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