Tsung using ejabberd server authentication failure?

350 Views Asked by At

After start tsung i got log message from ejabberd.log file:

I(<0.427.0>:ejabberd_c2s:651) : ({socket_state,gen_tcp,#Port<0.4407>,<0.426.0>}) Failed authentication for [email protected] from IP 192.155.1.666 ({{192,155,1,666},5
2

There are 2 best solutions below

0
On

Which version you are using? I am using 2.1.13 with tsung. I have to make this change to make tsung work.

diff --git a/src/tsung/ts_jabber_common.erl b/src/tsung/ts_jabber_common.erl
index 95646a0..fecf6bc 100644
--- a/src/tsung/ts_jabber_common.erl
+++ b/src/tsung/ts_jabber_common.erl
@@ -318,7 +318,7 @@ connect(#jabber{domain=Domain, version = Version}) ->
       ts_msg_server:get_id(list),
       "' to='",
       Domain,
-      "' xmlns='jabber:client' ",VersionStr,"xmlns:stream='http://etherx.jabber.org/streams'>"]).
+      "' xmlns='jabber:client' ","xmlns:stream='http://etherx.jabber.org/streams'>"]).

And you can find some useful comments here.

0
On

See this code, it runs perfectly. If username is abc@reeng you must configure it like this

<options>
    <option type="ts_jabber" name="global_number" value="200"></option>
    <option type="ts_jabber" name="userid_max" value="200"></option>
    <option type="ts_jabber" name="domain" value="reeng"></option>
    <option name="file_server" id='userdb' value="/home/sanbox/users.csv" />
</options>

Read username, pass in file .csv http://tutslaptrinh.com/tutorial-detail/tsung-test-connection-ejabberd