Service Virtualization

Expand all | Collapse all

I am getting "java.net.ConnectException: Connection timed out: connect" error while running a request

Jump to Best Answer
  • 1.  I am getting "java.net.ConnectException: Connection timed out: connect" error while running a request

    Posted 11-23-2017 06:32 AM
      |   view attached

    I run a soap request in ca dev test but i m getting "java.net.ConnectException: Connection timed out: connect"

     

    I run the same request in SOAP UI where I get successful response. Please help me to resolve this. Below is the response in devtest

     

    Please see the attached word document for screen shots

     

    <?xml version="1.0" encoding="UTF-8"?>
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Body>
    <soapenv:Fault>
    <faultcode>soapenv:Server.userException</faultcode>
    <faultstring>java.net.ConnectException: Connection timed out: connect</faultstring>
    <detail>
    <ns1:stackTrace xmlns:ns1="http://xml.apache.org/axis/">java.net.ConnectException: Connection timed out: connect
    at java.net.TwoStacksPlainSocketImpl.socketConnect(Native Method)
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
    at java.net.Socket.connect(Socket.java:589)
    at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:117)
    at com.itko.lisa.test.ReuseSocketHttpProtocolSocketFactory.connectSocket(ReuseSocketHttpProtocolSocketFactory.java:30)
    at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:177)
    at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:304)
    at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:611)
    at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:446)
    at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:863)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72)
    at com.itko.lisa.ws.axis.LisaHTTPSender.doInvoke(LisaHTTPSender.java:497)
    at com.itko.lisa.ws.axis.LisaHTTPSender.invoke(LisaHTTPSender.java:274)
    at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
    at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
    at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
    at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
    at org.apache.axis.client.Call.invokeEngine(Call.java:2837)
    at org.apache.axis.client.Call.invoke(Call.java:2820)
    at com.itko.lisa.ws.nx.NxWSStep.executeCall(NxWSStep.java:383)
    at com.itko.lisa.ws.nx.NxWSStep.execute(NxWSStep.java:287)
    at com.itko.lisa.ws.nx.ui.NxWSStepEditor$6.run(NxWSStepEditor.java:599)</ns1:stackTrace>
    <ns2:hostname xmlns:ns2="http://xml.apache.org/axis/">RB-CT-ITVWJHW01</ns2:hostname>
    </detail>
    </soapenv:Fault>
    </soapenv:Body>
    </soapenv:Envelope>

    Attachment(s)

    doc
    ca issue.doc   499K 1 version


  • 2.  Re: I am getting "java.net.ConnectException: Connection timed out: connect" error while running a request
    Best Answer

    Posted 11-23-2017 07:09 AM

    Hi ,

     

    If you expect a delayed response from the target system and feel that DevTest is ending the connection, then you can add below two properties to local.properties file and restart the components:

    lisa.http.timeout.connection=0

    lisa.http.timeout.socket=0

     

    • lisa.http.timeout.connection
      HTTP timeout (in milliseconds) - To extend the timeout to wait indefinitely, set the values to zero.
      Default: 15000
    • lisa.http.timeout.socket
      HTTP timeout (in milliseconds). To extend the timeout to wait indefinitely, set the value to zero.
      Default: 180000

    Thanks,

    Javed



  • 3.  Re: I am getting "java.net.ConnectException: Connection timed out: connect" error while running a request

    Posted 11-28-2017 01:26 AM
      |   view attached

    I added the above properties in Dev test.system.properties, but still not getting the response. Please see the attached screen shot. Below is the error

     

    <?xml version="1.0" encoding="UTF-8"?>
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Body>
    <soapenv:Fault>
    <faultcode>soapenv:Server.userException</faultcode>
    <faultstring>java.net.ConnectException: Connection timed out: connect</faultstring>
    <detail>
    <ns1:stackTrace xmlns:ns1="http://xml.apache.org/axis/">java.net.ConnectException: Connection timed out: connect
    at java.net.TwoStacksPlainSocketImpl.socketConnect(Native Method)
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
    at java.net.Socket.connect(Socket.java:589)
    at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:117)
    at com.itko.lisa.test.ReuseSocketHttpProtocolSocketFactory.connectSocket(ReuseSocketHttpProtocolSocketFactory.java:30)
    at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:177)
    at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:304)
    at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:611)
    at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:446)
    at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:863)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72)
    at com.itko.lisa.ws.axis.LisaHTTPSender.doInvoke(LisaHTTPSender.java:497)
    at com.itko.lisa.ws.axis.LisaHTTPSender.invoke(LisaHTTPSender.java:274)
    at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
    at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
    at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
    at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
    at org.apache.axis.client.Call.invokeEngine(Call.java:2837)
    at org.apache.axis.client.Call.invoke(Call.java:2820)
    at com.itko.lisa.ws.nx.NxWSStep.executeCall(NxWSStep.java:383)
    at com.itko.lisa.ws.nx.NxWSStep.execute(NxWSStep.java:287)
    at com.itko.lisa.ws.nx.ui.NxWSStepEditor$6.run(NxWSStepEditor.java:599)</ns1:stackTrace>
    <ns2:hostname xmlns:ns2="http://xml.apache.org/axis/">RB-CT-ITVWJHW01</ns2:hostname>
    </detail>
    </soapenv:Fault>
    </soapenv:Body>
    </soapenv:Envelope>

    Attachment(s)

    doc
    ca updated.doc   350K 1 version


  • 4.  Re: I am getting "java.net.ConnectException: Connection timed out: connect" error while running a request

    Posted 11-28-2017 01:01 PM

    The response time for the service seems to be pretty low based on the screenshot. Can you please refer workstation.log and share the error details that you see for this issue. 



  • 5.  Re: I am getting "java.net.ConnectException: Connection timed out: connect" error while running a request

    Posted 11-30-2017 05:35 AM

    I have attached the workstation log which I got when i het my service in CA dev test.



  • 6.  Re: I am getting "java.net.ConnectException: Connection timed out: connect" error while running a request

    Posted 11-30-2017 10:29 AM

    Please share both the soapUI and the DevTest projects.

     

    --Mike



  • 7.  Re: I am getting "java.net.ConnectException: Connection timed out: connect" error while running a request

    Posted 12-01-2017 01:23 AM

    I have attached both soap ui project (.xml) and ca dev test project (AutomationForSprint4\Tests\Sprint 6\retrieveCommunicationTypes)



  • 8.  Re: I am getting "java.net.ConnectException: Connection timed out: connect" error while running a request

    Posted 12-08-2017 03:24 AM

    Does anyone have an update on this? I have provided all details as you asked.



  • 9.  Re: I am getting "java.net.ConnectException: Connection timed out: connect" error while running a request

    Posted 12-08-2017 10:29 AM

    I don't see any obvious differences between the two projects.  The next thing to check is if soapUI and DevTest have different proxy settings.

     

    --Mike



  • 10.  Re: I am getting "java.net.ConnectException: Connection timed out: connect" error while running a request

    Posted 12-06-2018 07:31 AM

    Hi Johnysv

     

    I am facing a similar issue, Request you to Kindly help me as how was your  issue resolved 

     

    Thanks and Regards

    Akanksha Gupta