• Post Reply Bookmark Topic Watch Topic
  • New Topic

Jeresy "handshake_failure" error  RSS feed

 
Priyanka Padukone
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a script that would hit a web service using Jersey (input to the web service call is a Json request). It was working fine until the Mutual Authentication was implemented and my script needed to handle the exchange of certs. Inputting the VM parameters in the eclipse (-Djavax.net.ssl.trustStore, -Djavax.net.ssl.keyStore etc ) did not work because I realized the jersey client version (1.14) was unable to read them. So I upgraded my jersey client to 2.12 and used the script below but I am getting the exception listed.

My current script that I am trying to run – Looks like its failing at the get() part of the code ( in the last line). Can someone help me out ?


SslConfigurator sslConfig = SslConfigurator.newInstance().trustStoreFile("C:\\Program Files (x86)\\Java\\jre6\\lib\\security\\cacerts").trustStorePassword("changeit")

.keyStoreFile("C:\\certs\\analyticsws.jks")

.keyPassword("changeit");



SSLContext sslContext = sslConfig.createSSLContext();

ClientBuilder.newBuilder();

Client client = (Client) ClientBuilder.newBuilder().sslContext(sslContext).build();

client.target("https://sl73dmtreapq001:8443/hadoopws/analytics/dmreplay/v1/jobs/").request().get();



Exception that I am getting -



javax.ws.rs.ProcessingException: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure

at org.glassfish.jersey.client.HttpUrlConnector.apply(HttpUrlConnector.java:229)

at org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:246)

at org.glassfish.jersey.client.JerseyInvocation$1.call(JerseyInvocation.java:667)

at org.glassfish.jersey.client.JerseyInvocation$1.call(JerseyInvocation.java:664)

at org.glassfish.jersey.internal.Errors.process(Errors.java:315)

at org.glassfish.jersey.internal.Errors.process(Errors.java:297)

at org.glassfish.jersey.internal.Errors.process(Errors.java:228)

at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:424)

at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:664)

at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:399)
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!