[Tsung] can't replay POST requests recorded.

Dmitry Mikheev mds at mita.pp.ru
Tue Aug 14 14:42:10 CEST 2007


I've recorded some requests using tsung recorder and transferred them into
tsung.xml
GET's are replaying Ok, on POST's i've got some errors and i cannot see
POST's in web-server logs.
What is wrong?


here's my tsung.xml:


<?xml version="1.0"?>
<!DOCTYPE tsung SYSTEM "/usr/share/tsung/tsung-1.0.dtd">
<tsung loglevel="notice" version="1.0">

  <!-- Client side setup -->
  <clients>
    <client host="localhost" use_controller_vm="true" maxusers="400"/>
  </clients>

  <!-- Server side setup -->
<servers>
  <!-- server host="192.168.232.128" port="2270" type="tcp"></server -->
  <server host="192.168.232.129" port="80" type="tcp"></server>
</servers>

  <!-- to start os monitoring (cpu, network, memory). Use an erlang
  agent on the remote machine or SNMP. erlang is the default -->
  <monitoring>
    <monitor host="192.168.232.128" type="snmp"></monitor>
  </monitoring>

  <load>
  <!-- several arrival phases can be set: for each phase, you can set
  the mean inter-arrival time between new clients and the phase
  duration -->
   <arrivalphase phase="1" duration="10" unit="minute">
     <users interarrival="2" unit="second"></users>
   </arrivalphase>
   <arrivalphase phase="2" duration="10" unit="minute">
     <users interarrival="1" unit="second"></users>
   </arrivalphase>
   <arrivalphase phase="3" duration="10" unit="minute">
     <users interarrival="0.1" unit="second"></users>
   </arrivalphase>
  </load>

  <options>
     <!-- option type="ts_http" name="http_use_server_as_proxy"
value="true"></option -->
   <option type="ts_http" name="user_agent">
    <user_agent probability="80">Mozilla/5.0 (X11; U; Linux i686; en-US; rv:
1.7.8) Gecko/20050513 Galeon/1.3.21</user_agent>
    <user_agent probability="20">Mozilla/5.0 (Windows; U; Windows NT 5.2;
fr-FR; rv:1.7.8) Gecko/20050511 Firefox/1.0.4</user_agent>
   </option>
  </options>

  <!-- start a session for a http user. the probability is the
  frequency of this type os session. The sum of all session's
  probabilities must be 100 -->

 <sessions>
        <session name='rec20070813-14:51' probability='100'  type='ts_http'>
                <request><http url='http://192.168.232.129/' version='1.1'
method='GET'></http></request>
<request><http url='http://192.168.232.129/' version='1.1'
method='GET'></http></request>
<request><http url='/favicon.ico' version='1.1'
method='GET'></http></request>

<thinktime random='true' value='15'/>

<request><http url='/1.html' version='1.1' method='GET'></http></request>

<thinktime random='true' value='3'/>

<request><http url='/2.html' version='1.1' method='GET'></http></request>

<thinktime random='true' value='3'/>
<request><http url='/debian-logo.png' version='1.1'
method='GET'></http></request>

<thinktime random='true' value='3'/>

<request><http url='/form.html' version='1.1' method='GET'></http></request>

<thinktime random='true' value='2'/>

<request><http url='/h.php' version='1.1'  contents='qq=foo'
content_type='application/x-www-form-urlencoded'
method='POST'></http></request>
<request><http url='/h.php?=PHPE9568F34-D428-11d2-A769-00AA001ACF42'
version='1.1' method='GET'></http></request>

<thinktime random='true' value='5'/>

<request><http url='/ftp/' version='1.1' method='GET'></http></request>

<thinktime random='true' value='1'/>

<request><http url='/ftp/incoming/' version='1.1'
method='GET'></http></request>

<thinktime random='true' value='4'/>

        </session>
 </sessions>
</tsung>

tsung logs:

=ERROR REPORT==== 14-Aug-2007::06:30:33 ===
** State machine <0.71.0> terminating
** Last message in was {timeout,#Ref<0.0.0.976>,end_thinktime}
** When State == think
**      Data  == {state_rcv,
                     #Port<0.161>,
                     {0,0,0,0},
                     undefined,
                     "192.168.232.129",
                     80,
                     gen_tcp,

{proto_opts,negociate,10,600000,32768,32768,32768,32768},
                     false,
                     1,
                     {ts_request,
                         {random,2000},
                         parse,
                         false,
                         [],
                         undefined,
                         {http_request,
                             "/form.html",
                             "1.1",
                             "192.168.232.129",
                             undefined,
                             none,
                             get,
                             "application/x-www-form-urlencoded",
                             [],
                             <<>>,
                             0,
                             undefined,
                             undefined,
                             undefined,
                             undefined},
                         true,
                         undefined,
                         undefined,
                         undefined},
                     true,
                     {1187,87433,74805},
                     {1187,87396,53567},
                     8,
                     32,
                     false,
                     {1187,87433,74805},
                     0,
                     [],
                     <<>>,
                     {http,0,0,-1,none,false,false,[]},
                     0,
                     {dyndata,
                         undefined,
                         {http_dyndata,
                             "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:
1.7.8) Gecko/20050513 Galeon/1.3.21",
                             []}},
                     ts_http,
                     [],
                     "none"}

** Reason for termination =
** {{badmatch,["POST",
               " ",
               "/h.php",
               " ",
               "HTTP/",
               "1.1",
               "\r\n",
               "Host: ",
               "192.168.232.129",
               "\r\n",
               ["User-Agent: ",
                "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8)
Gecko/20050513 Galeon/1.3.21",
                "\r\n"],
               [],
               [],
               [],
               [],
               "Content-Type: ",
               "application/x-www-form-urlencoded",
               "\r\n",
               "Content-Length: ",
               "6",
               "\r\n",
               "\r\n"]},
    [{ts_http_common,http_body,2},
     {ts_client,handle_next_request,2},
     {gen_fsm,handle_msg,7},
     {proc_lib,init_p,5}]}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.process-one.net/pipermail/tsung-users/attachments/20070814/83dbfb77/attachment.html


More information about the Tsung-users mailing list