Ejabberd Registering Users with Tsung

516 views Asked by At

I've installed tsung and running the same on Centos. No using is registered when trying to run jabber_register.xml tsung -f file.xml start. Where exactly is the problem?

I see Acceted connection in Ejabberd logs, but no user is registered.

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

  <clients>
    <client host="localhost" use_controller_vm="true"></client>
  </clients>

  <!-- Server side setup -->
 <servers>
  <server host="127.0.0.1" port="5222" type="tcp"></server>
 </servers>

  <load>
   <arrivalphase phase="1" duration="1" unit="minute">
    <users maxnumber="100" interarrival="1" unit="second"></users>
   </arrivalphase>
   <user session="xmpp-connection" start_time="1" unit="second"></user>
  </load>

  <!-- JABBER parameters -->
  <!-- to synchronise users,  use a global acknoledgement -->
 <options>
  <option type="ts_jabber" name="global_number" value="100"></option>
  <option type="ts_jabber" name="userid_max" value="200000"></option>
  <option type="ts_jabber" name="domain" value="example.com"></option>
  <option type="ts_jabber" name="username" value="tsung_user"></option>
  <option type="ts_jabber" name="passwd" value="tsung_pwd"></option>
 </options>

  <sessions>
    <session probability="100" name="jabber-example" type="ts_jabber">
    <request> <jabber type="connect" ack="local"></jabber> </request>
    <thinktime value="2"></thinktime>
    <transaction name="authenticate">
        <request> <jabber type="auth_sasl" ack="local"></jabber> </request>
        <request> <jabber type="connect" ack="local"></jabber> </request>
        <request> <jabber type="auth_sasl_bind" ack="local" ></jabber></request>
        <request> <jabber type="auth_sasl_session" ack="local" ></jabber></request>
        <request> <jabber type="presence:initial" ack="no_ack"/> </request>
    </transaction>
   <thinktime value="30"></thinktime>
    <transaction name="online">
     <request> <jabber type="chat" ack="no_ack" size="4000" destination="online"/></request>
   </transaction>

     <transaction name="close">
        <request> <jabber type="close" ack="local"></jabber> </request>
    </transaction>
    </session>
</sessions>
</tsung>

Following is tsung.log

# stats: dump at 1483683039
stats: users 1 4
stats: {freemem,"tsung_controller@centos"} 1 1456.01953125 0.0 1456.5390625 1455.87109375 1456.1263020833333 3
stats: {load,"tsung_controller@centos"} 1 0.01171875 0.0 0.01953125 0.01171875 0.014322916666666666 3
stats: {cpu,"tsung_controller@centos"} 1 2.3069207622868606 0.0 2.4975024975024978 1.1518372449915872 1.9846496536436529 3
stats: session 7 2042.459681919643 0.5394376539819091 2049.197998046875 2041.028076171875 2041.9925944010417 27
stats: users_count 8 35
stats: finish_users_count 7 34
stats: request 40 1.45291748046875 0.21618170915409465 4.088134765625 0.952880859375 1.3667364921278626 131
stats: connect 40 0.643145751953125 0.29426544797099324 2.958984375 0.256103515625 0.6991087935353053 131
stats: page 8 1.55010986328125 0.21899365581343963 4.088134765625 0.952880859375 1.4904966001157407 27
stats: tr_authenticate 8 38.19097900390625 0.8066643325794721 39.382080078125 37.134033203125 37.7615966796875 26
stats: size_rcv 11846 50623
stats: size_sent 4760 20286
stats: connected 0 0
stats: error_connection_closed 24 102
stats: error_abort_max_send_retries 8 34

tsung_controller.log

=INFO REPORT==== 6-Jan-2017::06:11:01 ===
           ts_client:(5:<0.218.0>) connection close while sending message!

=INFO REPORT==== 6-Jan-2017::06:11:01 ===
           ts_client:(5:<0.218.0>) Server must have closed connection upon us, waiting 10 msec

=INFO REPORT==== 6-Jan-2017::06:11:01 ===
           ts_client:(5:<0.218.0>) connection close while sending message!

=INFO REPORT==== 6-Jan-2017::06:11:01 ===
           ts_client:(5:<0.218.0>) Server must have closed connection upon us, waiting 10 msec

=INFO REPORT==== 6-Jan-2017::06:11:01 ===
           ts_client:(5:<0.218.0>) connection close while sending message!

=INFO REPORT==== 6-Jan-2017::06:11:01 ===
           ts_client:(5:<0.218.0>) Server must have closed connection upon us, waiting 10 msec

=INFO REPORT==== 6-Jan-2017::06:11:01 ===
           ts_client:(3:<0.218.0>) EXIT Error: Unable to send data, max_retries reached; reason: {error,
                                                                                                  closed}

=INFO REPORT==== 6-Jan-2017::06:11:01 ===
           ts_client:(5:<0.218.0>) Pending transactions: [{tr_authenticate,
                                                           {1483,683061,
                                                            201737}}], compute transaction time
1

There are 1 answers

0
Moorthi Raj On

You are running chat script and also I think the username & password used in the script is not registered one.

Please refer the below script for registration and then run the chat script.

<tsung loglevel="notice" dumptraffic="false" version="1.0">
<clients>
<client host="localhost" use_controller_vm="true"> </client>
</clients>
<servers>
<server host="127.0.0.1" port="5222" type="tcp"/>
</servers>
<!--  register 200000 users in less than 15 minutes   -->
<load>
<arrivalphase phase="1" duration="15" unit="minute">
<users maxnumber="200000" interarrival="0.0025" unit="second"/>
</arrivalphase>
</load>
<options>
<option type="ts_jabber" name="global_number" value="5"/>
<option type="ts_jabber" name="userid_max" value="200000"/>
<option type="ts_jabber" name="domain" value="erlang-projects.org"/>
<option type="ts_jabber" name="username" value="tsung"/>
<option type="ts_jabber" name="passwd" value="tsung"/>
</options>
<sessions>
<session probability="100" name="jabber-example" type="ts_jabber">
<request>
<jabber type="connect" ack="local"/>
</request>
<request>
<match do="abort" when="match">error</match>
<jabber type="register" ack="local" id="new"/>
</request>
<request>
<jabber type="close" ack="local"/>
</request>
</session>
</sessions>
</tsung>

Note: You mentioned like "No using is registered when trying to run jabber_register.xml tsung -f file.xml start".

I suggest you to run for less users first and then move on to more users. Because client machine memory need to be increased on running heavy load.

Please let me know if you have any doubts.