LoadRunner Error code 10053,software caused connection abort

Source: Internet
Author: User
Tags test script example jboss

Application scenarios for discovering problems
c/S Structure program, request response using asynchronous mechanism. That is, after the client sends a request, it does not wait for the result, the client stores the request in the request queue and obtains a Jobid, the server runs the result in the response queue, the client periodically views the response queue, and gets the results from the response queue according to Jobid timing. Therefore, the test problem is affected by the server state, the number of times the client obtains the result is not fixed.

Test script example
  LRS _create_socket ("Socket0", "TCP", "localhost=0", "remotehost=localhost:8080", Lrslastarg);
  Lrs_send ("Socket0", "buf56", Lrslastarg);
  lrs_receive ("Socket0", "buf57", Lrslastarg);
  Getjobid ();
  do{
  Lr_think_time (0.3);
  Lrs_send ("Socket0", "buf58", Lrslastarg);
  lrs_receive ("Socket0", "buf59", Lrslastarg);
 }while (! CheckStatus ());
  where buf56, 57 is the send request, buf58, 59 is the loop to get the result and check the returned flag bit, if there is still no result returned the result after a certain time loop, so the number of requests is not fixed.

LR Hint Socket exception
When I use Lrs_create_socket to create a connection, when the number of requests for this socket connection reaches 100 times, the connection is unavailable and must be close before recreating. loadrunner hint error: Error:socket0-software caused connection abort. Error code:10053.

Problem Verification
The first thought was the LoadRunner support for the socket, because the same test method was in rationalRobotcan be passed in. So the simplest experiment was made:
1. Use the socket to record access to a webpage and save it (such as Baidu, or Tomcat's default page)
2, add the loop way to access
It turns out that the number of socket requests can not be accessed again (a few times up to 100), after reaching 100.

The script is as follows:
#include "Lrs.h"
int i;
Action ()
{
Lr_think_time (1);

Lrs_create_socket ("Socket0", "TCP", "localhost=0", "remotehost=appsvr01:8080", Lrslastarg);
I=1;
do{
Lrs_send ("Socket0", "buf0", Lrslastarg);
Lrs_receive ("Socket0", "Buf1", Lrslastarg);
Lr_output_message ("-------------LRS request times:%d", i);
i++;
Lrs_send ("Socket0", "Buf2", Lrslastarg);
Lrs_receive ("Socket0", "buf3", Lrslastarg);
Lr_output_message ("-------------LRS request times:%d", i);
i++;
Lrs_send ("Socket0", "Buf4", Lrslastarg);
Lrs_receive ("Socket0", "Buf5", Lrslastarg);
Lr_output_message ("-------------LRS request times:%d", i);
i++;
Lrs_send ("Socket0", "Buf6", Lrslastarg);
Lrs_receive ("Socket0", "Buf7", Lrslastarg);
Lr_output_message ("-------------LRS request times:%d", i);
i++;
}while (i<200);
return 0;
}

LoadRunner Vugen logs are as follows:
...
Lrs_send (Socket0, BUF2)
ACTION.C (+): lrs_receive (Socket0, BUF3)
ACTION.C:-------------LRS Request times:98
ACTION.C: Lrs_send (socket0, BUF4)
ACTION.C (+): lrs_receive (Socket0, Buf5)
ACTION.C (+):-------------LRS Request times:99
ACTION.C (): Lrs_send (Socket0, BUF6)
ACTION.C: Lrs_receive (socket0, BUF7)
ACTION.C: Mismatch (expected 1249 bytes, 1268 bytes actually received)
ACTION.C (+):-------------LRS Request times:100
ACTION.C (+): Lrs_send (Socket0, buf0)
ACTION.C (+): lrs_receive (Socket0, BUF1)
ACTION.C: Error:socket0-software caused connection abort. Error code:10053.
Abort is called from an action.
Ending VUser ...
Starting action Vuser_end.
VUSER_END.C (): Lrs_cleanup ()
Ending action vuser_end.

A new discovery
After the discovery of the above problems after thinking about the solution and some test friends to discuss the exchange, but also have no clue. In a communication accidentally found a friend's test script connected to the 80 port, and then infer that he is using IIS as a test server, suddenly realize that this is also related to the application server, immediately using IIS as a server to test, incredibly test passed, and there is no socket connection problem! The subsequent test with WebLogic is also passed!

Preliminary conclusions
  The various verification methods above have found that the problem is not caused by loadrunner alone, but is also very much related to the application server being tested. This problem only occurs when you test the JBoss, Tomcat server with LoadRunner, and does not exist for IIS, WebLogic, and so on. But another strange problem is the use of rational robot with the same test method , all server types are OK!

Some information about HTTP was suddenly discovered during the search, as follows:
KeepAlive on
In HTTP 1.0, a single connection can only be transmitted once for an HTTP request, while the KeepAlive parameter is used to support the HTTP 1.1 version of a connection, multiple transfers, so that multiple HTTP requests can be delivered in a single connection. Although only newer browsers support this feature, it is still open with this option.

Maxkeepaliverequests 100
Maxkeepaliverequests the maximum number of requests for HTTP requests that can be made for a single connection. Setting its value to 0 will support unlimited transfer requests within a single connection. In fact, there is no client program that requests too many pages in a single connection and usually does not reach this limit to complete the connection.

KeepAliveTimeout 15
KeepAliveTimeout tests the time between multiple request transfers in a connection, and if the server has completed a request, but has not received the next request from the client, the server disconnects after the interval exceeds the value set by this parameter.

After the server configuration file has been set maxkeepaliverequests parameters, test script request the number of times to break through the original limit, the problem has been solved!

--------------------------------------------------------------------------------------------------------------- ------------------------

test Scenario: Tomcat does the server and uses LR to test the performance of uploading files.

LoadRunner always error: "Action.c (Bayi): error-27792:failed to transmit data to network: [10053] software caused connection abo RT "

Solution:

(1) Add Configuration maxkeepaliverequests= "-1"

Description: The maximum number of HTTP requests which can be pipelined until the connection are closed by the server. Setting this attribute to 1 would disable http/1.0 keep-alive, as well as http/1.1 keep-alive and pipelining. Setting This to-1 would allow an unlimited amount of pipelined or keep-alive HTTP requests. If not specified, this attribute is set to 100.

(2) Appropriate increase connectiontimeout= "60000"

Description: The number of milliseconds this Connector would wait, after accepting a connection, for the request URI line to be Presented. The default value is 60000 (i.e. seconds).

--------------------------------------------------------------------------------------------------------------- -------------------------------

In today's testing process found that the socket request connection always error, code is 10053,google after the problem has been resolved. The key point is the configuration of one of the parameters of the Web server (tomcat/jboss). "Maxkeepaliverequests"

Maxkeepaliverequests the maximum number of requests for HTTP requests that can be made for a single connection, with a default value of 100. If you set its value to 1, you can support unlimited transfer requests within a single connection. In fact, there is no client program that requests too many pages in a single connection and usually does not reach this limit to complete the connection.

Knowing the cause of the problem, the solution is good. You can modify or add the configuration of the connector (<connector .../>) in the Tomcat configuration file server.xml.

<connector port= "8090" protocol= "http/1.1"
connectiontimeout= "20000"
maxkeepaliverequests= "-1"
redirectport= "8443"/>

maxkeepaliverequests= "-1" means that an unlimited transfer request will be supported within a single connection

--------------------------------------------------------------------------------------------------------------- ------------------------------

Problem Description:

After recording the script with the WinSocket protocol, playback The script result report (software caused connection abort,10053 error).

On-Site solution process:
1, through the data, many places say this is because the script is not associated with the reason, so the script is parameterized and associated, and ensure that the two work is set correctly, and then play back the script, resulting script also reported 10053 error.

2, so began to check the official HP information and foreign sites, the results of some people say this is because the application server keppalive parameter settings too small, so start to set these parameters, the result script also reported 10053 wrong.

3, depressed to and, will put it to one side, three days after a sudden inspiration suddenly has a thought method: The current recorded script opened a lot of sockets, then is not because of the more open to make the data can not be transferred correctly, so immediately try to let the script run every moment only a socket in the open , when the socket runs for a while and then shuts it down new open a new one. Very similar to the following
{
Lrs_create_socket ("Socket0", "TCP", "localhost=0", "remotehost=www.milivio.com.cn:80", Lrslastarg);
Lrs_send ("Socket0", "buf0", Lrslastarg);
Lrs_receive ("Socket0", "Buf1", Lrslastarg);
Lrs_create_socket ("Socket1", "TCP", "localhost=0", "remotehost=www.milivio.com.cn:1433", Lrslastarg);
Lrs_send ("Socket1", "Buf2", Lrslastarg);
Lrs_receive ("Socket1", "buf3", Lrslastarg);
Lrs_send ("Socket1", "Buf4", Lrslastarg);
Lrs_receive ("Socket1", "Buf5", Lrslastarg);
}
Revision changed to
{
Lrs_create_socket ("Socket0", "TCP", "localhost=0", "remotehost=www.milivio.com.cn:80", Lrslastarg);
Lrs_send ("Socket0", "buf0", Lrslastarg);
Lrs_receive ("Socket0", "Buf1", Lrslastarg);
Lrs_send ("Socket0", "Buf2", Lrslastarg);
Lrs_receive ("Socket0", "buf3", Lrslastarg);
Lrs_close_socket ("Socket0");
Lrs_create_socket ("Socket1", "TCP", "localhost=0", "remotehost=www.milivio.com.cn:1433", Lrslastarg);
Lrs_send ("Socket1", "Buf4", Lrslastarg);
Lrs_receive ("Socket1", "Buf5", Lrslastarg);
}

Do it, you are done!

LoadRunner Error code 10053,software caused connection abort

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.