SVN failed with svn: E175002: OPTIONS request failed on...

Issue

You are seeing this exception in console log:

Caused by: svn: E175002: OPTIONS /XXXX failed
at org.tmatesoft.svn.core.SVNErrorMessage.create(SVNErrorMessage.java:208)
... 36 more
Caused by: org.tmatesoft.svn.core.SVNException: svn: E175002: OPTIONS request failed on '/XXXX'
svn: E175002: java.lang.RuntimeException: Could not generate DH keypair
at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:64)
at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:51)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection._request(HTTPConnection.java:777)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:382)
... 35 more
Caused by: svn: E175002: OPTIONS request failed on '/XXXX'
at org.tmatesoft.svn.core.SVNErrorMessage.create(SVNErrorMessage.java:208)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection._request(HTTPConnection.java:775)
... 36 more
Caused by: svn: E175002: java.lang.RuntimeException: Could not generate DH keypair
at org.tmatesoft.svn.core.SVNErrorMessage.create(SVNErrorMessage.java:109)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection._request(HTTPConnection.java:526)
... 36 more
Caused by: javax.net.ssl.SSLException: java.lang.RuntimeException: Could not generate DH keypair
at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1697)
at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1660)
at sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1643)
at sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1569)
at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:113)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.sendData(HTTPConnection.java:323)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPRequest.dispatch(HTTPRequest.java:170)
at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection._request(HTTPConnection.java:480)
... 36 more
Caused by: java.lang.RuntimeException: Could not generate DH keypair
at sun.security.ssl.DHCrypt.<init>(DHCrypt.java:123)
at sun.security.ssl.ClientHandshaker.serverKeyExchange(ClientHandshaker.java:546)
at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:176)
at sun.security.ssl.Handshaker.processLoop(Handshaker.java:609)
at sun.security.ssl.Handshaker.process_record(Handshaker.java:545)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:945)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1190)
at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:657)
at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:108)
... 41 more
Caused by: java.security.InvalidAlgorithmParameterException: Prime size must be multiple of 64, and can only range from 512 to 1024 (inclusive)
at com.sun.crypto.provider.DHKeyPairGenerator.initialize(DHKeyPairGenerator.java:120)
at java.security.KeyPairGenerator$Delegate.initialize(KeyPairGenerator.java:644)
at sun.security.ssl.DHCrypt.<init>(DHCrypt.java:117)

Environment

  • Jenkins running on JDK up to 7
  • Jenkins Subversion plugin
  • Subversion hosted by Apache HTTP server with mod_ssl >= 2.4.7

Resolution

Quoting Apache HTTP server documentation on this problem:

Why do I get handshake failures with Java-based clients when using a certificate with more than 1024 bits?

Beginning with version 2.4.7, mod_ssl will use DH parameters which include primes with lengths of more than 1024 bits. Java 7 and earlier limit their support for DH prime sizes to a maximum of 1024 bits, however.

Please refer to Apache HTTP documentation for full resolution

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.