error of dialback with im.apinc.org,
standard compliance problem ?
misc at mandriva.org
Sat Sep 22 11:03:56 UTC 2007
> it seems the dialback code is quite buggy as i cannot connect to people on
> Here is the trace ( edited to be more readable ):
> Me :
> <?xml version="1.0" encoding="UTF-8"?>
> <stream:stream to='im.apinc.org'
> Apinc :
> <?xml version='1.0'?>
> <stream:stream xmlns:stream='http://etherx.jabber.org/streams'
> <stream:features xmlns:stream='http://etherx.jabber.org/streams'>
> <starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
> Me :
> Apinc :
> <improper-addressing xmlns='urn:ietf:params:xml:ns:xmpp-streams'/>
> <text xml:lang='en' xmlns='urn:ietf:params:xml:ns:xmpp-streams'>
> Invalid Packets Recieved!
> Me :
> <db:result to='im.apinc.org'
> After reading rfc 3920, I suspect the problem comes from a missing attribute
> the stream:features stanza sent by djabberd.
> "In the 'jabber:server' namespace, a stanza MUST possess a 'from'
> attribute; if a server receives a stanza that does not meet this
> restriction, it MUST generate an <improper-addressing/> stream error
> Adding to, from, version and xmlns solved the problem ( in fact, it showed a
> different problem related to a dns migration ).
> Is the patch enclosed ok or is the server on im.apinc.org is having problem ?
> It seems ejabberd do not have the same behavior as I can access to some other
> server without trouble.
> According to a admin of apinc.org, they are running jabberd14 188.8.131.52
> As I am waiting on dns propagation, I couldn't check with other servers
> google's one, which seems to be ok.
ok, so now, the dns was propagated and the problem was still there, i was seeing
"invalid-from" error instead. And I was also seeing this from other server as
So I dug into jabberd code in order to see what was wrong. And in fact, the
problem was not at all what I thought. I wonder even how I could be so wrong.
Dialback code on djabberd is correct but there is just one thing, the timing of
the various stanzas.
If we look back at the trace, we can see :
1) me send <stream>
2) apinc answer <stream><stream:features/>
3) me answer <stream:features/>
4) apinc answer error
In fact, the apinc server was thinking that <stream:features/> is the dialback
answer, which is wrong. My current fix is to not send this at all, and so I can
connect to the server without troubles.
However, I think that's quite a hack and that's a part of xmpp I am not
What would be the proper fix ?
1) send <stream> + <stream:features /> in one shot ?
2) not send <stream:features> ?
3) fix jabberd to do more check about this and not assuming that
everything coming on this socket is a dialback result ?
More information about the Djabberd