Not logged in. · Lost password · Register
Forum: MatriX and XmppDotNet RSS
Avatar
martinbach #1
Member since Mar 2009 · 60 posts
Group memberships: Members
Show profile · Link to this post
Subject: Connection via Bosh works ... but roster does not start working
Hi Alex,

I tried to connect via Bosh to a local tigase 5.0.1 xmpp server.
The connection works fine ( xmpp-httpbind/  instead of  http-bind/   for tigase server).

My problem is the roster in conjunction with the bosh I assume.
Connection using bosh there is no roster content, in my log file there is no entry for OnRosterStart / OnRosterItem / OnRosterEnd.
Connectiong without bosh all works as it should.

My code connecting with and without bosh differs in the following view lines:

if (useBosh == true)
{
     xmppClient.Transport = Matrix.Net.Transport.BOSH;               
     //xmppClient.Uri = new System.Uri("http://" + xmppClient.XmppDomain + ":5280/http-bind/"); // for ejabberd
     xmppClient.Uri = new System.Uri("http://" + xmppClient.XmppDomain + ":5280/xmpp-httpbind/"); // for tigase
}

all other code is identical.

Do you have an idea?

Thank you Martin


Here is the logging for connect, roster and disconnect:

<?xml version="1.0"?>
<LoggingData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Username>maltin1</Username>
  <Date>2010-07-05T15:59:40.4375+02:00</Date>
  <Loggingtext>OnSendXml: ----------------------

&lt;stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" to="yk8j072337" version="1.0" &gt;

END OnSendXML ---------------------------------------------

Open was successful

OnReceiveXml: ------------------

&lt;stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="yk8j072337" version="1.0" id="3c2baf01-2e71-4a68-8b8a-84ab9f23658e" &gt;

END OnReceiveXML ---------------------------------------------

OnReceiveXml: ------------------

&lt;stream:features xmlns:stream="http://etherx.jabber.org/streams"&gt;
  &lt;ver xmlns="urn:xmpp:features:rosterver" /&gt;
  &lt;starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" /&gt;
  &lt;mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"&gt;
    &lt;mechanism&gt;PLAIN&lt;/mechanism&gt;
    &lt;mechanism&gt;DIGEST-MD5&lt;/mechanism&gt;
    &lt;mechanism&gt;CRAM-MD5&lt;/mechanism&gt;
    &lt;mechanism&gt;ANONYMOUS&lt;/mechanism&gt;
  &lt;/mechanisms&gt;
  &lt;register xmlns="http://jabber.org/features/iq-register" /&gt;
  &lt;auth xmlns="http://jabber.org/features/iq-auth" /&gt;
&lt;/stream:features&gt;

END OnReceiveXML ---------------------------------------------

OnSendXml: ----------------------

&lt;auth mechanism="DIGEST-MD5" xmlns="urn:ietf:params:xml:ns:xmpp-sasl" /&gt;

END OnSendXML ---------------------------------------------

OnReceiveXml: ------------------

&lt;challenge xmlns="urn:ietf:params:xml:ns:xmpp-sasl"&gt;cmVhbG09InlrOGowNzIzMzciLG5vbmNlPSJSU1pHWEgzb1lTY0IwMmZ6TVpRdXNibTA4QWtyZG94QU9CZGhtSXExIixxb3A9ImF1dGgiLGNoYXJzZXQ9dXRmLTgsYWxnb3JpdGhtPW1kNS1zZXNz&lt;/challenge&gt;

END OnReceiveXML ---------------------------------------------

OnSendXml: ----------------------

&lt;response xmlns="urn:ietf:params:xml:ns:xmpp-sasl"&gt;dXNlcm5hbWU9Im1hbHRpbjEiLHJlYWxtPSJ5azhqMDcyMzM3Iixub25jZT0iUlNaR1hIM29ZU2NCMDJmek1aUXVzYm0wOEFrcmRveEFPQmRobUlxMSIsY25vbmNlPSJjMTg4ZmQxZGYzZjBkNmJlYWEyYzEyNzA2MmUzOGVmMWFhNWUwODU4ZWU0OWJmYmI2ZmY4MDFmZDNiMDEzNjI2IixuYz0wMDAwMDAwMSxxb3A9YXV0aCxkaWdlc3QtdXJpPSJ4bXBwL3lrOGowNzIzMzciLGNoYXJzZXQ9dXRmLTgscmVzcG9uc2U9MWQ5NTI1N2ZjZDcxMDZhMWM1ZWJmMmYxNDk1YzZhMjA=&lt;/response&gt;

END OnSendXML ---------------------------------------------

OnReceiveXml: ------------------

&lt;success xmlns="urn:ietf:params:xml:ns:xmpp-sasl"&gt;cnNwYXV0aD0xMWNiYmY3NWFhM2NhMTA0NjZhMWIxMTY2NmM2YTdhNQ==&lt;/success&gt;

END OnReceiveXML ---------------------------------------------

OnLogin: Login is now

OnSendXml: ----------------------

&lt;stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" to="yk8j072337" version="1.0" &gt;

END OnSendXML ---------------------------------------------

OnReceiveXml: ------------------

&lt;stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="yk8j072337" version="1.0" id="3c2baf01-2e71-4a68-8b8a-84ab9f23658e" &gt;

END OnReceiveXML ---------------------------------------------

OnReceiveXml: ------------------

&lt;stream:features xmlns:stream="http://etherx.jabber.org/streams"&gt;
  &lt;ver xmlns="urn:xmpp:features:rosterver" /&gt;
  &lt;starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" /&gt;
  &lt;session xmlns="urn:ietf:params:xml:ns:xmpp-session" /&gt;
  &lt;register xmlns="http://jabber.org/features/iq-register" /&gt;
  &lt;bind xmlns="urn:ietf:params:xml:ns:xmpp-bind" /&gt;
&lt;/stream:features&gt;

END OnReceiveXML ---------------------------------------------

OnSendXml: ----------------------

&lt;iq id="MX_1" type="set" xmlns="jabber:client"&gt;
  &lt;bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"&gt;
    &lt;resource&gt;easychat&lt;/resource&gt;
  &lt;/bind&gt;
&lt;/iq&gt;

END OnSendXML ---------------------------------------------

OnReceiveXml: ------------------

&lt;iq type="result" to="maltin1@yk8j072337/easychat" id="MX_1" xmlns="http://jabber.org/protocol/httpbind"&gt;
  &lt;bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"&gt;
    &lt;jid&gt;maltin1@yk8j072337/easychat&lt;/jid&gt;
  &lt;/bind&gt;
&lt;/iq&gt;

END OnReceiveXML ---------------------------------------------

OnSendXml: ----------------------

&lt;presence xmlns="jabber:client"&gt;
  &lt;status&gt;&lt;/status&gt;
  &lt;priority&gt;5&lt;/priority&gt;
&lt;/presence&gt;

END OnSendXML ---------------------------------------------

OnReceiveXml: ------------------

&lt;presence to="maltin1@yk8j072337" from="maltin@yk8j072337/easychat" xmlns="http://jabber.org/protocol/httpbind"&gt;
  &lt;status /&gt;
  &lt;priority&gt;5&lt;/priority&gt;
&lt;/presence&gt;

END OnReceiveXML ---------------------------------------------

OnSendXml: ----------------------

 

END OnSendXML ---------------------------------------------

OnReceiveXml: ------------------

&lt;presence type="unavailable" to="maltin1@yk8j072337" from="maltin@yk8j072337/easychat" xmlns="http://jabber.org/protocol/httpbind"&gt;
  &lt;status /&gt;
  &lt;priority&gt;5&lt;/priority&gt;
&lt;/presence&gt;

END OnReceiveXML ---------------------------------------------</Loggingtext>
</LoggingData>
Avatar
Alex #2
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
as you can see many of the returned stanzas are in a wrong namespace http://jabber.org/protocol/httpbind instead of jabber:client.
This looks like a sever bug to me. I will contact the Tigase developers and let you know what they say.

Alex
Avatar
martinbach #3
Member since Mar 2009 · 60 posts
Group memberships: Members
Show profile · Link to this post
Hi Alex,

that would be great.

Thanks,

Martin
Avatar
martinbach #4
Member since Mar 2009 · 60 posts
Group memberships: Members
Show profile · Link to this post
In reply to post #2
Hi Alex,

I tried bosh with openfire 3.6.4 and the logging seems to be quite simillar to that of tigase.
Even the wrong namespace http://jabber.org/protocol/httpbind instead of jabber:client.

Thank you again.

Martin

Here is the logging with bosh to openfire with  :7070/http-bind/  for openfire:

<?xml version="1.0"?>
<LoggingData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Username>maltin1</Username>
  <Date>2010-07-06T13:26:01+02:00</Date>
  <Loggingtext>OnSendXml: ----------------------

&lt;stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" to="yk8j072337" version="1.0" &gt;

END OnSendXML ---------------------------------------------

OnReceiveXml: ------------------

&lt;stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="yk8j072337" version="1.0" id="92ad383c" &gt;

END OnReceiveXML ---------------------------------------------

OnReceiveXml: ------------------

&lt;stream:features xmlns:stream="http://etherx.jabber.org/streams"&gt;
  &lt;mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"&gt;
    &lt;mechanism&gt;DIGEST-MD5&lt;/mechanism&gt;
    &lt;mechanism&gt;PLAIN&lt;/mechanism&gt;
    &lt;mechanism&gt;ANONYMOUS&lt;/mechanism&gt;
    &lt;mechanism&gt;CRAM-MD5&lt;/mechanism&gt;
  &lt;/mechanisms&gt;
  &lt;compression xmlns="http://jabber.org/features/compress"&gt;
    &lt;method&gt;zlib&lt;/method&gt;
  &lt;/compression&gt;
  &lt;bind xmlns="urn:ietf:params:xml:ns:xmpp-bind" /&gt;
  &lt;session xmlns="urn:ietf:params:xml:ns:xmpp-session" /&gt;
&lt;/stream:features&gt;

END OnReceiveXML ---------------------------------------------

OnSendXml: ----------------------

&lt;auth mechanism="DIGEST-MD5" xmlns="urn:ietf:params:xml:ns:xmpp-sasl" /&gt;

END OnSendXML ---------------------------------------------

OnReceiveXml: ------------------

&lt;challenge xmlns="urn:ietf:params:xml:ns:xmpp-sasl"&gt;cmVhbG09InlrOGowNzIzMzciLG5vbmNlPSJLNnU0RkFtMXlYcTVqazJRQkJnbTRoOGZIUEhYUm1VNFVrNnFVT2V1Iixxb3A9ImF1dGgiLGNoYXJzZXQ9dXRmLTgsYWxnb3JpdGhtPW1kNS1zZXNz&lt;/challenge&gt;

END OnReceiveXML ---------------------------------------------

OnSendXml: ----------------------

&lt;response xmlns="urn:ietf:params:xml:ns:xmpp-sasl"&gt;dXNlcm5hbWU9Im1hbHRpbjEiLHJlYWxtPSJ5azhqMDcyMzM3Iixub25jZT0iSzZ1NEZBbTF5WHE1amsyUUJCZ200aDhmSFBIWFJtVTRVazZxVU9ldSIsY25vbmNlPSJjNmY5ZWI5MGQzZmRkZWZmNjA3ZDZhYzZlY2ZjMTE3YzdlYzZlZWJlMWU4NjEzMzZlMTA0YjRhYTAzNjlmMjljIixuYz0wMDAwMDAwMSxxb3A9YXV0aCxkaWdlc3QtdXJpPSJ4bXBwL3lrOGowNzIzMzciLGNoYXJzZXQ9dXRmLTgscmVzcG9uc2U9NmEwNzUzMDBmNzQ4ODc3NDVlMGJiZTkwY2I0OTMxNTE=&lt;/response&gt;

END OnSendXML ---------------------------------------------

OnReceiveXml: ------------------

&lt;success xmlns="urn:ietf:params:xml:ns:xmpp-sasl"&gt;cnNwYXV0aD04MzY0OTg4YWMwZWY3OWNmZDgyODVkMDVjYWI2NjMxZg==&lt;/success&gt;

END OnReceiveXML ---------------------------------------------

OnSendXml: ----------------------

&lt;stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" to="yk8j072337" version="1.0" &gt;

END OnSendXML ---------------------------------------------

OnReceiveXml: ------------------

&lt;stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="yk8j072337" version="1.0" id="92ad383c" &gt;

END OnReceiveXML ---------------------------------------------

OnReceiveXml: ------------------

&lt;stream:features xmlns:stream="http://etherx.jabber.org/streams"&gt;
  &lt;compression xmlns="http://jabber.org/features/compress"&gt;
    &lt;method&gt;zlib&lt;/method&gt;
  &lt;/compression&gt;
  &lt;bind xmlns="urn:ietf:params:xml:ns:xmpp-bind" /&gt;
  &lt;session xmlns="urn:ietf:params:xml:ns:xmpp-session" /&gt;
&lt;/stream:features&gt;

END OnReceiveXML ---------------------------------------------

OnSendXml: ----------------------

&lt;iq id="MX_11" type="set" xmlns="jabber:client"&gt;
  &lt;bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"&gt;
    &lt;resource&gt;easychat&lt;/resource&gt;
  &lt;/bind&gt;
&lt;/iq&gt;

END OnSendXML ---------------------------------------------

OnReceiveXml: ------------------

&lt;iq type="result" id="MX_11" to="yk8j072337/92ad383c" xmlns="http://jabber.org/protocol/httpbind"&gt;
  &lt;bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"&gt;
    &lt;jid&gt;maltin1@yk8j072337/easychat&lt;/jid&gt;
  &lt;/bind&gt;
&lt;/iq&gt;

END OnReceiveXML ---------------------------------------------

OnSendXml: ----------------------

&lt;presence xmlns="jabber:client"&gt;
  &lt;status&gt;hi there&lt;/status&gt;
  &lt;priority&gt;5&lt;/priority&gt;
&lt;/presence&gt;

END OnSendXML ---------------------------------------------

OnReceiveXml: ------------------

&lt;presence from="maltin@yk8j072337/easychat" to="maltin1@yk8j072337/easychat" xmlns="http://jabber.org/protocol/httpbind"&gt;
  &lt;show&gt;chat&lt;/show&gt;
  &lt;status&gt;chatty&lt;/status&gt;
  &lt;priority&gt;5&lt;/priority&gt;
&lt;/presence&gt;

END OnSendXML ---------------------------------------------</Loggingtext>
</LoggingData>
Avatar
Alex #5
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
ya, similar bug in Openfire. See also: http://forum.ag-software.de/thread/879
It was fixed there in SVN when you build from trunk. But I think there is no official release without this bug.
Avatar
martinbach #6
Member since Mar 2009 · 60 posts
Group memberships: Members
Show profile · Link to this post
Hi Alex,

on the igniterealtime issue pages for OF-346 I read the following:

Guenther Niess added a comment - 02/10/10 07:30 AM
Openfire don't specify any namespace of an IQ, Message or Presence stanza explicitly. This means for BOSH that all normal stanzas are within the 'http://jabber.org/protocol/httpbind' namespace. From XEP: XMPP Over BOSH:
If the BOSH <body/> wrapper is not empty, then it SHOULD contain ... One or more complete <message/>, <presence/>, and/or <iq/> elements qualified by the 'jabber:client' namespace.

but also

Note: Many existing XMPP-specific implementations of BOSH clients and connection managers do not specify the namespace of <message/>, <presence/>, or <iq/> elements, since that allows them to forward stanzas without modification (the XMPP <stream:stream/> wrapper element used with TCP typically sets the default namespace to 'jabber:client'). They instead simply assume that the full content of the 'jabber:client' namespace is a subset of the 'http://jabber.org/protocol/httpbind' namespace.

So I think maybe we should state the 'jabber:client' namespace explicitly but the clients should also work without it.
 

What do you think about it?

Regards

Martin
Avatar
Alex #7
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Quote by martinbach:
What do you think about it?

see: http://mail.jabber.org/pipermail/standards/2010-February/0…
Avatar
martinbach #8
Member since Mar 2009 · 60 posts
Group memberships: Members
Show profile · Link to this post
Hi Alex,

thanks for the view inside the standards discussion.

For me it seems the best to be patient and wait for the xmpp server products becomming standard conform.

Martin

By the way, thanks for the file transfer component in MatriX 1.3 Prerelease. I will try it asap.
Avatar
Alex #9
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
in Openfire its fixed in the latest SVN code. See the other discussion here where somebody is running the latest trunk code with success. I contacted the Tigase developers and it will be fixed there soon as well.
I don't wanna add an ugly hack to MatriX when it could be fixed on the server side.

Alex
Avatar
Alex #10
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
we did BOSH interopt tetsing today at the XMPP summit in Brussels. We tested the following servers with success

  • Tigase
  • Prosody
  • XCP
  • ejabberd
  • Openfire
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters: