Skip to content

Ruby Server SDK fails to communicate with stream.launchdarkly.com due to openssl version #333

@olbrich

Description

@olbrich

Describe the bug
After upgrading openssl (via brew), the LaunchDarkly ruby sdk started failing to communicate with the streaming servers, falling back to default values for all flags.

To reproduce

Install the versions of ruby/openssl where the problem appeared:

ruby -v
ruby 3.3.7 (2025-01-15 revision be31f993d7) [arm64-darwin24]
❯ openssl --version
OpenSSL 3.6.0 1 Oct 2025 (Library: OpenSSL 3.6.0 1 Oct 2025)
brew upgrade openssl

Expected behavior

The client works as expected

Logs

I, [2025-10-08T13:55:55.757665 #11786]  INFO -- : Connecting to event stream at https://stream.launchdarkly.com/all
W, [2025-10-08T13:55:55.811145 #11786]  WARN -- : [LDClient] Error sending events: #<OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 peeraddr=3.235.70.245:443 state=error: certificate verify failed (unable to get certificate CRL)>.
W, [2025-10-08T13:55:55.811228 #11786]  WARN -- : [LDClient] Will retry posting events after 1 second
W, [2025-10-08T13:55:55.896731 #11786]  WARN -- : Unexpected error from event source: #<OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 peeraddr=34.193.139.161:443 state=error: certificate verify failed (unable to get certificate CRL)>
D, [2025-10-08T13:55:55.898804 #11786] DEBUG -- : Exception trace: ["/Users/kolbrich/.asdf/installs/ruby/3.3.7/lib/ruby/gems/3.3.0/gems/http-5.3.1/lib/http/timeout/per_operation.rb:32:in `connect_nonblock'", "/Users/kolbrich/.asdf/installs/ruby/3.3.7/lib/ruby/gems/3.3.0/gems/http-5.3.1/lib/http/timeout/per_operation.rb:32:in `block (2 levels) in connect_ssl'", "/Users/kolbrich/.asdf/installs/ruby/3.3.7/lib/ruby/gems/3.3.0/gems/http-5.3.1/lib/http/timeout/null.rb:72:in `rescue_writable'", "/Users/kolbrich/.asdf/installs/ruby/3.3.7/lib/ruby/gems/3.3.0/gems/http-5.3.1/lib/http/timeout/per_operation.rb:31:in `block in connect_ssl'", "/Users/kolbrich/.asdf/installs/ruby/3.3.7/lib/ruby/gems/3.3.0/gems/http-5.3.1/lib/http/timeout/null.rb:64:in `rescue_readable'", "/Users/kolbrich/.asdf/installs/ruby/3.3.7/lib/ruby/gems/3.3.0/gems/http-5.3.1/lib/http/timeout/per_operation.rb:30:in `connect_ssl'", "/Users/kolbrich/.asdf/installs/ruby/3.3.7/lib/ruby/gems/3.3.0/gems/http-5.3.1/lib/http/timeout/null.rb:39:in `start_tls'", "/Users/kolbrich/.asdf/installs/ruby/3.3.7/lib/ruby/gems/3.3.0/gems/http-5.3.1/lib/http/connection.rb:170:in `start_tls'", "/Users/kolbrich/.asdf/installs/ruby/3.3.7/lib/ruby
/gems/3.3.0/gems/http-5.3.1/lib/http/connection.rb:45:in `initialize'", "/Users/kolbrich/.asdf/installs/ruby/3.3.7/lib/ruby/gems/3.3.0/gems/http-5.3.1
/lib/http/client.rb:70:in `new'", "/Users/kolbrich/.asdf/installs/ruby/3.3.7/lib/ruby/gems/3.3.0/gems/http-5.3.1/lib/http/client.rb:70:in `perform'",
"/Users/kolbrich/.asdf/installs/ruby/3.3.7/lib/ruby/gems/3.3.0/gems/http-5.3.1/lib/http/client.rb:31:in `request'", "/Users/kolbrich/.asdf/installs/ru
by/3.3.7/lib/ruby/gems/3.3.0/gems/ld-eventsource-2.2.6/lib/ld-eventsource/client.rb:265:in `block in connect'", "<internal:kernel>:187:in `loop'", "/U
sers/kolbrich/.asdf/installs/ruby/3.3.7/lib/ruby/gems/3.3.0/gems/ld-eventsource-2.2.6/lib/ld-eventsource/client.rb:254:in `connect'", "/Users/kolbrich
/.asdf/installs/ruby/3.3.7/lib/ruby/gems/3.3.0/gems/ld-eventsource-2.2.6/lib/ld-eventsource/client.rb:227:in `run_stream'", "/Users/kolbrich/.asdf/ins
talls/ruby/3.3.7/lib/ruby/gems/3.3.0/gems/ld-eventsource-2.2.6/lib/ld-eventsource/client.rb:144:in `block in initialize'"]

SDK version

8.11.0

OS/platform

Mac, but probably fails on others as well.

Additional context

There is a known bug related to this in openssl.

ruby/openssl#949

Tip

Adding gem "openssl", "~> 3.3" to the Gemfile fixes this problem. Also downgrading the openssl version works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions