Skip to main content
Skip table of contents

Could Not Connect 'Read timed out' when authenticating to Jira

For Jira Server and Jira Data Center

Problem

The following message appears when trying to authenticate (sign in) to Jira from Salesforce:

"Could Not Connect. Read timed out"


Cause

  • Salesforce is not able to access Jira.  The likely cause is that Jira is not accessible to Salesforce IP addresses. It can be confirmed by running the script provided below in the Developer Console and checking the logs for Anonymous Apex execution (Read timed out or similar).

Diagnosis

  1. Jira Server or Jira Datacenter is not accessible to Salesforce whitelisted IP Addresses listed here https://help.salesforce.com/s/articleView?id=000321501&type=1
  2. To test/validate connectivity between your Salesforce and Jira instances you can run the script below in Salesforce Anonymous Apex (replace the Jira URL,  run and check the logs).  This script executes outside of zAgileConnect.

    CODE
    HttpRequest req = new HttpRequest();
     Http http = new Http();
     //Set HTTPRequest Method
      req.setMethod('GET');
      req.setEndpoint( 'https://jira.example.com/rest/api/2/serverInfo');
    req.setHeader('Accept', 'application/json');
    req.setHeader('content-type', 'application/json');
     http = new Http();
     
      try {
    
           //Execute web service call here        
           HTTPResponse res = http.send(req);    
    
           //Helpful debug messages
            System.debug(res.toString());
            System.debug('GET STATUS:'+res.getStatus());
            System.debug('GET STATUS_CODE:'+res.getStatusCode());
            System.debug('GET BODY:'+res.getBody());
    
           
    } catch(System.CalloutException e) {
            System.debug('EX:'+ e.getMessage());
    }
  3. You can also look at your Firewall server logs to see if Salesforce IPs are getting blocked when trying to authenticate to Jira from Salesforce.

Resolution

Salesforce recommends whitelisting all the IP ranges here https://help.salesforce.com/s/articleView?id=000321501&type=1

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.