Sending messages to other users randomly using tsung

1.6k views Asked by At

I am using tsung.I want to create so many users then allow them to send messages to each others randomly.I have created a CSV file with values of username and passwords in it and i checked that are authorized.My problem is with the code of sending messaging between them i got always this error

**

Config Error, aborting ! {{noproc,
                              {gen_server,call,
                                  [{global,ts_file_server},
                                   {get_all_lines,userdb}]}},
                          {gen_server,call,
                              [{global,ts_user_server},{reset,10000}]}}

** This is my tsung.xml

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

<servers>
  <server host="localhost" port="5222" type="tcp"></server>
</servers>

  <load>
   <arrivalphase phase="1" duration="60" unit="minute">
    <users arrivalrate="5" unit="second"></users>
   </arrivalphase>
  </load>

<options>

  <option name="file_server" id='userdb' value="/root/.tsung/users" />

  <option type="ts_jabber" name="random_from_fileid" value="userdb"/>
  <option type="ts_jabber" name="offline_from_fileid" value="userdb"/>

</options> 

  <sessions> 
   <session probability="100" name="xmpp-connection" type="ts_jabber">
   <setdynvars sourcetype="file" fileid="userdb" delimiter=";" order="iter">
      <var name="username" />
         <var name="password" />
          </setdynvars>

<request subst='true'>
 <jabber type="connect" ack="no_ack">
     <xmpp_authenticate username="%%_username%%" passwd="%%_password%%"/>
      </jabber>
     </request>

  <request> <jabber type="connect" ack="local"></jabber>
   </request>

   <thinktime value="10"></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>

      </transaction>

     <request>
        <jabber type="presence:initial" ack="global"></jabber></request>


     <thinktime value="5"></thinktime>

        <transaction name="online">
         <request> <jabber type="chat" ack="no_ack" size="56" destination="online"></jabber> </request>
         </transaction>

        <thinktime value="3"></thinktime>

        <transaction name="offline">
                  <request> <jabber type="chat" ack="no_ack" size="56" destination="offline"></jabber> </request>
         </transaction>

    <transaction name="close">
      <request> <jabber type="close" ack="no_ack"></jabber> </request>
    </transaction>

  </session>
</sessions>

Can someone figure out what's wrong in my Tsung.xml file.Thank you

1

There are 1 answers

5
Simon On

I am currently struggling with tsung, and had the same error message as you. I removed the lines

<option type="ts_jabber" name="random_from_fileid" value="userdb"/>
<option type="ts_jabber" name="offline_from_fileid" value="userdb"/>

and my test started to run but with results i am not sure are correct (this is a personal issue). I know that csv for tsung is according to your xml, but as i said the error disappeared.

Can you please check and let me know if you had better luck with your test ?

Edit: I compared our configuration files and noticed you are missing an option like

<option type="ts_jabber" name ="domain" value="yourDomainName">

Try to add this and let me know.