Socket keeps on timing out
Hi,
When I submit via the command line it times out after a very long wait, with a socket timed out exception. The strategy is fairly big, but I can submit if via the web.
Regards
MG
Comments are currently closed for this discussion. You can start a new one.
Support Staff 2 Posted by David on 27 Jul, 2010 04:27 PM
Hi, can I ask you the size of the file? I'm going to run some tests with a 11Mb strategy.
David.
Support Staff 3 Posted by David on 27 Jul, 2010 04:44 PM
Hi, could you try to replace the marketrunner-1.4.0.jar in your eclipse/MyStrategies/lib folder, see if it fixes the problem?
This jar comes from a bugfix release of version 1.4.0
David.
4 Posted by skaak on 27 Jul, 2010 06:59 PM
Nope, did not work. Maybe this will help.
Using the pristine lib the exception is as follows:
Running Market Runner version 1.4.0
Running Java version : 1.6.0_17 from Sun Microsystems Inc.
located in /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre
Exception in thread "main" java.lang.RuntimeException:
java.net.SocketException: Connection timed out
at
com.algodeal.marketrunner.runner.StrategyRemoteRunner.sendStrategyToBackTestServer(StrategyRemoteRunner.java:48)
at
com.algodeal.MainStrategyRunner.runRemote(MainStrategyRunner.java:76)
at
com.algodeal.MainStrategyRunner.mainNonStatic(MainStrategyRunner.java:176)
at
com.algodeal.MainStrategyRunner.modularMain(MainStrategyRunner.java:154)
at
com.algodeal.MainStrategyRunner.main(MainStrategyRunner.java:149)
Caused by: java.net.SocketException: Connection timed out
at java.net.SocketOutputStream.socketWrite0(Native Method)
at
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
at
sun.security.ssl.OutputRecord.writeBuffer(OutputRecord.java:314)
at sun.security.ssl.OutputRecord.write(OutputRecord.java:303)
at
sun.security.ssl.SSLSocketImpl.writeRecordInternal(SSLSocketImpl.java:754)
at
sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:742)
at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:78)
at
java.io.BufferedOutputStream.write(BufferedOutputStream.java:122)
at
org.apache.commons.httpclient.methods.multipart.FilePart.sendData(FilePart.java:223)
at
org.apache.commons.httpclient.methods.multipart.Part.send(Part.java:312)
at
org.apache.commons.httpclient.methods.multipart.Part.sendParts(Part.java:385)
at
org.apache.commons.httpclient.methods.multipart.MultipartRequestEntity.writeRequest(MultipartRequestEntity.java:164)
at
org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:499)
at
org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114)
at
org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)
at
org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
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:323)
at
com.algodeal.marketrunner.runner.StrategyRemoteRunner.uploadMessageParts(StrategyRemoteRunner.java:82)
at
com.algodeal.marketrunner.runner.StrategyRemoteRunner.sendStrategyToBackTestServer(StrategyRemoteRunner.java:39)
... 4 more
Using the bug fix lib you provided I still get an exception, as follows.
Running Market Runner version 1.4.0
Running Java version : 1.6.0_17 from Sun Microsystems Inc.
located in /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre
Exception in thread "main" java.lang.RuntimeException:
java.net.SocketException: Connection timed out
at
com.algodeal.marketrunner.runner.StrategyRemoteRunner.sendStrategyToBackTestServer(StrategyRemoteRunner.java:50)
at
com.algodeal.MainStrategyRunner.runRemote(MainStrategyRunner.java:76)
at
com.algodeal.MainStrategyRunner.mainNonStatic(MainStrategyRunner.java:176)
at
com.algodeal.MainStrategyRunner.modularMain(MainStrategyRunner.java:154)
at
com.algodeal.MainStrategyRunner.main(MainStrategyRunner.java:149)
Caused by: java.net.SocketException: Connection timed out
at java.net.SocketOutputStream.socketWrite0(Native Method)
at
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
at
sun.security.ssl.OutputRecord.writeBuffer(OutputRecord.java:314)
at sun.security.ssl.OutputRecord.write(OutputRecord.java:303)
at
sun.security.ssl.SSLSocketImpl.writeRecordInternal(SSLSocketImpl.java:754)
at
sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:742)
at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:78)
at
java.io.BufferedOutputStream.write(BufferedOutputStream.java:122)
at
org.apache.commons.httpclient.methods.multipart.FilePart.sendData(FilePart.java:223)
at
org.apache.commons.httpclient.methods.multipart.Part.send(Part.java:312)
at
org.apache.commons.httpclient.methods.multipart.Part.sendParts(Part.java:385)
at
org.apache.commons.httpclient.methods.multipart.MultipartRequestEntity.writeRequest(MultipartRequestEntity.java:164)
at
org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:499)
at
org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114)
at
org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)
at
org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
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:323)
at
com.algodeal.marketrunner.runner.StrategyRemoteRunner.uploadMessageParts(StrategyRemoteRunner.java:84)
at
com.algodeal.marketrunner.runner.StrategyRemoteRunner.sendStrategyToBackTestServer(StrategyRemoteRunner.java:41)
... 4 more
It takes very long 1-2 hours to time out. During that time netstat
shows the following:
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address
State
tcp 1874 193841 carbon.ferra:59332
::ffff:78.153.241.254:https CLOSE_WAIT
The q-values remain constant and it seems very little goes through
from the activity. It stagnates almost immediately.
When I submit via the web, I get
Proto Recv-Q Send-Q Local Address Foreign Address
State
tcp 0 192960 carbon.ferra:47079
78.153.241.254:https ESTABLISHED
and the q-values change all the time as the strategy is uploaded. Once
the strategy is uploaded via the web, I'm thrown out and have to log
in again, but at least it is there.
Regards
MG
5 Posted by skaak on 27 Jul, 2010 07:00 PM
This comment was split into a new discussion: jGgJZanxkEa
Email messed up my formatting again, herewith the same message:
Nope, did not work. Maybe this will help.
Using the pristine lib the exception is as follows:
Using the bug fix lib you provided I still get an exception, as follows.
It takes very long 1-2 hours to time out. During that time netstat shows the following:
The q-values remain constant and it seems very little goes through from the activity. It stagnates almost immediately.
When I submit via the web, I get
and the q-values change all the time as the strategy is uploaded. Once the strategy is uploaded via the web, I'm thrown out and have to log in again, but at least it is there.
Regards
MG
6 Posted by skaak on 27 Jul, 2010 07:16 PM
I see the web interface turns off code formatting if editing a large
strategy - pretty neat, thanks!
MG
Support Staff 7 Posted by David on 27 Jul, 2010 07:41 PM
Thanks, for the feedback. Did you try submitting a small strategy from the command line? Does it work?
8 Posted by skaak on 28 Jul, 2010 04:29 AM
Yes, small strategy works perfectly.
Regards
MG
Alexandre closed this discussion on 29 Jul, 2010 07:54 AM.