-
Notifications
You must be signed in to change notification settings - Fork 914
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
Running JRuby 9.4 and Puma with SSL #7736
Comments
it's a known incompatibility with binaries compiled on a newer Java, see #5499 but this has to be fixed in the Puma repo https://github.com/puma/puma/blob/master/ext/puma_http11/org/jruby/puma/MiniSSL.java#L76 for now, the easiest workaround is upgrading the Java version to 9+ if you can... |
Hi @ahorek, thank you for your response. I have tried with open JDK Amazon Corretto 11.0.18 as following: For JRuby 9.4.2, I installed from the windows executable file (https://s3.amazonaws.com/jruby.org/downloads/9.4.2.0/jruby_windows_x64_9_4_2_0.exe). Just wonder whether this executable file is compiled with which version of Java? Or does it matter? Thank you. |
does either way, it's a bug and the fix should be trivial. I'm not sure if 5.6.x is still supported, it could take some time for a new release... |
could you test puma/puma#3109 ?
|
Hi @ahorek, Try to run bundle install after adding gem 'puma', git: 'https://github.com/ahorek/puma.git', branch: 'java8' and encountered the attached error: Did i miss anything? Thank you. |
ahh, Puma doesn't support building the JRuby version directly from the git repo. Never mind, here's a manual build:
|
Hi @ahorek, Adding this line on Gemfile: and bundle install run ok with Gemfile.lock looks as this: Puma output on startup: Thank you. |
ok, but it's a different place, maybe there's another gem with the same issue? (not clear where it comes from without a proper backtrace) I suspect it could be nio4j, basically the same story: |
Hi @ahorek, Are you a contributor for nio4r as well ? If you do, may you help to fix it there as well ? Thank you, really appreciate your help. |
@treviateo both puma & nio4j have been released with compatibility fixes. Could you test it again if you still getting the same error? |
Hi @ahorek, Thank you for your reply. Just updated to puma 6.2.1, but still encounter the issue when trying to curl https://127.0.0.1:9292 -v or access the url https://localhost:9292 from browser: Please let me know if you notice something that I probably miss. Thank you. |
we need a more verbose backtrace. What gem is using the bytebuffer and where. It could also be some piece of code in JRuby itself. I'll see if I can simulate the issue tomorrow. |
fixed by #7742 |
Hi All,
I am trying to run JRuby 9.4.2.0 with ruby 3.1 and puma 5.6.5 with SSL.
System Configuration:
JRuby: 9.4.2.0
Puma: 5.6.5
Open JDK: 1.8.0_322
I downloaded the sample keystore from https://github.com/puma/puma/blob/429d17bca11f8d22dcc1434c9f6ac826a06fa836/examples/puma/keystore.jks, password blahblah. And converted it to PKCS12 format.
The keystore looks ok as following:
When running JRuby with Puma and SSL binding as following:
C:\jruby-9.4.2.0\bin\jruby.exe C:[path_to_puma]\bin\puma -b "ssl://127.0.0.1:9292?keystore=C:.ssl\keystore&keystore-pass=blahblah&verify_mode=none" -q -p 9191
the server starts up ok as following:
However when trying to curl (curl https://localhost:9292 -v), it failed as following:
And on the server console, this error keep popping up everytime the curl command is entered:
Error reached top of thread-pool: java.nio.ByteBuffer.clear()Ljava/nio/ByteBuffer; (Java::JavaLang::NoSuchMethodError)
Does anyone have a hunch about this and could help with this issue? Thank you.
The text was updated successfully, but these errors were encountered: