AnsweredAssumed Answered

Connection refused exception

Question asked by Uttamvn on Jan 10, 2018
Latest reply on Jan 10, 2018 by Uttamvn

Hey Folks,

 

I am invoking below sample api and I am getting back "Connection Refused" exception. It works just fine in SOAPUI and in browser (I get some response). I am using Devtest 10.1 version.

URL - http://services.groupkt.com/state/get/IND/all

Error:

============================================================================ | HTTP ============================================================================ | Message: java.net.ConnectException: Connection refused: connect ---------------------------------------------------------------------------- | Trapped Exception: Connection refused: connect | Trapped Message: java.net.ConnectException: Connection refused: connect ---------------------------------------------------------------------------- STACK TRACE java.net.ConnectException: Connection refused: 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.test.CommTrans.doSend(CommTrans.java:1036) at com.itko.lisa.test.CommTrans.send(CommTrans.java:822) at com.itko.lisa.test.CommTrans.sendGET(CommTrans.java:765) at com.itko.lisa.ws.rest.RESTNode.doSend(RESTNode.java:209) at com.itko.lisa.ws.rest.RESTNode.doWebTrans(RESTNode.java:168) at com.itko.lisa.ws.rest.RESTNodeBase.execute(RESTNodeBase.java:380) at com.itko.lisa.ws.rest.RESTNodeEditor$4.doCallback(RESTNodeEditor.java:891) at com.itko.util.swing.panels.ProcessingDialog$2.run(ProcessingDialog.java:194) at java.lang.Thread.run(Thread.java:745) ============================================================================

 

PS: I am getting back same error response for all the api's I hit. Is there any setup that has to be done in Devtest to resolve this?

Outcomes