Skip to main content
Code42 Support

Proxy Connection Problems When Using A PAC File

Applies to:
  • Code42 CrashPlan (previously CrashPlan PROe)

Overview

You can specify a proxy auto-config (PAC) file to define what proxies the CrashPlan app should use to connect to its destinations. When PAC files are used to direct calls to a proxy server in CrashPlan 5.3 and 5.4, primary addresses are resolved into IP addresses, and this can prevent CrashPlan apps from connecting to destinations.

Affects

CrashPlan app version 5.3 and later

Background

The application resolves the primary address into IP addresses to give more granular control over the connection and also to allow the system to try multiple addresses rather than rely on the default preference. When the system asks the PAC file for proxy servers, the IP address is passed instead of the unresolved primary address, causing the connection to fail.

Identify the problem

  1. If you use PAC files in your Code42 environment, and CrashPlan apps cannot connect to destinations, check the log files. If you find either of the following errors in the log files, it is possible your Code42 environment has the problem:
"PROXY:: No proxies available, connecting to real location"

"Cancelling connection attempt due to timeout - pending connection=PendingConnection[timeout(ms) = 3000
  1. Examine your PAC files to locate the source of the problem. The problem only occurs when a PAC file specifies a non-IP host with logic similar to the following:
function FindProxyForURL(url, host)
{
    if (dnsDomainIs(host, ".samplehost.com"))
        return “PROXY myproxy.example.com:18000”;

    return “DIRECT”
}

Note that the PAC file specifies an unresolved host name (that is, non-IP): ".samplehost.com". Perform the recommended solution below to resolve the host name to corresponding IP addresses.

Recommended solution

Write logic into the PAC file to resolve the primary or secondary addresses to point to the corresponding IP addresses, for example:

function FindProxyForURL(url, host)
{
    var resolved_ip = dnsResolve(host);
  
    if (dnsDomainIs(host, ".samplehost.com") ||
        isInNet(resolved_ip, “1.2.3.0”, "255.255.255.0”) ||
        isInNet(resolved_ip, “2.3.4.0”, "255.255.255.0”))
        return “PROXY myproxy.example.com:18000”;
 
    return “DIRECT”
}

Note that the PAC file now provides the corresponding IP addresses for the host.
The IP addresses in the example are for demonstration purposes only.

Contact support for IP addresses
If you have PAC files that connect to the Code42 cloud, contact our Customer Champions to obtain the full range of IP addresses to include in the PAC file.

External resources

  • Was this article helpful?