weblogic - SSL issue connecting to 2 diff https server at different port; javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake -


problem description

getting "javax.net.ssl.sslhandshakeexception: remote host closed connection during handshake" error while sending soap request on https url

environnent:

1) weblogic 10.3.6.0.1
2) java version "1.6.0_31" java(tm) se runtime environnent (build 1.6.0_31-b04)
3) https server posting request jetty server

overview:

1) in previous release of application sending soap message server 1 on https url
2) in current release implemented new requirement using third party client jar internally call third party https server
3) third party client jar setting ssl certificate , posting request. ssl using 443 port , have opened proxy host server.
4) have 2 third party servers connecting on https. server 1 https port 30042 , server2 https port 443.

usecase scenario error:

1) submit request server 1 on https, getting response properly.
2) submit request server2 using third party client jar through proxy server, getting response properly.
3) submit request server 1 on https, failing error “javax.net.ssl.sslhandshakeexception: remote host closed connection during handshake”.
4) submit request server2 using third party client jar , getting response properly.
5) on server 1 fail , not able send soap message on https
6) server 1 app using soapconnection , url api post soapmessage on https url
7) server 2 app using third party provided jar internally opening socket , writing on it

error codes

---------------------------------------------------
javax.net.ssl.sslhandshakeexception: remote host closed connection during handshake

recent changes environment

currently migrated our application solaris suse lunix servers.

processor specs

linux onsrnasdfgpsdev1 2.6.32.54-0.3-default #1 smp 2012-01-27 17:38:56 +0100 x86_64 x86_64 x86_64 gnu/linux
weblogic 10.3.6.01 java version "1.6.0_31" java(tm) se runtime environment (build 1.6.0_31-b04) java hotspot(tm) 64-bit server vm (build 20.6-b01, mixed mode)

workaround

• server 1 connection if create raw socket , set host , port(30042).
• request going fine.
• if use soapconnection or httpsurlconnection request not going , throwing handshake error
• if use http url server1 works fine

if proxy set using system property in case subsequent https call use proxy though not setting in program, java internally.

in our case want access server 1 without proxy , server 2 want proxy. when trying first time access server2 setting proxy system property, after when trying connect server 1 failing coz https request going throught proxy , @ our proxy server there no policy set server 1

solutions: 1) donot set proxy @ system level, add @ connection level 2) add rule in proxy server server 1, both server 1 & 2 go through proxy 3) @ runtime remove proxy system property before calling server1 , after set again. server 2 go through proxy.

solutions depend on conditions; choose suitable you.


bhanu thapa


Comments