SSL Handshake Error using Java -
i trying connect java client jmx server using ssl certificate.
but unfortunately connection gives ssl handshake error. when tried debug this, using -djavax.net.debug=all
flag, following error message on java client.
2016-07-15t13:29:50.02-0700 [app/0] out rmi renewclean-[10.200.0.27:44445,javax.rmi.ssl.sslrmiclientsocketfactory@305a99f7], read: tlsv1.2 alert, length = 2
2016-07-15t13:29:50.02-0700 [app/0] out rmi renewclean-[10.200.0.27:44445,javax.rmi.ssl.sslrmiclientsocketfactory@305a99f7], recv tlsv1 alert: fatal, handshake_failure
2016-07-15t13:29:50.02-0700 [app/0] out rmi renewclean-[10.200.0.27:44445,javax.rmi.ssl.sslrmiclientsocketfactory@305a99f7], called closesocket()
2016-07-15t13:29:50.02-0700 [app/0] out rmi renewclean-[10.200.0.27:44445,javax.rmi.ssl.sslrmiclientsocketfactory@305a99f7], handling exception: javax.net.ssl.sslhandshakeexception: received fatal alert: handshake_failure
when change client else, jconsole, connection works fine using same ssl certificate , truststore, indicates there nothing wrong ssl certificate or domain connecting to.
it seems handshake failing due incorrect tls version types.
my client running on java7 using tls version 1, while server running java8 using tls version 1.2.
check oracle blog, mentions java8 default use tls version 1.2
so, when upgraded client use java8, issue got resolved.
hope, helps else well.
Comments
Post a Comment