falcon
falcon copied to clipboard
JRuby 9.2.13.0 falcon server crash on start
Versions:
spec.add_dependency "falcon", '~> 0.36.0'
spec.add_dependency "jruby-openssl", "0.10.5-java"
$ openssl version
LibreSSL 2.8.3
OpenSSL implementation doesn't support ALPN.
0.0s info: Falcon::Command::Serve [oid=0x7d0] [pid=50224] [2020-11-09 04:49:47 +0000]
| Falcon v0.36.6 taking flight! Using Async::Container::Forked {:count=>12}.
| - Binding to: #<Falcon::Endpoint https://localhost:9292/ {}>
| - To terminate: Ctrl-C or kill 50224
| - To reload configuration: kill -HUP 50224
0.34s error: Async::Task [oid=0x7d2] [pid=50224] [2020-11-09 04:49:47 +0000]
| NoMethodError: undefined method `alpn_select_cb=' for #<OpenSSL::SSL::SSLContext:0x2efaaf0>
| → /Users/mike/.asdf/installs/ruby/jruby-9.2.13.0/lib/ruby/gems/shared/gems/falcon-0.36.6/lib/falcon/endpoint.rb:44 in `block in build_ssl_context'
| org/jruby/RubyKernel.java:1897 in `tap'
| /Users/mike/.asdf/installs/ruby/jruby-9.2.13.0/lib/ruby/gems/shared/gems/falcon-0.36.6/lib/falcon/endpoint.rb:43 in `build_ssl_context'
| /Users/mike/.asdf/installs/ruby/jruby-9.2.13.0/lib/ruby/gems/shared/gems/falcon-0.36.6/lib/falcon/endpoint.rb:32 in `ssl_context'
| /Users/mike/.asdf/installs/ruby/jruby-9.2.13.0/lib/ruby/gems/shared/gems/async-http-0.52.5/lib/async/http/endpoint.rb:183 in `build_endpoint'
| /Users/mike/.asdf/installs/ruby/jruby-9.2.13.0/lib/ruby/gems/shared/gems/async-http-0.52.5/lib/async/http/endpoint.rb:64 in `initialize'
| /Users/mike/.asdf/installs/ruby/jruby-9.2.13.0/lib/ruby/gems/shared/gems/async-http-0.52.5/lib/async/http/endpoint.rb:208 in `block in each'
| /Users/mike/.asdf/installs/ruby/jruby-9.2.13.0/lib/ruby/gems/shared/gems/async-io-1.30.1/lib/async/io/host_endpoint.rb:90 in `block in each'
| org/jruby/RubyArray.java:1809 in `each'
| /Users/mike/.asdf/installs/ruby/jruby-9.2.13.0/lib/ruby/stdlib/socket.rb:229 in `foreach'
| /Users/mike/.asdf/installs/ruby/jruby-9.2.13.0/lib/ruby/gems/shared/gems/async-io-1.30.1/lib/async/io/host_endpoint.rb:89 in `each'
| /Users/mike/.asdf/installs/ruby/jruby-9.2.13.0/lib/ruby/gems/shared/gems/async-http-0.52.5/lib/async/http/endpoint.rb:207 in `each'
| /Users/mike/.asdf/installs/ruby/jruby-9.2.13.0/lib/ruby/gems/shared/gems/async-io-1.30.1/lib/async/io/endpoint.rb:102 in `bound'
| /Users/mike/.asdf/installs/ruby/jruby-9.2.13.0/lib/ruby/gems/shared/gems/async-io-1.30.1/lib/async/io/shared_endpoint.rb:31 in `bound'
| /Users/mike/.asdf/installs/ruby/jruby-9.2.13.0/lib/ruby/gems/shared/gems/falcon-0.36.6/lib/falcon/controller/serve.rb:68 in `block in start'
| /Users/mike/.asdf/installs/ruby/jruby-9.2.13.0/lib/ruby/gems/shared/gems/async-1.26.2/lib/async/task.rb:258 in `block in make_fiber'
0.4s error: Falcon::Command [pid=50224] [2020-11-09 04:49:47 +0000]
| NoMethodError: undefined method `alpn_select_cb=' for #<OpenSSL::SSL::SSLContext:0x2efaaf0>
| → /Users/mike/.asdf/installs/ruby/jruby-9.2.13.0/lib/ruby/gems/shared/gems/falcon-0.36.6/lib/falcon/endpoint.rb:44 in `block in build_ssl_context'
| org/jruby/RubyKernel.java:1897 in `tap'
| /Users/mike/.asdf/installs/ruby/jruby-9.2.13.0/lib/ruby/gems/shared/gems/falcon-0.36.6/lib/falcon/endpoint.rb:43 in `build_ssl_context'
| /Users/mike/.asdf/installs/ruby/jruby-9.2.13.0/lib/ruby/gems/shared/gems/falcon-0.36.6/lib/falcon/endpoint.rb:32 in `ssl_context'
| /Users/mike/.asdf/installs/ruby/jruby-9.2.13.0/lib/ruby/gems/shared/gems/async-http-0.52.5/lib/async/http/endpoint.rb:183 in `build_endpoint'
| /Users/mike/.asdf/installs/ruby/jruby-9.2.13.0/lib/ruby/gems/shared/gems/async-http-0.52.5/lib/async/http/endpoint.rb:64 in `initialize'
| /Users/mike/.asdf/installs/ruby/jruby-9.2.13.0/lib/ruby/gems/shared/gems/async-http-0.52.5/lib/async/http/endpoint.rb:208 in `block in each'
| /Users/mike/.asdf/installs/ruby/jruby-9.2.13.0/lib/ruby/gems/shared/gems/async-io-1.30.1/lib/async/io/host_endpoint.rb:90 in `block in each'
| org/jruby/RubyArray.java:1809 in `each'
| /Users/mike/.asdf/installs/ruby/jruby-9.2.13.0/lib/ruby/stdlib/socket.rb:229 in `foreach'
| /Users/mike/.asdf/installs/ruby/jruby-9.2.13.0/lib/ruby/gems/shared/gems/async-io-1.30.1/lib/async/io/host_endpoint.rb:89 in `each'
| /Users/mike/.asdf/installs/ruby/jruby-9.2.13.0/lib/ruby/gems/shared/gems/async-http-0.52.5/lib/async/http/endpoint.rb:207 in `each'
| /Users/mike/.asdf/installs/ruby/jruby-9.2.13.0/lib/ruby/gems/shared/gems/async-io-1.30.1/lib/async/io/endpoint.rb:102 in `bound'
| /Users/mike/.asdf/installs/ruby/jruby-9.2.13.0/lib/ruby/gems/shared/gems/async-io-1.30.1/lib/async/io/shared_endpoint.rb:31 in `bound'
| /Users/mike/.asdf/installs/ruby/jruby-9.2.13.0/lib/ruby/gems/shared/gems/falcon-0.36.6/lib/falcon/controller/serve.rb:68 in `block in start'
| /Users/mike/.asdf/installs/ruby/jruby-9.2.13.0/lib/ruby/gems/shared/gems/async-1.26.2/lib/async/task.rb:258 in `block in make_fiber'
I have the latest installed openssl, but anyway the message is clear - OpenSSL implementation doesn't support ALPN.
Looks like it is some JRuby related stuff. Leave it here, maybe it helps somebody.
Connect #100
Thanks for this report.
cc @headius
Some clarifications:
- JRuby's OpenSSL does not use any system libraries. It is an OpenSSL look-alike that wraps the Bouncy Castle crypto library.
- This appears to be a missing feature in https://github.com/jruby/jruby-openssl and should be filed there with a reduced reproduction (or dig up whatever tests CRuby is running for this feature.)
Until JRuby supports the fiber scheduler, we won't be able to make progress here.
So ..it's not completed?
The basics of the scheduler API are in place in 9.4.x but I have not had a chance to circle back to this. I will hopefully be able to do so this week or next.
There is no action we can take in this project to fix the reported issue. Therefore, it's neither completed or not completed. It's just GitHub's default.
When it's in place and working, I'll re-enable this test and advertise support. Looking forward to it!