It's not a secret anymore!*
The moose likes Java in General and the fly likes SSLHandshake failure with rmi Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "SSLHandshake failure with rmi" Watch "SSLHandshake failure with rmi" New topic
Author

SSLHandshake failure with rmi

rangam
Greenhorn

Joined: Jan 17, 2005
Posts: 4
Hi All,
I would really like you to help me with this problem which i am facing,
as soon as possible. I am new to the SSl world. I have a rmi Client and
server which uses connections through SslRMIServerSocketFactory and
SslRMIClientSocketFactory. The server that i have created starts fine.
When i start the client using the same truststore, policy and password
as what i was using for the keystore,policy and password of the client
it gives me a fatal Handshake error.
the error messages that i get are as follows :



D:\>java -Djava.security.manager
-Djava.security.policy=c:\tomcat\security.policy
-Djavax.net.ssl.truststore=d:\tomcat\.tomcat.keystore
-Djavax.net.ssl.truststorePassword=password RmiClient

error during JRMP connection establishment; nested exc
eption is:javax.net.ssl.SSLHandshakeException: Received fatal alert:
handshake_failure
java.rmi.ConnectIOException: error during JRMP connection
establishment; nested exception is:
javax.net.ssl.SSLHandshakeException: Received fatal alert:
handshake_failure
at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown
Source)
at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown
Source)
at sun.rmi.server.UnicastRef.invoke(Unknown Source)
at
java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(Unknown
Source)
at java.rmi.server.RemoteObjectInvocationHandler.invoke(Unknown
Source)
at $Proxy0.sendMessage(Unknown Source)
at com.cisco.e911.cerservices.RmiClient.main(RmiClient.java:24)
Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert:
handshake_failure
at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown
Source)
at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown
Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.recvAlert(Unknown
Source)
at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)

at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown
Source)
at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(Unknown Source)
at com.sun.net.ssl.internal.ssl.AppOutputStream.write(Unknown
Source)
at java.io.BufferedOutputStream.flushBuffer(Unknown Source)
at java.io.BufferedOutputStream.flush(Unknown Source)
at java.io.DataOutputStream.flush(Unknown Source)
.. 7 more

and this is when i run the sever as:

D:\>java -Djava.security.manager
-Djavax.net.ssl.keystore=C:\tomcat\certs\.tomcat.keystore
-Djavax.net.ssl.keystorePassword=password -Djava.security.
policy=c:\tomcat\security.policy RmiServer

Also i would like to know how the handshake is supposed to happen
between the client and the server.

Thanks in advance.
Arun
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SSLHandshake failure with rmi
 
Similar Threads
LDAP Connection
javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
SSLHandshakeException
SSLHandshakeException
2-way ssl not working: bad certificate