Jira Align fails to sync all its projects with the error: The underlying connection was closed
Summary
How to troubleshoot once a Jira Align instance fails to sync all its projects at the same time and faces this error on its API calls to Jira:
The underlying connection was closed:
An unexpected error occurred on a receive {...}
An existing connection was forcibly closed by the remote host
Environment
Jira Align
Diagnosis
When checking Admin > Jira Settings > Manage Projects, all the Projects are presenting the Yellow alert message in front of them and no sync from Align to Jira is possible, as confirmed by the customer;
Cause
The cause of this error is networking middleware such as a gateway, proxy, firewall, etc which is blocking or creating noise over the packets between the Jira Connector and the Jira API endpoint.
Solution
- First, check if the Customer has an API Gateway into Administration > Jira Settings > Jira Connectors.
- If so, in order to make sure the customer's Jira Instance is running properly you can request them to execute a Jira Health check into their browser.
https://<Jira URL>/rest/api/latest/serverInfo?doHealthCheck=True
This API call checks if Jira is running properly and once they execute it from a Browser source they would be passing this API directly to Jira avoiding any middleware component like a Gateway for instance.
In case of a positive answer, it means that Jira is accepting API calls and working as expected. Confirming that there is something strange on the communication from Connector to Jira.- Get in contact with the internal team of your application to check the middleware that exists between JA and Jira, so they can check what is being received there and passed downstream.