In JIRA 7.1 when accessing the Dashboard, JIRA gadgets use themselves as proxy, with the fully resolvable host name - so the JIRA instance needs to be able to access itself. If it's not able to do so (for example basic auth on a proxy layer, the domain name is not resolvable, it's served on an IP that's in a separate restricted subnet to the server JIRA is running on or JIRA is served with a self-signed certificate that doesn't exist in its own trust store) this error will occur.
Implement healthcheck in JIRA which will connect to BaseURL, mimicking call which will be done for gadgets. This will help in troubleshooting the problem.
Use curl command from JIRA server: