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

"Could not generate DH keypair" on HTTPS connections #2599

Open
rb2k opened this issue Feb 14, 2015 · 3 comments
Open

"Could not generate DH keypair" on HTTPS connections #2599

rb2k opened this issue Feb 14, 2015 · 3 comments

Comments

@rb2k
Copy link

rb2k commented Feb 14, 2015

I tried running a custom little webcrawler I run on jruby 9k and just received this exception:

RuntimeError: Could not generate DH keypair
/home/[...]/launcher.rb:291launcher.rb_CLOSURE_16_CLOSURE_17_CLOSURE_18__launcher.rb_CLOSURE_16_CLOSURE_17_17

The stack trace was just 2 lines and pointing on a Thread.new, but not a specific code path.

Some domains that this apparently happened with: cedric-heleinstituut.be, 13iacc.org, ubmstudios.com
I can't seem to reproduce it.

In general, It seems to be a JVM problem. I see comments about this in code over here and a mention over here:
"This is a well-known problem between JVM clients and recent mod_ssl versions, as the DH prime length supported by the JVM is limited."

I am not quite sure if this occurs when using net-http or rjack-async-httpclient, but I thought it might be worth filing an issue in case anyone else runs into it that has a bit more information

@headius
Copy link
Member

headius commented Mar 12, 2015

No way to reproduce?

@rb2k
Copy link
Author

rb2k commented Mar 12, 2015

I sadly haven't found a way yet :(

@atambo
Copy link
Member

atambo commented Mar 13, 2015

http://stackoverflow.com/questions/6851461/java-why-does-ssl-handshake-give-could-not-generate-dh-keypair-exception

Seems like older versions of java 7/java 8 don't support certificate keys greater then 1024. Maybe try upgrading to a newer version of java 7/java 8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants