Jira EOL check causes health check to be unable to lookup the version when marketplace is not available and the json file is deleted

Description

Summary

The instance health plugin adds a check for the presence of jira-healthcheck-eol.json in your JIRA home directory to check EOL date. If that file is not present on the system and the system cannot reach the marketplace to check EOL the health check plugin will not run and will throw an error of 'there was an error performing the instance health check' in the GUI.

Steps to Reproduce

  1. Install the latest ATST plugin

  2. Check that jira-healthcheck-eol.json does not exist in $JIRA_HOME

  3. Remove the ability of the system to connect to the marketplace

  4. Check the instance health tab in Jira

Expected Results

The check does not fail if the file does not exist, as the data is persisted somewhere else (e.g.: in the database) or the file is recreated automatically.

Actual Results

The error "Unable to verify the End of Life date for version '5.8'. The check has not been performed." is returned, instead of performing the health check. An exception such as the below will appear in the logs:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 2016-12-20 10:56:47,436 ERROR [SupportHealthCheckThread-5] [plugins.healthcheck.eol.EolSupportHealthCheck] check An error occurred when performing the EOL check, see the exceptions for more info java.net.UnknownHostException: marketplace.atlassian.com: nodename nor servname provided, or not known at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928) at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323) at java.net.InetAddress.getAllByName0(InetAddress.java:1276) at java.net.InetAddress.getAllByName(InetAddress.java:1192) at java.net.InetAddress.getAllByName(InetAddress.java:1126) at org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:45) at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:111) at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353) at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55) at com.atlassian.confluence.plugins.healthcheck.util.SupportEolCheckUtil.makeRequestToMarketplace(SupportEolCheckUtil.java:174) at com.atlassian.confluence.plugins.healthcheck.util.SupportEolCheckUtil.getLatestConfluenceVersionName(SupportEolCheckUtil.java:148) at com.atlassian.confluence.plugins.healthcheck.util.SupportEolCheckUtil.getVersionFromMarketplace(SupportEolCheckUtil.java:50) at com.atlassian.confluence.plugins.healthcheck.eol.EolSupportHealthCheck.getVersionFromMarketplace(EolSupportHealthCheck.java:158) at com.atlassian.confluence.plugins.healthcheck.eol.EolSupportHealthCheck.check(EolSupportHealthCheck.java:93) at com.atlassian.support.healthcheck.impl.PluginSuppliedSupportHealthCheck.check(PluginSuppliedSupportHealthCheck.java:41) at com.atlassian.support.healthcheck.concurrent.SupportHealthCheckTask.run(SupportHealthCheckTask.java:33) at com.atlassian.support.healthcheck.concurrent.SupportHealthCheckProcess.run(SupportHealthCheckProcess.java:43) at com.atlassian.support.healthcheck.thread.HealthCheckProcessCallable.call(HealthCheckProcessCallable.java:44) at com.atlassian.support.healthcheck.thread.HealthCheckProcessCallable.call(HealthCheckProcessCallable.java:20) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)

Workaround

Download the attached

and put it in your $JIRA_HOME directory.

Environment

None

Testing Notes

None

Status

Assignee

Unassigned

Reporter

Mark Symons

Labels

Add-on Type

None

Team

None

CC

None

Risk factor

None

QA Kickoff Status

None

QA Demo Status

None

Affected Product/s

Jira

Fix versions

Priority

Major
Configure