Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retry connect/disconnect after timeout? #35

Closed
geekdave opened this issue Oct 2, 2014 · 4 comments · Fixed by #54
Closed

Retry connect/disconnect after timeout? #35

geekdave opened this issue Oct 2, 2014 · 4 comments · Fixed by #54

Comments

@geekdave
Copy link
Contributor

geekdave commented Oct 2, 2014

Sometimes SauceConnect just hangs, non-responsive on either the connection or disconnection process. Would it be possible to set a timeout, and retry the connect/disconnect process if no response received?

@bermi
Copy link
Owner

bermi commented Dec 7, 2014

I hear your frustration with timeouts but it is going to be really hard for us to to guess when sc is responsive or not without false positives.

Have you had a chance to investigate how to detect when things are timing out?

@geekdave
Copy link
Contributor Author

One common case is when I get this in the console output:

22 Dec 17:06:55 - GET https://saucelabs.com/rest/v1/jdoe/tunnels/4d8667d53bec41a99374e62b48dd924e: Timeout was reached.
22 Dec 17:06:55 - Error bringing up tunnel VM.

Would it be possible to detect this message in the output and retry if found?

aearly added a commit that referenced this issue Mar 29, 2015
@aearly
Copy link
Collaborator

aearly commented Mar 29, 2015

I just published v0.10.3 which should handle that error output properly. You then could use something like async.retry to try again if that error occurs.

async.retry(3, launchSauceConnect.bind(null, scOptions), function (err) {
  if (err) {
    throw new Error("Sauce Connect failed to launch after 3 retries, error: " + err.message);
  }
  // sauce connect ready
})

@geekdave
Copy link
Contributor Author

Still seeing one more instance of an unhandled error:

Starting Selenium listener...
Establishing secure TLS connection to tunnel...
Failed to start Selenium listener (exit code 2).
Please check logfile for more information.
Sauce Connect could not establish a connection.

This one happens rarely, but often enough to be noticeable, when running multiple tunnels. PR incoming...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants