1

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 Answers1

0

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.

Simon
  • 761
  • 6
  • 12
  • Thanks but i removed these 2 lines tsung starts with no errors but the users are only logged in but no messages are sent – user3030822 Dec 08 '13 at 14:56
  • @user3030822 How do you know messages aren't sent ? – Simon Dec 10 '13 at 09:35
  • @user3030822 I run a test with tsung while having an ios emulator connected as one of the users in my csv and i did receive some messages (i also have an android project somewhere if an ios client is not possible for you). Do you need some info or you have completed your tests ? – Simon Dec 12 '13 at 07:51
  • We have a module that listens on all the messages and writes them to the database. It works fine if we use normal clients. However, using tsung, nothing gets logged. I will try running tsung and in the same time logging in with a client and see if I get any results – user3030822 Dec 12 '13 at 14:51
  • @user3030822 We had the same issue, i mean the one where we could not find something in the database. In the clients however the messages arrived just fine. – Simon Dec 12 '13 at 14:55