java - vertx ssl handshake failure while connecting to https url using vertx HttpClient -


when trying connect https url... getting ssl handshaking failure... using vertx-version >>2.1.5 please me resolve this... stuck here important me

 code working fine, giving me proper response..       url url = new  url("https://bugzilla.mozilla.org/rest/bug/707428/comment");     httpurlconnection conn = (httpurlconnection) url.openconnection();     conn.setdooutput(true);     conn.setrequestmethod("get");     conn.setrequestproperty("accept", "application/json");     inputstream is=conn.getinputstream();     inputstreamreader isr=new inputstreamreader(is);     bufferedreader br=new bufferedreader(isr);     string str=null;     while((str=br.readline())!=null){         system.out.println(str);     }     conn.disconnect();      

but while using vertx. giving hand shaking problem

 httpclient client = myserver.defaultvertx.createhttpclient().setssl(true).settrustall(true)                 .sethost("bugzilla.mozilla.org").setport(443).setverifyhost(false);          httpclientrequest request= client.request("get","/rest/bug/707428/comment",new handler<httpclientresponse>() {              @override             public void handle(httpclientresponse cres) {                 system.out.println(" httpclientresponse done.."+cres);                 cres.bodyhandler(new handler<buffer>() {                     @override                     public void handle(buffer data) {                         system.out.println("response (" + data.length() + "): ");                         system.out.println("response  >>" +data.getstring(0, data.length()));                     }                 });                  cres.datahandler(new handler<buffer>() {                     @override                     public void handle(buffer data) {                         system.out.println("data handler (" + data.length() + "): ");                         system.out.println("data handler<>>  "+data.getstring(0, data.length()));                     }                 });                  cres.exceptionhandler(new handler<throwable>() {                     @override                     public void handle(throwable arg0) {                         arg0.printstacktrace();                     }                 });             }         });          request.exceptionhandler(new handler<throwable>() {             @override             public void handle(throwable arg0) {                 // todo auto-generated method stub                 arg0.printstacktrace();             }         });         request.end();         client.close();      javax.net.ssl.sslexception: received fatal alert: handshake_failure            @ sun.security.ssl.alerts.getsslexception(alerts.java:208)            @ sun.security.ssl.sslengineimpl.fatal(sslengineimpl.java:1619)            @ sun.security.ssl.sslengineimpl.fatal(sslengineimpl.java:1587)            @ sun.security.ssl.sslengineimpl.recvalert(sslengineimpl.java:1756)            @ sun.security.ssl.sslengineimpl.readrecord(sslengineimpl.java:1060)            @ sun.security.ssl.sslengineimpl.readnetrecord(sslengineimpl.java:884)            @ sun.security.ssl.sslengineimpl.unwrap(sslengineimpl.java:758)            @ javax.net.ssl.sslengine.unwrap(sslengine.java:624)            @ io.netty.handler.ssl.sslhandler.unwrap(sslhandler.java:1001)            @ io.netty.handler.ssl.sslhandler.unwrap(sslhandler.java:927)            @ io.netty.handler.ssl.sslhandler.decode(sslhandler.java:873)            @ io.netty.handler.codec.bytetomessagedecoder.calldecode(bytetomessagedecoder.java:241)            @ io.netty.handler.codec.bytetomessagedecoder.channelread(bytetomessagedecoder.java:149)            @ io.netty.channel.abstractchannelhandlercontext.invokechannelread(abstractchannelhandlercontext.java:333)            @ io.netty.channel.abstractchannelhandlercontext.firechannelread(abstractchannelhandlercontext.java:319)            @ io.netty.channel.defaultchannelpipeline.firechannelread(defaultchannelpipeline.java:787)            @ io.netty.channel.nio.abstractniobytechannel$niobyteunsafe.read(abstractniobytechannel.java:125)            @ io.netty.channel.nio.nioeventloop.processselectedkey(nioeventloop.java:511)            @ io.netty.channel.nio.nioeventloop.processselectedkeysoptimized(nioeventloop.java:468)            @ io.netty.channel.nio.nioeventloop.processselectedkeys(nioeventloop.java:382)            @ io.netty.channel.nio.nioeventloop.run(nioeventloop.java:354)            @ io.netty.util.concurrent.singlethreadeventexecutor$2.run(singlethreadeventexecutor.java:116)            @ java.lang.thread.run(thread.java:745) 

it difficult pinpoint exact issue exception.
incompatible ciphers, jce policy jars missing, ssl version issues, etc.

i suggest enable debugging of connection related issue see went wrong.

-djavax.net.debug=all

refer link moreinfo


Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -