tsung icon indicating copy to clipboard operation
tsung copied to clipboard

getting invalid xml while test online & close transcation

Open abhi9016 opened this issue 6 years ago • 4 comments
trafficstars

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

tsung_test.txt

abhi9016 avatar Mar 14 '19 02:03 abhi9016

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 😕

tisba avatar Mar 14 '19 07:03 tisba

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.

abhi9016 avatar Mar 14 '19 09:03 abhi9016

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 = <<"">> 2019-08-08 09:21:12.815 [info] <0.719.0> (tcp|<0.719.0>) Send XML on stream = <<"<stream:stream id='18348661329170210812' version='1.0' xml:lang='en' xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client'>">> 2019-08-08 09:21:12.815 [info] <0.719.0> (tcp|<0.719.0>) Send XML on stream = <<"stream:error</stream:error>">> 2019-08-08 09:21:12.815 [info] <0.719.0> (tcp|<0.719.0>) Send XML on stream = <<"</stream:stream>">> 2019-08-08 09:21:15.412 [info] <0.622.0> (tcp|<0.622.0>) Received XML on stream = <<" ">> 2019-08-08 09:21:18.026 [info] <0.476.0>@ejabberd_listener:accept:238 (<0.720.0>) Accepted connection 14.143.245.190:51053 -> 10.2.32.116:5222 2019-08-08 09:21:18.026 [info] <0.720.0> (tcp|<0.720.0>) Received XML on stream = <<"">> 2019-08-08 09:21:18.026 [info] <0.720.0> (tcp|<0.720.0>) Send XML on stream = <<"<stream:stream id='17559816084736019119' version='1.0' xml:lang='en' xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client'>">> 2019-08-08 09:21:18.026 [info] <0.720.0> (tcp|<0.720.0>) Send XML on stream = <<"stream:error</stream:error>">> 2019-08-08 09:21:18.026 [info] <0.720.0> (tcp|<0.720.0>) Send XML on stream = <<"</stream:stream>">> 2019-08-08 09:21:22.169 [info] <0.481.0>@ejabberd_listener:accept:238 (<0.721.0>) Accepted connection 10.2.32.116:55218 -> 10.2.32.116:5285 2019-08-08 09:21:22.170 [info] <0.476.0>@ejabberd_listener:accept:238 (<0.722.0>) Accepted connection 10.2.32.116:25561 -> 10.2.32.116:5222 2019-08-08 09:21:22.921 [info] <0.613.0> (tcp|<0.613.0>) Received XML on stream = <<" ">> 2019-08-08 09:21:23.011 [info] <0.614.0> (tcp|<0.614.0>) Received XML on stream = <<" ">> 2019-08-08 09:21:23.031 [info] <0.615.0> (tcp|<0.615.0>) Received XML on stream = <<" ">> 2019-08-08 09:21:23.237 [info] <0.476.0>@ejabberd_listener:accept:238 (<0.723.0>) Accepted connection 14.143.245.190:6388 -> 10.2.32.116:5222 2019-08-08 09:21:23.238 [info] <0.723.0> (tcp|<0.723.0>) Received XML on stream = <<"">> 2019-08-08 09:21:23.238 [info] <0.723.0> (tcp|<0.723.0>) Send XML on stream = <<"<stream:stream id='6099319310283538823' version='1.0' xml:lang='en' xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client'>">> 2019-08-08 09:21:23.238 [info] <0.723.0> (tcp|<0.723.0>) Send XML on stream = <<"stream:error</stream:error>">> 2019-08-08 09:21:23.238 [info] <0.723.0> (tcp|<0.723.0>) Send XML on stream = <<"</stream:stream>">> 2019-08-08 09:21:24.540 [info] <0.616.0> (tcp|<0.616.0>) Received XML on stream = <<" ">> 2019-08-08 09:21:24.712 [info] <0.617.0> (tcp|<0.617.0>) Received XML on stream = <<" ">>

ejabberd-eBE.log

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="&lt;message from='%%_householdid%%_0@DOMAIN_NAME/%%_householdid%%' to='%%_householdid%%_0@DOMAIN_NAME/%%_householdid%%' xml:lang='en'&gt;&lt;body&gt;This is message number-%%_counter%% from householdId - %%_householdid%%&lt;/body&gt;&lt;/message&gt;"/> </request-->

                            <!--request subst="true"> <jabber type="raw" ack="no_ack" data="&lt;iq from='%%_householdid%%_0@DOMAIN_NAME/%%_deviceid%%' to='DOMAIN_NAME' id='1' type='get'&gt;&lt;ping /&gt;&lt;/iq&gt;"/> </request-->
                            <request subst="true"> <jabber type="raw" ack="no_ack" data="&lt;iq from='%%_householdid%%_0@DOMAIN_NAME/%%_deviceid%%' to='DOMAIN_NAME' id='1' type='get'&gt;&lt;ping xmlns='urn:xmpp:ping'/&gt;&lt;/iq&gt;"/> </request>
                    </transaction>

            </for>
        <thinktime value="5"/>
    </session>
</sessions>

jalawala avatar Aug 08 '19 10:08 jalawala

@testcoderepo123 Still, I didn't found any solution for that. if you please suggest. Thanks :)

abhi9016 avatar Aug 20 '19 16:08 abhi9016