SoapUI: ConnectException: Connection timed out: - rest

i try to send request via REST.
I get success response when using firefox rest-client,
but in SoapUI i get exception attached below.
How to resolve this issue?
Thanks.
java.net.ConnectException: Connection
timed out: connect at
java.net.PlainSocketImpl.socketConnect(Native
Method) at
java.net.PlainSocketImpl.doConnect(Unknown
Source) at
java.net.PlainSocketImpl.connectToAddress(Unknown
Source) at
java.net.PlainSocketImpl.connect(Unknown
Source) at
java.net.SocksSocketImpl.connect(Unknown
Source) at
java.net.Socket.connect(Unknown
Source) at
java.net.Socket.connect(Unknown
Source) at
java.net.Socket.(Unknown Source)
at java.net.Socket.(Unknown
Source) at
org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:80)
at
org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:122)
at
org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
at
com.eviware.soapui.impl.wsdl.support.http.SoapUIMultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(SoapUIMultiThreadedHttpConnectionManager.java:1637)
at
org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
at
org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at
com.eviware.soapui.impl.wsdl.submit.transports.http.HttpClientRequestTransport.sendRequest(HttpClientRequestTransport.java:202)
at
com.eviware.soapui.impl.wsdl.WsdlSubmit.run(WsdlSubmit.java:123)
at
java.util.concurrent.Executors$RunnableAdapter.call(Unknown
Source) at
java.util.concurrent.FutureTask$Sync.innerRun(Unknown
Source) at
java.util.concurrent.FutureTask.run(Unknown
Source) at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown
Source) at
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
Source) at
java.lang.Thread.run(Unknown Source)

Default socket timeout is set to 60000 milliseconds.
You can change it:
File -> Preferences -> HTTP Settings -> Socket Timeout

You can also set the value to 0 and then it doesn't time out.
Tested it with SoapUI 4.5.0

You can also set timeout for your request, it's on left bottom Request properties, that helped me (SoapUI 5.4.0)

I would try adjusting the socket timeout in SoapUI preferences. SoapUI has a standard timeout of 60000 milliseconds. I would try making that much larger to see if you have the same issue. This has fixed a timeout issue for myself before.
You can also edit this setting directly in the soapui-settings.xml
<con:setting id="HttpSettings#socket_timeout">120000</con:setting>
If this doesn't help, try asking on the eviware forum.

Apart from adjusting timeouts, if this issue still persists then it could be because few of the plugins needed by SoapUI are not loaded. Because these plugins are present in some other place that require permission to access.
If u check your logs u can find this trace :
java.lang.ClassNotFoundException: com.eviware.soapui.plugins.auto.factories.AutoImportMethodFactory
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
The problem does not occur when starting the SoapUI directly from bin
Also you can run with Administrative privileges.

Related

Unable to find NodeJSInstalls for Parsing TypeScript file using Eclipse plugin

i'm facing below issue while parsing TypeScript files in the Eclipse plugin project. Following are log details:
INFO [main] (GeneratorMain.java:178) - Start generate model STST0101_swap_js.xbl
java.lang.NullPointerException
at ts.eclipse.ide.internal.core.Trace.trace(Trace.java:89)
at ts.eclipse.ide.internal.core.Trace.trace(Trace.java:61)
at ts.eclipse.ide.internal.core.nodejs.NodejsInstallManager.loadNodejsInstalls(NodejsInstallManager.java:109)
at ts.eclipse.ide.internal.core.nodejs.NodejsInstallManager.getNodejsInstalls(NodejsInstallManager.java:68)
at com.sample.ts.nodejs.NodeJSProcess.getNodeJsPath(NodeJSProcess.java:125)
at com.sample.ts.nodejs.NodeJSProcess.startServer(NodeJSProcess.java:198)
at com.sample.ts.nodejs.NodeJSProcess.ensureRunning(NodeJSProcess.java:85)
at com.sample.ts.tsparser.ScriptParserClient.executeRequest(ScriptParserClient.java:43)
at com.sample.ts.tsparser.ScriptParserClient.parseString(ScriptParserClient.java:100)
at com.sample.ts.tsparser.ScriptParser.parse(ScriptParser.java:73)
at com.sample.ts.ast.AST.parseString(AST.java:163)
at com.sample.nmc.ts.generator.GeneratorBase.findClass(GeneratorBase.java:302)
at com.sample.nmc.ts.generator.GeneratorBase.ensureClass(GeneratorBase.java:115)
at com.sample.nmc.ts.generator.EventActionGenerator.doGenerate(EventActionGenerator.java:37)
at com.sample.nmc.ts.generator.GeneratorBase.generate(GeneratorBase.java:58)
at com.sample.nmc.ts.GeneratorMain.generateXbl(GeneratorMain.java:198)
at com.sample.nmc.ts.GeneratorMain.generateFunctionUnit(GeneratorMain.java:168)
at com.sample.nmc.ts.GeneratorMain.execute(GeneratorMain.java:66)
at com.sample.nmc.ts.GeneratorMain.main(GeneratorMain.java:43)
java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.connect0(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 java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at com.sample.ts.tsparser.ScriptParserClient.executeRequest(ScriptParserClient.java:52)
at com.sample.ts.tsparser.ScriptParserClient.parseString(ScriptParserClient.java:100)
at com.sample.ts.tsparser.ScriptParser.parse(ScriptParser.java:73)
at com.sample.ts.ast.AST.parseString(AST.java:163)
at com.sample.nmc.ts.generator.GeneratorBase.findClass(GeneratorBase.java:302)
at com.sample.nmc.ts.generator.GeneratorBase.ensureClass(GeneratorBase.java:115)
at com.sample.nmc.ts.generator.EventActionGenerator.doGenerate(EventActionGenerator.java:37)
at com.sample.nmc.ts.generator.GeneratorBase.generate(GeneratorBase.java:58)
at com.sample.nmc.ts.GeneratorMain.generateXbl(GeneratorMain.java:198)
at com.sample.nmc.ts.GeneratorMain.generateFunctionUnit(GeneratorMain.java:168)
at com.sample.nmc.ts.GeneratorMain.execute(GeneratorMain.java:66)
at com.sample.nmc.ts.GeneratorMain.main(GeneratorMain.java:43)
The plugin project runs perfectly fine if executed as Eclipse plugin. I face above error if i try executing it as Runnable JAR file.
Kindly provide necessary help

Couldn't connect to the Box API due to a network error?

I am getting below mentioned error while accessing the box api using box java sdk in java application.Please suggest the cause for this problem.
Exception in thread "main" com.box.sdk.BoxAPIException: Couldn't connect to the Box API due to a network error.
at com.box.sdk.BoxAPIRequest.trySend(BoxAPIRequest.java:386)
at com.box.sdk.BoxAPIRequest.send(BoxAPIRequest.java:200)
at com.box.sdk.BoxAPIRequest.send(BoxAPIRequest.java:175)
at com.box.sdk.BoxUser.getCurrentUser(BoxUser.java:112)
at com.box.cdm.demo.Main.main(Main.java:24)
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.connect0(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.security.ssl.SSLSocketImpl.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.protocol.https.HttpsClient.<init>(Unknown Source)
at sun.net.www.protocol.https.HttpsClient.New(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(Unknown Source)
at com.box.sdk.BoxAPIRequest.trySend(BoxAPIRequest.java:384)
... 4 more
The main causes of this exception - and the things you need to check - are:-
There is no network between your application (the client) and the server (the Box API). Where is the Box instance running, on same machine as your application (locally)?
What port is Box listening on? You need to show your connection code code (endpoint / port etc).
If client and server on different hardware, and you know you have a network connection between them then is Box behind firewall?

DocuSign : Getting connection timedout while using the Java program in the Demo site.

I am new to DocuSign.
Started trying with the basic Login authentication in Java. Used the code snippet in the below link.
http://iodocs.docusign.com/APIWalkthrough/getEnvelopeRecipientStatus#java
Getting the below exception.
Exception in thread "main" java.net.ConnectException: Connection timed out: conn
ect
at java.net.DualStackPlainSocketImpl.connect0(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.security.ssl.SSLSocketImpl.connect(Unknown Source)
at sun.security.ssl.BaseSSLSocketImpl.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.protocol.https.HttpsClient.(Unknown Source)
at sun.net.www.protocol.https.HttpsClient.New(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewH
ttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Sour
ce)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect
(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown So
urce)
at java.net.HttpURLConnection.getResponseCode(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(Unk
nown Source)
at GetEnvelopeInfo.main(GetEnvelopeInfo.java:56)
Tried to Ping the server address. got the same Request timed out error.
ping demo.docusign.net
Pinging demo.docusign.net.akadns.net [209.46.117.172] with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Please help me out on this.
You might need to set the proxy information for your environment. The jvm parameters are http.proxyHost and http.proxyPort. It can be set by using
System.setProperty("http.proxyHost", "yourProxyHostname");

Driver not found Exception in Web Service example

Hi
I am creating a web service and web service client in Eclipse IDE.
From the client I am able to access the methods of the web service, but when I write some code related to database( in the method of web service), I get Error that It is unable to locate the driver, But I have set the related jar file in the class path of the web service project.
After the above error I get the following Error:
[INFO] Unable to sendViaPost to url[http://localhost:5050/NewOracleMod1/services/Account.AccountHttpSoap11Endpoint/]
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(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.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.commons.httpclient.protocol.ReflectionSocketFactory.createSocket(ReflectionSocketFactory.java:140)
at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:125)
at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:557)
at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:199)
at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:76)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:400)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:225)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:438)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:402)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
at package1.AccountStub.updateAccount(AccountStub.java:202)
at package1.TestClient11.main(TestClient11.java:14)
org.apache.axis2.AxisFault: Connection refused: connect
I am new to Web services as well as to Eclipse IDE.
Please help me to come out of this problem.
Thanks
I need to put the jars in the lib of the project too. and the problem is solved

MongoDB java.net.ConnectException: Connection refused

I have problem with used MongoDB
I am testing a web aplication use Jmeter test.
When set up a big load, on the web application, it is right.
When set up a low load but many users, it is beginning exception..
java.net.ConnectException: Connection
refused: connect at
java.net.PlainSocketImpl.socketConnect(Native
Method) at
java.net.PlainSocketImpl.doConnect(Unknown
Source) at
java.net.PlainSocketImpl.connectToAddress(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.(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.plainConnect(Unknown
Source) at
sun.net.www.protocol.http.HttpURLConnection.connect(Unknown
Source) at
org.apache.jmeter.protocol.http.sampler.HTTPSampler.sample(HTTPSampler.java:483)
at
org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:965)
at
org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:951)
at
org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:348)
at
org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:243)
at java.lang.Thread.run(Unknown
Source)
Tell me please, why..? (I use MongoDB, Tomcat, Java)Thanks..
This is the type of error you should expect to see when load testing any web application with a tool like JMeter, and tells you that you're hitting the upper limit of transactions that the app can support... and this is where you'd do some tweaking of the settings to get better results.
The error message is saying that there are too many HTTP connections going at once and Tomcat is overwhelmed. I'm not sure which version of Tomcat you're on, but it looks like the default for Tomcat 6 is to queue up to 100 requests, then refuse any after that, and maxes out at 200 threads. Try increasing the "acceptCount" or "maxThreads" and see if that helps.
You may also try retagging the question, since this is a broader problem that affects more than just MongoDB apps... and you should get more replies that way. ;)