Please note that Sahi's development and support teams do not actively monitor this. This is more a community forum. If you are a Sahi Pro user looking for commercial support, please email support @ sahipro.com with your query.

java.net.ConnectException: Connection refused

Hello,
I am running a .sah file from a batch file in sahi_pro_runner.
But its not executing the sahi file. I am getting below logs in the log file


java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at java.net.HttpURLConnection.getResponseCode(Unknown Source)
at net.sf.sahi.util.Utils.readURLThrowException(Utils.java:203)
at net.sf.sahi.util.Utils.readURLThrowException(Utils.java:173)
at net.sf.sahi.util.Utils.readURL(Utils.java:164)
at net.sf.sahi.util.Utils.readURL(Utils.java:152)
at in.co.sahi.distributed.DSahiRunner.startNonDistributedRun(DSahiRunner.java:178)
at in.co.sahi.distributed.DSahiRunner.executeNonDistributed(DSahiRunner.java:148)
at in.co.sahi.distributed.DSahiRunner$1.run(DSahiRunner.java:55)
at java.lang.Thread.run(Unknown Source)
java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at java.net.HttpURLConnection.getResponseCode(Unknown Source)
at net.sf.sahi.util.Utils.readURLThrowException(Utils.java:203)
at net.sf.sahi.util.Utils.readURLThrowException(Utils.java:173)
at net.sf.sahi.util.Utils.readURL(Utils.java:164)
at net.sf.sahi.util.Utils.readURL(Utils.java:152)
at in.co.sahi.distributed.DSahiRunner.getSuiteStatus(DSahiRunner.java:186)
at in.co.sahi.distributed.DSahiRunner.getStatusAndShowPeriodicSummary(DSahiRunner.java:119)
at in.co.sahi.distributed.DSahiRunner.getStatus(DSahiRunner.java:103)
at in.co.sahi.distributed.DSahiRunner.executeNonDistributed(DSahiRunner.java:149)
at in.co.sahi.distributed.DSahiRunner$1.run(DSahiRunner.java:55)
at java.lang.Thread.run(Unknown Source)
Exception in thread "Thread-1" java.lang.NullPointerException
at java.lang.String.<init>(Unknown Source)
at in.co.sahi.distributed.DSahiRunner.getSuiteStatus(DSahiRunner.java:186)
at in.co.sahi.distributed.DSahiRunner.getStatusAndShowPeriodicSummary(DSahiRunner.java:119)
at in.co.sahi.distributed.DSahiRunner.getStatus(DSahiRunner.java:103)
at in.co.sahi.distributed.DSahiRunner.executeNonDistributed(DSahiRunner.java:149)
at in.co.sahi.distributed.DSahiRunner$1.run(DSahiRunner.java:55)
at java.lang.Thread.run(Unknown Source)
Picked up JAVA_TOOL_OPTIONS: -agentlib:jvmhook


Please share the solution ASAP. Stuck on replay because of this issue.

Thanks
Amit
Sign In or Register to comment.