Skip to content

Instantly share code, notes, and snippets.

@mperham
Created February 15, 2024 00:26
Show Gist options
  • Save mperham/8430d1d59b676e7c6c8a0846563d9ca2 to your computer and use it in GitHub Desktop.
Save mperham/8430d1d59b676e7c6c8a0846563d9ca2 to your computer and use it in GitHub Desktop.
OpenSSL error handled despite not being required?!?!?!
irb(main):004> OpenSSL
(irb):4:in `<main>': uninitialized constant OpenSSL (NameError)
Did you mean? OpenStruct
from /Users/mperham/.gem/ruby/3.2.0/gems/irb-1.10.1/exe/irb:9:in `<top (required)>'
from /Users/mperham/.gem/ruby/3.2.0/bin/irb:25:in `load'
from /Users/mperham/.gem/ruby/3.2.0/bin/irb:25:in `<main>'
irb(main):005> ENV["FAKTORY_URL"] = "tcp+tls://test.contribsys.com:7419"
=> "tcp+tls://test.contribsys.com:7419"
irb(main):006> f = Faktory::Client.new
/Users/mperham/src/fwr/lib/faktory/client.rb:318:in `rescue in open_socket': Server not using TLS? Use FAKTORY_URL=tcp://... to disable encryption (RuntimeError)
from /Users/mperham/src/fwr/lib/faktory/client.rb:258:in `open_socket'
from /Users/mperham/src/fwr/lib/faktory/client.rb:66:in `initialize'
from (irb):6:in `new'
from (irb):6:in `<main>'
from /Users/mperham/.gem/ruby/3.2.0/gems/irb-1.10.1/exe/irb:9:in `<top (required)>'
from /Users/mperham/.gem/ruby/3.2.0/bin/irb:25:in `load'
from /Users/mperham/.gem/ruby/3.2.0/bin/irb:25:in `<main>'
/Users/mperham/src/fwr/lib/faktory/client.rb:272:in `connect': SSL_connect returned=1 errno=0 peeraddr=127.0.0.1:7419 state=error: wrong version number (OpenSSL::SSL::SSLError)
from /Users/mperham/src/fwr/lib/faktory/client.rb:272:in `block in open_socket'
from <internal:kernel>:90:in `tap'
from /Users/mperham/src/fwr/lib/faktory/client.rb:269:in `open_socket'
from /Users/mperham/src/fwr/lib/faktory/client.rb:66:in `initialize'
from (irb):6:in `new'
from (irb):6:in `<main>'
from /Users/mperham/.gem/ruby/3.2.0/gems/irb-1.10.1/exe/irb:9:in `<top (required)>'
from /Users/mperham/.gem/ruby/3.2.0/bin/irb:25:in `load'
from /Users/mperham/.gem/ruby/3.2.0/bin/irb:25:in `<main>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment