java - I received javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake -


when tried make ajax call httpclient 4.4.1 hit web service located in other site, , i'm seeing following problem:

javax.net.ssl.sslhandshakeexception: remote host closed connection during handshake @ sun.security.ssl.sslsocketimpl.readrecord(unknown source) @ sun.security.ssl.sslsocketimpl.performinitialhandshake(unknown source) @ sun.security.ssl.sslsocketimpl.starthandshake(unknown source) @ sun.security.ssl.sslsocketimpl.starthandshake(unknown source) @ org.apache.http.conn.ssl.sslconnectionsocketfactory.createlayeredsocket(sslconnectionsocketfactory.java:394) @ org.apache.http.impl.conn.defaulthttpclientconnectionoperator.upgrade(defaulthttpclientconnectionoperator.java:185) @ org.apache.http.impl.conn.poolinghttpclientconnectionmanager.upgrade(poolinghttpclientconnectionmanager.java:369) @ org.apache.http.impl.execchain.mainclientexec.establishroute(mainclientexec.java:415) @ org.apache.http.impl.execchain.mainclientexec.execute(mainclientexec.java:236) @ org.apache.http.impl.execchain.protocolexec.execute(protocolexec.java:184) @ org.apache.http.impl.execchain.retryexec.execute(retryexec.java:88) @ org.apache.http.impl.execchain.redirectexec.execute(redirectexec.java:110) @ org.apache.http.impl.client.internalhttpclient.doexecute(internalhttpclient.java:184) @ org.apache.http.impl.client.closeablehttpclient.execute(closeablehttpclient.java:82) @ org.apache.http.impl.client.closeablehttpclient.execute(closeablehttpclient.java:107) @ utilities.utilities.executerequest(utilities.java:229) @ utilities.utilities.makepost(utilities.java:301) @ utilities.utilities.makepost(utilities.java:307) @ utilities.audioutteranceutilities.createaudioutterance(audioutteranceutilities.java:21) @ dataset.tst_preprod.commonsteps.createdataset(commonsteps.java:35) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(unknown source) @ sun.reflect.delegatingmethodaccessorimpl.invoke(unknown source) @ java.lang.reflect.method.invoke(unknown source) @ org.jbehave.core.steps.stepcreator$methodinvoker.invoke(stepcreator.java:798) @ org.jbehave.core.steps.stepcreator$beforeorafterstep.perform(stepcreator.java:489) @ org.jbehave.core.embedder.storyrunner$finesofar.run(storyrunner.java:535) @ org.jbehave.core.embedder.storyrunner.runstepswhilekeepingstate(storyrunner.java:515) @ org.jbehave.core.embedder.storyrunner.runbeforeorafterstorysteps(storyrunner.java:460) @ org.jbehave.core.embedder.storyrunner.runcancellable(storyrunner.java:268) @ org.jbehave.core.embedder.storyrunner.run(storyrunner.java:220) @ org.jbehave.core.embedder.storyrunner.run(storyrunner.java:181) @ org.jbehave.core.embedder.storymanager$enqueuedstory.call(storymanager.java:262) @ org.jbehave.core.embedder.storymanager$enqueuedstory.call(storymanager.java:229) @ java.util.concurrent.futuretask.run(unknown source) @ java.util.concurrent.threadpoolexecutor.runworker(unknown source) @ java.util.concurrent.threadpoolexecutor$worker.run(unknown source) @ java.lang.thread.run(unknown source) caused by: java.io.eofexception: ssl peer shut down incorrectly @ sun.security.ssl.inputrecord.read(unknown source) ... 38 more 

i have jre8 , debug following

            *** clienthello, tlsv1.2         randomcookie:  gmt: 1422120426 bytes = { 181, 85, 212, 79, 3, 50, 253, 71, 166, 7, 222, 228, 188, 111, 117, 149, 155, 68, 136, 84, 225, 133, 134, 154, 8, 102, 86, 188 }         session id:  {}         cipher suites: [tls_ecdhe_ecdsa_with_aes_128_cbc_sha256, tls_ecdhe_rsa_with_aes_128_cbc_sha256, tls_rsa_with_aes_128_cbc_sha256, tls_ecdh_ecdsa_with_aes_128_cbc_sha256, tls_ecdh_rsa_with_aes_128_cbc_sha256, tls_dhe_rsa_with_aes_128_cbc_sha256, tls_dhe_dss_with_aes_128_cbc_sha256, tls_ecdhe_ecdsa_with_aes_128_cbc_sha, tls_ecdhe_rsa_with_aes_128_cbc_sha, tls_rsa_with_aes_128_cbc_sha, tls_ecdh_ecdsa_with_aes_128_cbc_sha, tls_ecdh_rsa_with_aes_128_cbc_sha, tls_dhe_rsa_with_aes_128_cbc_sha, tls_dhe_dss_with_aes_128_cbc_sha, tls_ecdhe_ecdsa_with_aes_128_gcm_sha256, tls_ecdhe_rsa_with_aes_128_gcm_sha256, tls_rsa_with_aes_128_gcm_sha256, tls_ecdh_ecdsa_with_aes_128_gcm_sha256, tls_ecdh_rsa_with_aes_128_gcm_sha256, tls_dhe_rsa_with_aes_128_gcm_sha256, tls_dhe_dss_with_aes_128_gcm_sha256, tls_ecdhe_ecdsa_with_3des_ede_cbc_sha, tls_ecdhe_rsa_with_3des_ede_cbc_sha, ssl_rsa_with_3des_ede_cbc_sha, tls_ecdh_ecdsa_with_3des_ede_cbc_sha, tls_ecdh_rsa_with_3des_ede_cbc_sha, ssl_dhe_rsa_with_3des_ede_cbc_sha, ssl_dhe_dss_with_3des_ede_cbc_sha, tls_ecdhe_ecdsa_with_rc4_128_sha, tls_ecdhe_rsa_with_rc4_128_sha, ssl_rsa_with_rc4_128_sha, tls_ecdh_ecdsa_with_rc4_128_sha, tls_ecdh_rsa_with_rc4_128_sha, ssl_rsa_with_rc4_128_md5, tls_empty_renegotiation_info_scsv]         compression methods:  { 0 }         extension elliptic_curves, curve names: {secp256r1, sect163k1, sect163r2, secp192r1, secp224r1, sect233k1, sect233r1, sect283k1, sect283r1, secp384r1, sect409k1, sect409r1, secp521r1, sect571k1, sect571r1, secp160k1, secp160r1, secp160r2, sect163r1, secp192k1, sect193r1, sect193r2, secp224k1, sect239k1, secp256k1}         extension ec_point_formats, formats: [uncompressed]         extension signature_algorithms, signature_algorithms: sha512withecdsa, sha512withrsa, sha384withecdsa, sha384withrsa, sha256withecdsa, sha256withrsa, sha224withecdsa, sha224withrsa, sha1withecdsa, sha1withrsa, sha1withdsa, md5withrsa         extension server_name, server_name: [type=host_name (0), value=ldsnewtst01.amr.corp.intel.com]         ***         [write] md5 , sha1 hashes:  len = 246         0000: 01 00 00 f2 03 03 55 c4   d6 ea b5 55 d4 4f 03 32  ......u....u.o.2         0010: fd 47 a6 07 de e4 bc 6f   75 95 9b 44 88 54 e1 85  .g.....ou..d.t..         0020: 86 9a 08 66 56 bc 00 00   46 c0 23 c0 27 00 3c c0  ...fv...f.#.'.<.         0030: 25 c0 29 00 67 00 40 c0   09 c0 13 00 2f c0 04 c0  %.).g.@...../...         0040: 0e 00 33 00 32 c0 2b c0   2f 00 9c c0 2d c0 31 00  ..3.2.+./...-.1.         0050: 9e 00 a2 c0 08 c0 12 00   0a c0 03 c0 0d 00 16 00  ................         0060: 13 c0 07 c0 11 00 05 c0   02 c0 0c 00 04 00 ff 01  ................         0070: 00 00 83 00 0a 00 34 00   32 00 17 00 01 00 03 00  ......4.2.......         0080: 13 00 15 00 06 00 07 00   09 00 0a 00 18 00 0b 00  ................         0090: 0c 00 19 00 0d 00 0e 00   0f 00 10 00 11 00 02 00  ................         00a0: 12 00 04 00 05 00 14 00   08 00 16 00 0b 00 02 01  ................         00b0: 00 00 0d 00 1a 00 18 06   03 06 01 05 03 05 01 04  ................         00c0: 03 04 01 03 03 03 01 02   03 02 01 02 02 01 01 00  ................         00d0: 00 00 23 00 21 00 00 1e   6c 64 73 6e 65 77 74 73  ..#.!...ldsnewts         00e0: 74 30 31 2e 61 6d 72 2e   63 6f 72 70 2e 69 6e 74  t01.amr.corp.int         00f0: 65 6c 2e 63 6f 6d                                  el.com         pool-1-thread-1, write: tlsv1.2 handshake, length = 246         [raw write]: length = 251         0000: 16 03 03 00 f6 01 00 00   f2 03 03 55 c4 d6 ea b5  ...........u....         0010: 55 d4 4f 03 32 fd 47 a6   07 de e4 bc 6f 75 95 9b  u.o.2.g.....ou..         0020: 44 88 54 e1 85 86 9a 08   66 56 bc 00 00 46 c0 23  d.t.....fv...f.#         0030: c0 27 00 3c c0 25 c0 29   00 67 00 40 c0 09 c0 13  .'.<.%.).g.@....         0040: 00 2f c0 04 c0 0e 00 33   00 32 c0 2b c0 2f 00 9c  ./.....3.2.+./..         0050: c0 2d c0 31 00 9e 00 a2   c0 08 c0 12 00 0a c0 03  .-.1............         0060: c0 0d 00 16 00 13 c0 07   c0 11 00 05 c0 02 c0 0c  ................         0070: 00 04 00 ff 01 00 00 83   00 0a 00 34 00 32 00 17  ...........4.2..         0080: 00 01 00 03 00 13 00 15   00 06 00 07 00 09 00 0a  ................         0090: 00 18 00 0b 00 0c 00 19   00 0d 00 0e 00 0f 00 10  ................         00a0: 00 11 00 02 00 12 00 04   00 05 00 14 00 08 00 16  ................         00b0: 00 0b 00 02 01 00 00 0d   00 1a 00 18 06 03 06 01  ................         00c0: 05 03 05 01 04 03 04 01   03 03 03 01 02 03 02 01  ................         00d0: 02 02 01 01 00 00 00 23   00 21 00 00 1e 6c 64 73  .......#.!...lds         00e0: 6e 65 77 74 73 74 30 31   2e 61 6d 72 2e 63 6f 72  newtst01.amr.cor         00f0: 70 2e 69 6e 74 65 6c 2e   63 6f 6d                 p.intel.com         pool-1-thread-1, received eofexception: error         pool-1-thread-1, handling exception: javax.net.ssl.sslhandshakeexception: remote host closed connection during handshake         pool-1-thread-1, send tlsv1.2 alert:  fatal, description = handshake_failure         pool-1-thread-1, write: tlsv1.2 alert, length = 2         [raw write]: length = 7         0000: 15 03 03 00 02 02 28                               ......(         pool-1-thread-1, called closesocket() 

i have started have problem yesterday, before worked successfully, make ajax call successfully, i'm getting error

thanks answer! setting proxy

httphost proxy = new httphost("proxy.com", 911, "http"); requestconfig config = requestconfig.custom().setproxy(proxy).build(); 

i changed way following:

system.setproperty("http.proxyhost", "proxy.com"); system.setproperty("http.proxyport", "911"); 

and working successfully. don't know why before way not working well.


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -