Application links health check fails with error message 'The health check was unable to complete within the timeout of 20000ms'
Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.
Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles 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
The health check for Application Links fails with the error message below:
The health check was unable to complete within the timeout of 20000ms.
This error does not seem to affect the application link functionality itself; existing application links should still work correctly despite the health check error.
Environment
Any Jira version.
Diagnosis
- Support zips generated from the affected Jira instance will show the failing health check like this:
Name: Application links
Is healthy: false
Failure reason: The health check was unable to complete within the timeout of 20000ms.
Severity: UNDEFINED
- Application logs will show these messages:
2021-03-04 20:04:41,999+0000 HealthCheckWatchdog:thread-8 WARN ServiceRunner [c.a.t.healthcheck.concurrent.SupportHealthCheckTask] Health check Application links was unable to complete within the timeout of 20000.
- There should be at least one incoming OAuth application link set up so external applications can authenticate to Jira using OAuth, as described in https://developer.atlassian.com/server/jira/platform/oauth/
<application-links>
<id>f8490a48-ea2b-3c57-b14d-1afe102003a1</id>
<name>Example incoming OAuth</name>
<primary>true</primary>
<type>applinks.generic</type>
<display-url>https://example.com:443</display-url>
<rpc-url>https://example.com:443</rpc-url>
</application-links>
</application-links>
Cause
If an incoming OAuth application link is not reachable via TCP using its URL, the health check will fail, causing the issue. This happens because the health check assumes every application link URL should be reachable, which is not true for those set up for incoming OAuth requests only.
This is ultimately caused by a bug in the bundled app Atlassian Troubleshooting and Support Tools, and has being fixed on version 1.13.2:
Solution
Update the app to the latest version.
Alternatively, you can make sure Jira is able to reach the URL specified in the incoming OAuth application link via TCP. This can be tested using telnet or other network utility after the changes to the networking infrastructure have been made.
If the URL is not reachable via TCP at all, it is possible to work around the issue by setting up DNS entries or adding a line hosts file of each node, so the hostname will resolve to 127.0.0.1.
Here's an example on how such an entry would look in Linux /etc/hosts file:
127.0.0.1 example.com