[Tsung] Tsung and XMPP Anonymous Connections

Karthik Kailash karthik at socialvisioninc.com
Sun Jan 31 00:49:48 CET 2010

Hi Nicolas,

Thanks for pointing out the error in my file!  I can't believe I missed
that.  I will fix it and let you know how it works.

In the meantime, I tried applying the patch you gave, but still can't get
the stream features back from ejabberd.  The following is the stream opening
XML that Tsung sends with the new patch: 

<?xml version='1.0'?><stream:stream  id='1' to='ejabberd-test'
xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'>

When I simulate the above in raw XML, and add a version="1.0" attribute to
the stream element, then ejabberd responds with the stream features.  I
think if you patch Tsung to include this attribute when sending out a stream
opening tag, it should work.


Karthik Kailash | Product
SocialVision, Online Television Becomes a Social Experience
CELL • 408.768.7704  | WEB • www.socialvisioninc.com | FACEBOOK •
facebook.com/socialvision | TWITTER • twitter.com/socialvision

-----Original Message-----
From: Nicolas Niclausse [mailto:nicolas at niclux.org] 
Sent: Saturday, January 30, 2010 2:19 PM
To: Karthik Kailash
Cc: 'tsung-users at lists.process-one.net'
Subject: Re: [Tsung] Tsung and XMPP Anonymous Connections

Karthik Kailash ecrivait le 30/01/2010 09:33:
> Hi,
> I haven't been able to get this to work yet.  There are a few problems 
> that I have found so far when testing with ejabberd:
> 1. When using the regular <jabber type="connect" ack="local">, 
> ejabberd never sends the stream features back.  When I changed from 
> this to sending raw XML, it worked: <jabber type="raw" ack="local" 
> data='&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;stream:stream
> xmlns:stream="http://etherx.jabber.org/streams" to="ejabberd-test"
> xml:lang="en" version="1.0"&gt;'></jabber>

see attached patch (must be applied after the first sasl patch) to fix this
issue (add <xml ...> before <stream>) and the loop

> 2.  I attached my tsung.dump file containing the traffic logged after 
> changing "connect" calls to raw XML.
> You can see that the order of doing things is somewhat off, as the 
> Tsung sends the stream restart before it receives the auth success.  
> After the documented traffic in tsung.dump, some very weird behavior 
> occurs.  Tsung goes into a loop where it starts spamming ejabberd like 
> crazy (my test is currently only configured to use 1 client, see 
> attached configuration xml file).

First, there is an arror in your config file that explains the infinite

jabber type="auth_sasl_" does not exists; ( after the bind, it should be
jabber type="auth_sasl_session")

you should set a thinktime (a small one: 1 sec for ex.) to avoid sending the
stream restart before the server sends the <stream:features>

somethink like that should work:

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

     <thinktime value="1"></thinktime>

        <transaction name="authenticate">
                <jabber type="auth_sasl_anonymous" ack="local"></jabber>

                <jabber type="connect" ack="local"></jabber>
                <jabber type="auth_sasl_bind" ack="local"></jabber>
                <jabber type="auth_sasl_session" ack="local"></jabber>


More information about the Tsung-users mailing list