Author |
Message
|
srinivas07438 |
Posted: Sun Nov 08, 2015 4:00 am Post subject: java.net.SocketException: Connection reset |
|
|
Apprentice
Joined: 26 Jun 2013 Posts: 28
|
Hi,
I am getting following error when i am sending request to the service provider. I set up the ssl configuration and its working fine. But I am getting following error.
My flow is as follows Soap I/P-->Compute Node--> Soap Request-->Compute Node--->Soap reply
I am getting the error at the Soap request Node....
Code: |
RecoverableException
File:CHARACTER:F:\build\slot1\S800_P\src\DataFlowEngine\ImbDataFlowNode.cpp
Line:INTEGER:1152
Function:CHARACTER:ImbDataFlowNode::createExceptionList
Type:CHARACTER:ImbRequestTemplateNode
Name:CHARACTER:Main#FCMComposite_1_19.getCustomerDetail#FCMComposite_1_2
Label:CHARACTER:Main.getCustomerDetail1.SOAP Request
Catalog:CHARACTER:BIPmsgs
Severity:INTEGER:3
Number:INTEGER:2230
Text:CHARACTER:Node throwing exception
RecoverableException
File:CHARACTER:F:\build\slot1\S800_P\src\WebServices\WSLibrary\ImbSOAPRequestNode.cpp
Line:INTEGER:819
Function:CHARACTER:ImbSOAPRequestNode::requestData
Type:CHARACTER:ImbRequestTemplateNode
Name:CHARACTER:Main#FCMComposite_1_19.getCustomerDetail#FCMComposite_1_2
Label:CHARACTER:Main.getCustomerDetail1.SOAP Request
Catalog:CHARACTER:BIPmsgs
Severity:INTEGER:3
Number:INTEGER:3754
Text:CHARACTER:Error occurred in ImbSOAPRequestHelper::makeSOAPRequest()
RecoverableException
File:CHARACTER:F:\build\slot1\S800_P\src\WebServices\WSLibrary\ImbSOAPRequestHelper.cpp
Line:INTEGER:3518
Function:CHARACTER:ImbSOAPRequestHelper::logWebServiceInvocationException
Type:CHARACTER:
Name:CHARACTER:
Label:CHARACTER:
Catalog:CHARACTER:BIPmsgs
Severity:INTEGER:3
Number:INTEGER:3162
Text:CHARACTER:WebService Request Exception
Insert
Type:INTEGER:12
Text:CHARACTER:436f6e74656e742d4c656e6774683a203335320d0a436f6
e74656e742d547970653a20746578742f786d6c3b20636861727365743d75
74662d380d0a486f73743a20617070732e6d6564636f6d616e2e636f6d3a37
3737370d0a534f4150416374696f6e3a2022687474703a2f2f74656d707572
692e6f72672f47657450726570616964437573746f6d6572496e666f220d0a
436f6e6e656374696f6e3a204b6565702d416c6976650d0a0d0a
Insert
Type:INTEGER:12
Text:CHARACTER:3c4e53313a456e76656c6f706520786d6c6e733a4e53313
d22687474703a2f2f736368656d61732e786d6c736f61702e6f72672f736f61
702f656e76656c6f70652f223e3c4e53313a4865616465723e3c2f4e53313a4
865616465723e3c4e53313a426f64793e3c4e53323a476574507265706169
64437573746f6d6572496e666f20786d6c6e733a4e53323d22687474703a2f
2f74656d707572692e6f72672f223e3c4e53323a61735072656d6973654e6f
3e313331333134303030313030303837373730393c2f4e53323a617350726
56d6973654e6f3e3c4e53323a61734163636f756e744e6f3e5338353430343
c2f4e53323a61734163636f756e744e6f3e3c4e53323a61734d657465724e6f
3e4c313253313239393c2f4e53323a61734d657465724e6f3e3c2f4e53323a
47657450726570616964437573746f6d6572496e666f3e3c2f4e53313a426f
64793e3c2f4e53313a456e76656c6f70653e
Insert
Type:INTEGER:5
Text:CHARACTER:
Insert
Type:INTEGER:5
Text:CHARACTER:
Insert
Type:INTEGER:5
Text:CHARACTER:POST /prepaidcustinfows/service.asmx HTTP/1.1
RecoverableException
File:CHARACTER:F:\build\slot1\S800_P\src\WebServices\WSLibrary\ImbWSRequest.cpp
Line:INTEGER:256
Function:CHARACTER:ImbWSRequest::makeWSRequest
Type:CHARACTER:
Name:CHARACTER:
Label:CHARACTER:
Catalog:CHARACTER:BIPmsgs
Severity:INTEGER:3
Number:INTEGER:3152
Text:CHARACTER:A Web Service request has detected a SOCKET error whilst invoking a web service located at host &1, on port &2, on path &3.
Insert
Type:INTEGER:5
Text:CHARACTER:apps.medcoman.com
Insert
Type:INTEGER:2
Text:CHARACTER:7777
Insert
Type:INTEGER:5
Text:CHARACTER:/prepaidcustinfows/service.asmx
SocketException
File:CHARACTER:F:\build\slot1\S800_P\src\WebServices\WSLibrary\ImbSocket.cpp
Line:INTEGER:1130
Function:CHARACTER:ImbSocketJNIManager::handleGeneralJavaException
Type:CHARACTER:
Name:CHARACTER:
Label:CHARACTER:
Catalog:CHARACTER:BIPmsgs
Severity:INTEGER:3
Number:INTEGER:3165
Text:CHARACTER:An error occurred whilst performing an SSL socket operation
Insert
Type:INTEGER:5
Text:CHARACTER:connect
Insert
Type:INTEGER:5
Text:CHARACTER:java.net.SocketException: Connection reset
|
Suggest me where I am wrong or what is the issue.....
Thanks in advance |
|
Back to top |
|
 |
fjb_saper |
Posted: Sun Nov 08, 2015 9:50 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
You are trying to make an SSL SOAP request but are getting a connection reset.
You may have an SSL error... Does the connection work without SSL?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
srinivas07438 |
Posted: Sun Nov 08, 2015 10:21 am Post subject: |
|
|
Apprentice
Joined: 26 Jun 2013 Posts: 28
|
Hi Saper,
Greetings & Thanks for the reply...
I tried to send the request without SSl setup, I got an error ssl socket exception, ssl handshake... So I configured both keystore and truststore.
Now I am getting Connection reset exception.
Even I tried to hit directly from SOAP ui to service.. I am getting same error Connection reset.
This is public service which I am sending the request(service provider) |
|
Back to top |
|
 |
fjb_saper |
Posted: Sun Nov 08, 2015 10:36 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Can you hit the host and port with openSSL and do you receive some kind of information?
Can you hit the host and port with telnet host port and what is your response then?
The fact that you got an SSL handshake exception would let me believe that you are getting through on a purely tcp/ip level (telnet host port)
The fact that you are getting a socket reset exception could point to unexpected or missing content in the SOAP request (thinking ws:security here) that has the receiver rejecting the request...
No point in trying something in IIB as long as you can't get SOAPUI working...
Use openSSL to make sure you have the right keystore and truststore... but I would have expected an SSL Exception and not just a socket exception if that were the case...
have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
srinivas07438 |
Posted: Sun Nov 08, 2015 10:40 am Post subject: |
|
|
Apprentice
Joined: 26 Jun 2013 Posts: 28
|
Hi Saper,
I did not test the Openssl but I tried Telnet.. Its working fine.
I am able to access the wsdl in the browser and unable to import the WSDL into soup Ui using that URl
Thanks |
|
Back to top |
|
 |
srinivas07438 |
Posted: Sun Nov 08, 2015 10:46 am Post subject: |
|
|
Apprentice
Joined: 26 Jun 2013 Posts: 28
|
When I try to import the wsdl to soap ui I am getting following error.
And I think no need to setup SSL to soap UI because the service is public. So we should able to send the message to service but giving the error Connection reset.
|
|
Back to top |
|
 |
fjb_saper |
Posted: Sun Nov 08, 2015 10:59 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Make sure you let SOAPUI know the location of your key and truststore.
The fact that the browser gives me access to those urls lets me know that the usual suspects in the trustore with a local key signed by a public CA in the keystore (the browser has one) should do the trick ...
Also note that the service is in fact just a stub.
See the output with schema as content and "xml" as an unusual content for the response...
 _________________ MQ & Broker admin
Last edited by fjb_saper on Sun Nov 08, 2015 11:12 am; edited 1 time in total |
|
Back to top |
|
 |
srinivas07438 |
Posted: Sun Nov 08, 2015 11:04 am Post subject: |
|
|
Apprentice
Joined: 26 Jun 2013 Posts: 28
|
Hi Saper,
I setup the truststore in the soap Ui by going to File-->preferences-->Ssl settings.
I gave the location of the certificate and gave the password, set the password when I import the certificate from .cert to .jks. using keytool with import command.
Even I am getting the same error Connection reset. |
|
Back to top |
|
 |
fjb_saper |
Posted: Sun Nov 08, 2015 11:13 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
srinivas07438 wrote: |
Hi Saper,
I setup the truststore in the soap Ui by going to File-->preferences-->Ssl settings.
I gave the location of the certificate and gave the password, set the password when I import the certificate from .cert to .jks. using keytool with import command.
Even I am getting the same error Connection reset. |
You need the target's cert chain in your truststore. If you don't know what it is, use openssl to find out...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
srinivas07438 |
Posted: Sun Nov 08, 2015 11:17 am Post subject: |
|
|
Apprentice
Joined: 26 Jun 2013 Posts: 28
|
Hi Saper...
This is public service, so i think we should get the response from the saop UI right?
And client didnot gave any certificates and keys, they asked me take the certificate from the browser by exporting the certificate.
Still I need to take anything from client(service provider)? I have a doubt. |
|
Back to top |
|
 |
fjb_saper |
Posted: Sun Nov 08, 2015 11:20 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Don't know if you can export the private / public key pair from the browser...
If not try creating one and having it signed by one of the usual public CA's
preferably one in the other party's cert chain....  _________________ MQ & Broker admin |
|
Back to top |
|
 |
srinivas07438 |
Posted: Sun Nov 08, 2015 11:23 am Post subject: |
|
|
Apprentice
Joined: 26 Jun 2013 Posts: 28
|
Hi saper,
As a public service atleast I should able to send the request using SOAP UI right?
Why I am getting Connection reset. |
|
Back to top |
|
 |
fjb_saper |
Posted: Sun Nov 08, 2015 8:25 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Because you don't have the right SSL setup.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
srinivas07438 |
Posted: Sun Nov 08, 2015 10:07 pm Post subject: |
|
|
Apprentice
Joined: 26 Jun 2013 Posts: 28
|
Hi saper,
I tried by not setting up the SSL from the broker, I am getting the same error "Connection reset".
And I used following steps to set up the ssl and tried same error.
I export the key from the browser and imported to the .jks file... The procedure which i follow is as below.
Quote: |
keytool -import -v -trustcacerts -alias keyAlias -file E:\SOADevTeam\Srinivas\Development_Changes\ElectricityPrepaidService\cert\cert.crt -keystore E:\SOADevTeam\Srinivas\Development_Changes\ElectricityPrepaidService\cert\cert.jks -keypass changeit
keytool -list -keystore E:\SOADevTeam\Srinivas\Development_Changes\ElectricityPrepaidService\cert\cert.jks
mqsichangeproperties BRK_SRINI -e ELECTPREPAID -o ComIbmJVMManager -n keystoreFile -v E:\SOADevTeam\Srinivas\Development_Changes\ElectricityPrepaidService\cert\cert.jks
mqsichangeproperties BRK_SRINI -e ELECTPREPAID -o ComIbmJVMManager -n keystoreType -v JKS
mqsichangeproperties BRK_SRINI -e ELECTPREPAID -o ComIbmJVMManager -n keystorePass -v brokerKeystore::password
mqsichangeproperties BRK_SRINI -e ELECTPREPAID -o ComIbmJVMManager -n truststoreFile -v E:\SOADevTeam\Srinivas\Development_Changes\ElectricityPrepaidService\cert\cert.jks
mqsichangeproperties BRK_SRINI -e ELECTPREPAID -o ComIbmJVMManager -n truststoreType -v JKS
mqsichangeproperties BRK_SRINI -e ELECTPREPAID -o ComIbmJVMManager -n truststorePass -v brokerTruststore::password
mqsisetdbparms BRK_SRINI -n brokerTruststore::password -u na -p 123456789
mqsisetdbparms BRK_SRINI -n brokerKeystore::password -u na -p 123456789
mqsistop BRK_SRINI -i
mqsistart BRK_SRINI
mqsireportproperties BRK_SRINI -o ComIbmJVMManager -a -e ELECTPREPAID |
please check the commands and let me know where i am doing wrong.
Where same steps followed for another webservice, its working fine.
Thanks in advance |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Nov 09, 2015 3:45 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Well it certainly looks like your keystore has no keys in it:
Code: |
keytool -list -keystore E:\SOADevTeam\Srinivas\Development_Changes\ElectricityPrepaidService\cert\cert.jks |
This should be followed by a list of keys...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|