The Sauce Labs Cookbook

Sauce Headless

Front End Performance Testing

Insights

External Resources

More Info


Page tree
Skip to end of metadata
Go to start of metadata

This article includes helpful tips and guidelines for troubleshooting Sauce Connect Proxy.

See the following sections for more information:

How to Generate Tunnel Logs to Help with Troubleshooting

To generate a tunnel log file, which is a great tool to troubleshoot Sauce Connect Proxy, use the –l (--logfile <file>) command-line option. The log provides details on network transactions and Sauce Connect Proxy activity.

The file will be named "sauce_connect.log." By default, Sauce Connect generates log messages to your local operating system's temporary folder. On Linux / Mac OS X, this is usually /tmp. On Windows, it varies by individual release. You can also specify a specific location for the output in the <file> of the command-line  –l (--logfile <file>).

You can enable verbose logging, which increases the logging level of Sauce Connect Proxy, but does not alter where it is sent. Just use the with the --verbose command-line. Verbose output will be sent to the Sauce Connect Proxy log file, rather than standard out. To send all logging to stdout, set a value of '-' for the --logfile command (i.e., '--logfile -') when starting Sauce Connect Proxy. 

Network Configuration with Firewalls and Proxies

Is there a firewall or proxy server in place between your machine running Sauce Connect and Sauce Labs (*.saucelabs.com:443)? You may need to allow access in your firewall rules or configure Sauce Connect to use an additional proxy.

Sauce Connect Proxy needs to establish outbound connections to both saucelabs.com (162.222.73.28) on port 443 and to a tunnel VM with an IP in the Sauce Labs ranges (162.222.72.0/21, 66.85.48.0/21, 185.94.24.0/22).

For information on setting up Sauce Connect Proxy within various network environments, see Sauce Connect and Network Security and What Not to Do: Common Mistakes in Sauce Connect Proxy Network Configurations.

Checking Network Connectivity to Sauce Labs

Make sure that saucelabs.com is accessible from the machine running Sauce Connect Proxy. This can be tested by issuing a ping, telnet or cURL command to saucelabs.com from the machine's command line interface. If any of these commands fail, you should work with your internal network team to resolve them.

ping Method for Checking Network Connectivity
ping saucelabs.com
telnet Command for Checking Network Connectivity
telnet saucelabs.com 443 

This command should return an IP address of 162.222.73.2.

cURL Method for Checking Connectivity
curl -v https://saucelabs.com/ 

This command should return the status message connected to saucelabs.com.

SSL Bumping

To combat test failures caused by websites without valid SSL certificates, Sauce Connect Proxy has a security feature called SSL Bumping that automatically re-signs certificates in the course of testing.

SSL Bumping is enabled by default when you download Sauce Connect Proxy. However, depending on your test scenario, SSL Bumping may occasionally cause problems for some sites. You can disable SSL Bumping for some or all domains by adding the -B all flag to your Sauce Connect Proxy startup commands. For more information on SSL Bumping and scenarios that would warrant disabling it, see Sauce Connect Proxy and SSL Certificate Bumping.

Errors Running Tests Through Sauce Connect Proxy on CORS-Enabled Sites

Cross-Origin Resource Sharing (CORS) errors could be caused by a variety of reasons. We recommend the following solutions:

  • Make sure that the ulimit/open file limit of your machine is at least 8000, which is the recommend value for Sauce Connect Proxy use
  • Start a Sauce Connect Proxy instance using the -B all and -N flags. For more information about what these flags do for your tunnel, please see Sauce Connect Proxy Command-Line Quick Reference Guide.

Additional Support

If you're still experiencing Sauce Connect Proxy test failures, try the diagnostic steps under Sauce Connect Proxy Debugging and Diagnostics with --doctor flag.

More Information