[ejabberd] Connection via BOSH http-bind is not listed in ejabberdctl connected_users

Markus axianx at googlemail.com
Tue Aug 10 11:22:04 MSD 2010


Hi,

I'm using ejabberd 2.1.4 and authenticating users via PLAIN authentication.
I'm using a anonymous login. The user can specify a username but a password
is not necessary
(config: [{auth_method, [anonymous]}, {allow_multiple_connections, false},
{anonymous_protocol, both}])

This is how I negotiate the connection:

*1. client to server (start session)*
 <body xmlns="http://jabber.org/protocol/httpbind" hold="1" rid="311985980"
to="chat2.myserver.com" route="chat2.myserver.com:5280" wait="60"
xml:lang="en" xmlns:xmpp="urn:xmpp:bosh" xmpp:version="1.0"/>

*2. server to client (session id)*
 <body xmlns='http://jabber.org/protocol/httpbind'
sid='c3d07425a6ac005ad7419c71eaf6d0b9d2aaed83' wait='60' requests='2'
inactivity='30' maxpause='120' polling='2' ver='1.8' from='
chat2.myserver.com' secure='true' authid='2757744332'
xmlns:xmpp='urn:xmpp:xbosh' xmlns:stream='http://etherx.jabber.org/streams'
xmpp:version='1.0'><stream:features xmlns:stream='
http://etherx.jabber.org/streams'><mechanisms
xmlns='urn:ietf:params:xml:ns:xmpp-sasl'><mechanism>ANONYMOUS</mechanism><mechanism>DIGEST-MD5</mechanism><mechanism>PLAIN</mechanism></mechanisms><c
xmlns='http://jabber.org/protocol/caps' hash='sha-1' node='
http://www.process-one.net/en/ejabberd/'
ver='HzhW199FSAS7rIkHllLdacqERmE='/><register xmlns='
http://jabber.org/features/iq-register'/></stream:features></body>

*3. client to server (login with username and no password check)*
 <body xmlns="http://jabber.org/protocol/httpbind" rid="311985981"
sid="c3d07425a6ac005ad7419c71eaf6d0b9d2aaed83"><auth
xmlns="urn:ietf:params:xml:ns:xmpp-sasl"
mechanism="PLAIN">AEJPU0hfTVVDXzE5MTk4Nl83NQA0YzYwZjkwOTFhMjI5</auth></body>

*4. server to client (login successful)*
 <body xmlns='http://jabber.org/protocol/httpbind'><success
xmlns='urn:ietf:params:xml:ns:xmpp-sasl'/></body>

*5. client to server (restart stream)*
 <body xmlns="http://jabber.org/protocol/httpbind" rid="311985982"
sid="c3d07425a6ac005ad7419c71eaf6d0b9d2aaed83" to="chat2.myserver.com"
xmlns:xmpp="urn:xmpp:xbosh" xmpp:restart="true" xmpp:version="1.0"/>

*6. server to client (stream features)*
<body xmlns='http://jabber.org/protocol/httpbind'
sid='c3d07425a6ac005ad7419c71eaf6d0b9d2aaed83' wait='60' requests='2'
inactivity='30' maxpause='120' polling='2' ver='1.8' from='
chat2.myserver.com' secure='true' authid='2191765278'
xmlns:xmpp='urn:xmpp:xbosh' xmlns:stream='http://etherx.jabber.org/streams'
xmpp:version='1.0'><stream:features xmlns:stream='
http://etherx.jabber.org/streams'><bind
xmlns='urn:ietf:params:xml:ns:xmpp-bind'/><session
xmlns='urn:ietf:params:xml:ns:xmpp-session'/><c xmlns='
http://jabber.org/protocol/caps' hash='sha-1' node='
http://www.process-one.net/en/ejabberd/'
ver='HzhW199FSAS7rIkHllLdacqERmE='/><register xmlns='
http://jabber.org/features/iq-register'/></stream:features></body>
*
7. client to server (bind resource)*
<body xmlns="http://jabber.org/protocol/httpbind" rid="311985983"
sid="c3d07425a6ac005ad7419c71eaf6d0b9d2aaed83"><iq xmlns="jabber:client"
type="set" id="4c60f909380b1"><bind
xmlns="urn:ietf:params:xml:ns:xmpp-bind"><resource>resource</resource></bind></iq></body>

*8.server to client (full jid)*
 <body xmlns='http://jabber.org/protocol/httpbind'><iq xmlns='jabber:client'
id='4c60f909380b1' type='result'><bind
xmlns='urn:ietf:params:xml:ns:xmpp-bind'><jid>
BOSH_MUC_191986_75 at chat2.myserver.com/resource</jid></bind></iq></body>

Authenticaton seems to work according to the ejabberd.log:

 "Accepted authentication for BOSH_MUC_191986_75 by ejabberd_auth_anonymous"


No error is shown but the user is not listed in "ejabberdctl
connected_users".
Am I missing something?

Thanks for your help!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.jabber.ru/pipermail/ejabberd/attachments/20100810/d0684073/attachment.html>


More information about the ejabberd mailing list