tsung
tsung copied to clipboard
getting invalid xml while test online & close transcation
Hello Team,
While testing the XMPP load testing from Tsung, we are facing error like invalid-XML on the ngrep. I am testing this on Centos 7. My Tsung version is 1.7.0 and Ejabberd version is 18.04. Below is the highlighted error which i got on the Ngrep.
xml version='1.0'?><stream:stream id='10783542429812109265' version='1.0' xml:lang='en' xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client'
stream:error - invalid-xml xmlns='urn:ietf:params:xml:ns:xmpp-streams'/ - /stream:error
</stream:stream> I have attached xml file as a tsung_test.txt which i testing and also attached full ngrep log. ngrep.log
Unforntualty I'm not familiar with XMPP and I'm having a hard time reading the ngrep log. It might be helpful if you could just launch a single Tsung client via maxnumber like this: <users arrivalrate="1" unit="second" maxnumber="1"/>. You could also try to minimize your example e.g. not sending such a large message, trying to do it without the transactions etc.
Like I said, I know very little about XMPP but if I read the ngrep log correctly, it looks like the peer is complaining about:
T 202.202.202.202:39985 -> 10.50.7.38:5222 [AP] #115
<iq id='4' type='set' ><query xmlns='jabber:iq:auth'><username>12341</username><resource>tsung</resource><password>abhi@12341</password></query></iq>
But this is a valid XML message 😕
Thanks, @tisba for your answer, On the mentioned example I already tried with User interval 1 sec and Max number are also 1. but Stil not able to identify why this invalid XML error occurs.
Hi @abhi9016 is the above issue resolved? I am getting the same error. PFA my tsung client and ejabberd logs. Can you pls help on how to fix this issue?
019-08-08 09:21:12.815 [info] <0.476.0>@ejabberd_listener:accept:238 (<0.719.0>) Accepted connection 14.143.245.190:18806 -> 10.2.32.116:5222
2019-08-08 09:21:12.815 [info] <0.719.0> (tcp|<0.719.0>) Received XML on stream = <<"
tsung_config_file.xml.test.plain_eBE.log
<?xml version="1.0"?>
<server host="MY_IP" port="5222" type="tcp"/>
</servers>
<load>
<arrivalphase phase="1" duration="2" unit="minute">
<users maxnumber="100" arrivalrate="4" unit="second"/>
</arrivalphase>
<options>
<option type="ts_jabber" name="global_number" value="1"/>
<option type="ts_jabber" name="userid_max" value="1"/>
<option type="ts_jabber" name="domain" value="DOMAIN_NAME"/>
<option name="file_server" id='userdb' value="hh_1.csv"/>
<option name="ports_range" min="1025" max="65535"/>
</options>
<sessions>
<!--session bidi="true" name="es_load" probability="100" type="ts_jabber"-->
<session name="es_load" probability="100" type="ts_jabber">
<setdynvars sourcetype="file" fileid="userdb" delimiter=";" order="iter">
<var name="deviceid" />
<var name="householdid" />
<var name="cookie" />
</setdynvars>
<request>
<jabber type="connect" ack="local">
<xmpp_authenticate username="%%_householdid%%_0@DOMAIN_NAME/%%_deviceid%%" passwd="dummy"/>
<!--xmpp_authenticate username="%%_householdid%%_0@DOMAIN_NAME/%%_deviceid%%" passwd="%%tms:getpassword%%"/-->
</jabber>
</request>
<thinktime value="5"/>
<transaction name="authenticate">
<request subst="true"> <jabber type="auth_sasl" ack="local"></jabber> </request>
<thinktime value="2"/>
<request> <jabber type="connect" ack="local"></jabber> </request>
<thinktime value="2"/>
<request subst="true"> <jabber type="auth_sasl_bind" ack="local" resource="%%_deviceid%%"></jabber></request>
<thinktime value="2"/>
<request> <jabber type="auth_sasl_session" ack="local" ></jabber></request>
</transaction>
<thinktime value="30"/>
<for from="1" to="100000" incr="1" var="counter">
<thinktime value="5" />
<transaction name="make_requests">
<!--request subst="true"> <jabber type="raw" ack="no_ack" data="<message from='%%_householdid%%_0@DOMAIN_NAME/%%_householdid%%' to='%%_householdid%%_0@DOMAIN_NAME/%%_householdid%%' xml:lang='en'><body>This is message number-%%_counter%% from householdId - %%_householdid%%</body></message>"/> </request-->
<!--request subst="true"> <jabber type="raw" ack="no_ack" data="<iq from='%%_householdid%%_0@DOMAIN_NAME/%%_deviceid%%' to='DOMAIN_NAME' id='1' type='get'><ping /></iq>"/> </request-->
<request subst="true"> <jabber type="raw" ack="no_ack" data="<iq from='%%_householdid%%_0@DOMAIN_NAME/%%_deviceid%%' to='DOMAIN_NAME' id='1' type='get'><ping xmlns='urn:xmpp:ping'/></iq>"/> </request>
</transaction>
</for>
<thinktime value="5"/>
</session>
</sessions>
@testcoderepo123 Still, I didn't found any solution for that. if you please suggest. Thanks :)