Closed jdaigle-softvision closed 2 years ago
This could be related to a bug that we discovered some time ago, where OpenTest doest clean up properly after making HTTP requests. This bug was solved in versions 1.3.X, but these versions are not published as "latest" just yet. This is not an issue normally, but in your case I'm thinking it may be triggering CloudFront's DDoS protection or some rate limiting logic they might have in there.
Version 1.3.2 should go live pretty soon, but if you want to try it out in the meantime, you can install it like this:
npm install opentest@beta -g
If you see any problems please report them as a new issue. If you need to revert to the current stable version you can always do that with:
npm install opentest -g
Thanks @adrianth. I installed version 1.3.2 and ran the same test case. I seem to have the same issue:
`iterating j=2 for categories.length 3 with name Doorbusters TRACE: Initializing action org.getopentest.actions.HttpRequest... Executing action org.getopentest.actions.HttpRequest with arguments {"url":"https://[redacted]/v1/products?categoryId=[redacted]"}... DEBUG: The server returned HTTP status code 200. DEBUG: The output values from action org.getopentest.actions.HttpRequest were:
headers = {"X-Cache":"Hit from cloudfront","X-Amz-Cf-Pop":"DFW55-C3","Connection":"keep-alive","Date":"Tue, 14 Sep 2021 12:48:18 GMT","Via":"1.1 b55625a3b6969f4acb104fcc2667d17a.cloudfront.net (CloudFront)","x-trace-id":"892e99a6-e627-46c9-a01d-8a671e13aca4","Cache-Control":"max-age=3600","ETag":"0937bb10-155a-11ec-9d17-15255c4c04f8","X-Amz-Cf-Id":"V81AN_2IeOmi7FQP7RXSXHaijkkNW2B5BrtpulNMkksV9etgsAoEGg==","Content-Length":"116","Age":"1891","Content-Type":"application/json; charset=utf-8","X-Powered-By":"Express"} body = {"appliedFilters":[],"hasNextPage":false,"totalProducts":0,"filters":[],"sorts":[],"visualFilters":[],"products":[]} durationMs = 114 statusCode = 200 ERROR: java.net.SocketException: Connection reset at java.net.SocketInputStream.read(SocketInputStream.java:210) at java.net.SocketInputStream.read(SocketInputStream.java:141) at org.apache.http.impl.io.SessionInputBufferImpl.streamRead(SessionInputBufferImpl.java:137) at org.apache.http.impl.io.SessionInputBufferImpl.fillBuffer(SessionInputBufferImpl.java:153) at org.apache.http.impl.io.SessionInputBufferImpl.readLine(SessionInputBufferImpl.java:280) at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:138) at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:56) at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:259) at org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:163) at org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:157) at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:273) at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:125) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:272) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108) at org.getopentest.http.HttpRequest.execute(HttpRequest.java:154) at org.getopentest.base.TestActor.executeTestSegment(TestActor.java:2205) at org.getopentest.base.TestActor.runOneSession(TestActor.java:3077) at org.getopentest.base.TestActor.runOneSession(TestActor.java:3113) at org.getopentest.Main.main(Main.java:20)`
It's interesting to hear that it might be caused by CloudFront's DDoS protection - this is indeed after a few hundred requests, but it's the last possible request in the loop, and I see a 200 response with the data from the request?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
OpenTest version number: 1.2.4
Performing an org.getopentest.actions.HttpRequest to certain URLs causes a
java.net.SocketException: Connection reset
, after which test execution hangs.Steps to reproduce:
$runAction("org.getopentest.actions.HttpRequest", { url: $data("urls").baseUrl + $data("urls").products + "?categoryId=" + categories[i].categories[j].categories[k].id });
Relevant log information: