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

Connection errors when there should be warnings #198

Closed
QuintinWillison opened this issue Apr 28, 2020 · 1 comment
Closed

Connection errors when there should be warnings #198

QuintinWillison opened this issue Apr 28, 2020 · 1 comment
Assignees
Labels
bug Something isn't working. It's clear that this does need to be fixed.

Comments

@QuintinWillison
Copy link
Contributor

QuintinWillison commented Apr 28, 2020

Reported by customer connecting to Ably "via the GraphQL ruby server's subscription".

https://graphql.pro/
https://graphql-ruby.org/subscriptions/ably_implementation.html

@mattheworiordan discussed the issue with the customer on Intercom (internal conversation). Specifically, Matt stated "You should have seen warnings, but not experienced errors".

Customer log output:

Ably::Exceptions::ConnectionError
and then SSL_connect SYSCALL returned=5 errno=0 state=unknown state (OpenSSL::SSL::SSLError) (code: 80000, base exception: Faraday::ConnectionFailed) -> see https://help.ably.io/error/80000 for help < SSL_connect SYSCALL returned=5 errno=0 state=unknown state (OpenSSL::SSL::SSLError)

Ruby stack track (full path redacted):

/.../ruby/2.6.0/gems/ably-rest-1.1.0/lib/submodules/ably-ruby/lib/ably/rest/client.rb:601:in `rescue in send_request'
/.../ruby/2.6.0/gems/ably-rest-1.1.0/lib/submodules/ably-ruby/lib/ably/rest/client.rb:541:in `send_request'
/.../ruby/2.6.0/gems/ably-rest-1.1.0/lib/submodules/ably-ruby/lib/ably/rest/client.rb:524:in `block in raw_request'
/.../ruby/2.6.0/gems/ably-rest-1.1.0/lib/submodules/ably-ruby/lib/ably/rest/client.rb:609:in `reauthorize_on_authorization_failure'
/.../ruby/2.6.0/gems/ably-rest-1.1.0/lib/submodules/ably-ruby/lib/ably/rest/client.rb:523:in `raw_request'
/.../ruby/2.6.0/gems/ably-rest-1.1.0/lib/submodules/ably-ruby/lib/ably/rest/client.rb:294:in `get'
/.../ruby/2.6.0/gems/ably-rest-1.1.0/lib/submodules/ably-ruby/lib/ably/rest/presence.rb:43:in `get'
/.../ruby/2.6.0/gems/graphql-pro-1.10.4/lib/graphql/pro/ably_subscriptions.rb:14:in `block in execute_all'
/.../ruby/2.6.0/gems/graphql-pro-1.10.4/lib/graphql/pro/subscriptions/redis_storage.rb:65:in `block in each_subscription_id'
/.../ruby/2.6.0/gems/graphql-pro-1.10.4/lib/graphql/pro/subscriptions/redis_storage.rb:60:in `each'
/.../ruby/2.6.0/gems/graphql-pro-1.10.4/lib/graphql/pro/subscriptions/redis_storage.rb:60:in `each_subscription_id'
/.../ruby/2.6.0/gems/graphql-pro-1.10.4/lib/graphql/pro/ably_subscriptions.rb:12:in `execute_all'
/.../ruby/2.6.0/gems/graphql-1.9.4/lib/graphql/subscriptions.rb:69:in `trigger'to which Matt observed:

Mm, odd, I would have expected in STDOUT to see some logs on retries etc. too

But the customer confirmed what they were seeing with:

3[31mERROR#033[0m Ably::Rest::Client - Request FAILED after 0 retry for get /channels/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/presence {:limit=>100} (seq #JygtaQ, time elapsed 59.33s)

and:

We're using a proxy, and I believe we are now using persistent connections but ... I am not 100% sure.

@QuintinWillison QuintinWillison added bug Something isn't working. It's clear that this does need to be fixed. investigate labels Apr 28, 2020
@TheSmartnik
Copy link
Contributor

The issue seems to be caused by the fact that proxy server client had used could only handle TLS 1.0 with cipher which no longer enabled by default in ruby (StackOverflow). However, we've changed our default client to typhoes (uses libcurl underneath) so the problem shouldn't happen again.

To sum up:

  1. This error shouldn't be a warning. Ably client couldn't connect to the server and the fix in code would have been required
  2. Since we've changed our middleware, the issue should no longer appear

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working. It's clear that this does need to be fixed.
Development

No branches or pull requests

2 participants