Discussion:
[jadmin] Jabber protocol change?
Victor Danilchenko
2012-02-17 14:39:52 UTC
Permalink
Hi guys,

Sorry to bother you again, this is still related to my jabber upgrade
project.

So the new server is running jaber14 1.6, the old one was jabber14 1.4.
My client is actually a Flash applet, we use it to provide a chatroom
facility for out product. Now the client is failing to connect to the
new server, I captured the TCP stream, and I am trying to figure out
what my client is doing wrong -- but since I have no clue about the
Jabber protocol, i am totally lost.

The server logs nothing useful. This is all it logged for the failed
connection:

jabberd14[13239]: [stat] (sessions.localhost): delivered messages 0
jabberd14[13239]: [stat] (sessions.localhost): delivered presences 0
jabberd14[13239]: [stat] (sessions.localhost): delivered iqs 0
jabberd14[13239]: [stat] (sessions.localhost): delivered subscriptions 0


here is what the malfunctioning stream looks like -- when my client
connects to Jabber14 1.6 server:



SENT: <?xml version="1.0"?><stream:stream to="foo.askonline.net"
xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams"
version="1.0" />

SENT: <presence
to="foo-WritingCenter-1197 at conference.localhost/victor-admin"><x
xmlns="http://jabber.org/protocol/muc" /></presence>

Connection succeeded!

RECEIVED: <?xml version='1.0'?><stream:stream
xmlns:stream="http://etherx.jabber.org/streams"
id="e656b3f206b30e40c92ab34f970ab0bbe5d190d8" from="foo.askonline.net"
version="1.0" xmlns="jabber:client" />

* SENT: <iq id="log_user_1" type="get"><query
xmlns="jabber:iq:auth"><username>victor</username></query></iq>

* RECEIVED: <stream:features
xmlns:stream="http://etherx.jabber.org/streams"><register
xmlns="http://jabber.org/features/iq-register" /><auth
xmlns="http://jabber.org/features/iq-auth" /></stream:features>

* RECEIVED: <stream:error><conflict
xmlns="urn:ietf:params:xml:ns:xmpp-streams" /><text
xmlns="urn:ietf:params:xml:ns:xmpp-streams"
xml:lang="en">Disconnected</text></stream:error>

ERROR: Remote Server Error



And here is what it looks like when trying to connect to the old server
(the 2nd and 3rd transmissions after "connection succeeded" seem to be
key) -- the login goes without a hitch:



SENT: <?xml version="1.0"?><stream:stream to="demo.askonline.net"
xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams"
version="1.0" />

SENT: <presence
to="demo-Geometry-1643 at conference.localhost/victor-admin"><x
xmlns="http://jabber.org/protocol/muc" /></presence>

Connection succeeded!

RECEIVED: <?xml version='1.0'?><stream:stream
xmlns:stream="http://etherx.jabber.org/streams" id="4F3E62CE"
xmlns="jabber:client" from="demo.askonline.net" />

* SENT: <iq id="log_user_1" type="get"><query
xmlns="jabber:iq:auth"><username>victor</username></query></iq>

* RECEIVED: <iq id="log_user_1" type="result"><query
xmlns="jabber:iq:auth"><username>victor</username><password /><resource
/></query></iq>

* SENT: <iq id="log_user2_3" type="set"><query
xmlns="jabber:iq:auth"><password>***********</password><username>victor</username><resource>demo-Geometry-1643</resource></query></iq>



Our Flash jabber client is very old, but it's the only one we got, so I
need to make it work with the new jabber server.


Can you guys see what my chat client is doing wrong? Should I post my
jabber.xml, could that make the difference?
Tomasz Sterna
2012-02-17 15:53:28 UTC
Permalink
Post by Victor Danilchenko
SENT: <?xml version="1.0"?><stream:stream to="foo.askonline.net"
xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams"
version="1.0" />
SENT: <presence
to="foo-WritingCenter-1197 at conference.localhost/victor-admin"><x
xmlns="http://jabber.org/protocol/muc" /></presence>
Your client sends presence packet before authenticating.
This is not allowed.
--
Tomasz Sterna
Instant Messaging Consultant : Open Source Developer
http://tomasz.sterna.tv/ http://www.xiaoka.com/portfolio
Victor Danilchenko
2012-02-17 16:29:06 UTC
Permalink
What you say makes sense, but if I defer sending the presence, and
instead try to simply initiate authentication right away, i still get
the same error:

SENT: <?xml version="1.0"?><stream:stream to="foo.askonline.net"
xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams"
version="1.0" />

Connection succeeded!

RECEIVED: <?xml version='1.0'?><stream:stream
xmlns:stream="http://etherx.jabber.org/streams"
id="df6191a8b9c7bbb74fd14bc300e6ff334cc309aa" from="foo.askonline.net"
version="1.0" xmlns="jabber:client" />

SENT: <iq id="log_user_1" type="get"><query
xmlns="jabber:iq:auth"><username>victor</username></query></iq>

RECEIVED: <stream:features
xmlns:stream="http://etherx.jabber.org/streams"><register
xmlns="http://jabber.org/features/iq-register" /><auth
xmlns="http://jabber.org/features/iq-auth" /></stream:features>

RECEIVED: <stream:error><conflict
xmlns="urn:ietf:params:xml:ns:xmpp-streams" /><text
xmlns="urn:ietf:params:xml:ns:xmpp-streams"
xml:lang="en">Disconnected</text></stream:error>

ERROR: Remote Server Error
Post by Tomasz Sterna
SENT:<?xml version="1.0"?><stream:stream to="foo.askonline.net"
xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams"
version="1.0" />
SENT:<presence
to="foo-WritingCenter-1197 at conference.localhost/victor-admin"><x
xmlns="http://jabber.org/protocol/muc" /></presence>
Your client sends presence packet before authenticating.
This is not allowed.
--
Victor Danilchenko
Senior Software Engineer, AskOnline.net
victor at askonline.net - 617-273-0119
Tomasz Sterna
2012-02-17 17:03:37 UTC
Permalink
Post by Victor Danilchenko
RECEIVED: <stream:error><conflict
xmlns="urn:ietf:params:xml:ns:xmpp-streams" /><text
xmlns="urn:ietf:params:xml:ns:xmpp-streams"
xml:lang="en">Disconnected</text></stream:error>
ERROR: Remote Server Error
Try looking in server logs for the reason for disconnecting client.
Maybe enable some debug...
--
Tomasz Sterna
Instant Messaging Consultant : Open Source Developer
http://tomasz.sterna.tv/ http://www.xiaoka.com/portfolio
Matthias Wimmer
2012-02-19 15:32:35 UTC
Permalink
Hi Victor,
Post by Victor Danilchenko
SENT: <iq id="log_user_1" type="get"><query
xmlns="jabber:iq:auth"><username>victor</username></query></iq>
I guess it should be:

<iq id='log_user_1' to='foo.askonline.net' type='get'><query
xmlns='jabber:iq:auth'><username>victor</username></query></iq>

(Note the additional to attribute of the <iq/> element.


Regards,
Matthias

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4398 bytes
Desc: S/MIME Kryptografische Unterschrift
URL: <http://mail.jabber.org/pipermail/jadmin/attachments/20120219/0125fb4b/attachment.bin>
Victor Danilchenko
2012-02-20 23:29:43 UTC
Permalink
I will try it, thanks. For now we have reverted to the old Jabber
server, but this is clearly not a sustainable solution.
Post by Matthias Wimmer
Hi Victor,
Post by Victor Danilchenko
SENT: <iq id="log_user_1" type="get"><query
xmlns="jabber:iq:auth"><username>victor</username></query></iq>
<iq id='log_user_1' to='foo.askonline.net' type='get'><query
xmlns='jabber:iq:auth'><username>victor</username></query></iq>
(Note the additional to attribute of the <iq/> element.
Regards,
Matthias
_______________________________________________
JAdmin mailing list
Info: http://mail.jabber.org/mailman/listinfo/jadmin
Unsubscribe: JAdmin-unsubscribe at jabber.org
_______________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.jabber.org/pipermail/jadmin/attachments/20120220/eefcc716/attachment.html>
Loading...