Not logged in. · Lost password · Register
Forum: MatriX and XmppDotNet RSS
Avatar
benoitdion #1
Member since Jul 2012 · 3 posts
Group memberships: Members
Show profile · Link to this post
Subject: unable to connect using bosh
Hi,

I'm unable to connect to openfire using bosh with Matrix. Below the xmpp trace when I try to connect.

SEND: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" version="1.0" >
RECV: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" version="1.0" id="hewsq8b57b326" >
RECV: <stream:features xmlns:stream="http://etherx.jabber.org/streams">
  <mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
    <mechanism>PLAIN</mechanism>
  </mechanisms>
  <bind xmlns="urn:ietf:params:xml:ns:xmpp-bind" />
  <session xmlns="urn:ietf:params:xml:ns:xmpp-session" />
</stream:features>
SEND: </stream:stream>

It looks like Matrix never sends the login information.

Any suggestion?

Thanks,
Benoit

EDIT: I receive the OnBeforeSasl event followed by 3 OnError events. 2 times BoshException "The remote server returned an error: (404) Not Found." and one time "The request was aborted: The request was canceled.". I know for a fact that the server is online as I'm able to connect to it with the smack java library using similar settings.

EDIT2:
If I set the xmpp domain, it sends the auth message followed by similar BoshExceptions as well as an OnClose event.

SEND: <auth mechanism="PLAIN" xmlns="urn:ietf:params:xml:ns:xmpp-sasl">xxxxxx</auth>

Also, does the library automatically send iq's/presence?
This post was edited 2 times, last on 2012-07-10, 00:54 by benoitdion.
Avatar
Alex #2
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
are you running the latest Openfire version? There are no known problems with the latest version.
Can you try to sniff the HTTP traffic? When the server returns 404 then there is something wrong on the server or the Bosh Uri.

I also see no XMPP domain in your logs. Have you removed it?

Alex
Avatar
benoitdion #3
Member since Jul 2012 · 3 posts
Group memberships: Members
Show profile · Link to this post
See my EDIT2 in the previous post, I didn't see you reply when I posted the update.

I was missing the xmpp domain since I thought it was inferred from the bosh uri.

On some rare occasions I'm able to authenticate (see below) but very inconsistently. Even after authentication I'm still unable to receive messages though. Is there something else I should do on the client? Is there a way to get more detailed logging than with On Send/ReceiveXml events?

SEND: <auth mechanism="PLAIN" xmlns="urn:ietf:params:xml:ns:xmpp-sasl">xxxxxxxxxxxxxxxxxxxxxxxxxxx</auth>
SEND: </stream:stream>
RECV: <success xmlns="urn:ietf:params:xml:ns:xmpp-sasl" />
SEND: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" to="x.y.com" version="1.0" >

Thanks,
Benoit
Avatar
Alex #4
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
are you connecting with BOSH as well on Smack? AFAIK the latest official release of smack has no BOSH support.
Please post the full stacktrace of the exceptions in the OnError event. If these are still 404 errors then they are coming from your server. There is nothing we can do when the server replies with 404 on our requests.

Please post the complete Xml log where authentication succeeds.

Alex
Avatar
benoitdion #5
Member since Jul 2012 · 3 posts
Group memberships: Members
Show profile · Link to this post
I'm using a hacked up version of smack that supports bosh (see http://svn.igniterealtime.org/svn/repos/smack/branches/bosh/) and seem to be able to connect/receive messages successfully and consistently.

Here is the xml log that I'm getting when authentication succeeds:

SEND: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" to="x.y.com" version="1.0" >
RECV: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="z.y.com" version="1.0" id="qq44e5e05367f" >
RECV: <stream:features xmlns:stream="http://etherx.jabber.org/streams">
  <mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
    <mechanism>PLAIN</mechanism>
  </mechanisms>
  <bind xmlns="urn:ietf:params:xml:ns:xmpp-bind" />
  <session xmlns="urn:ietf:params:xml:ns:xmpp-session" />
</stream:features>
SEND: <auth mechanism="PLAIN" xmlns="urn:ietf:params:xml:ns:xmpp-sasl">xxxxxxxxxxxxxxxxxxxxxx</auth>
RECV: <success xmlns="urn:ietf:params:xml:ns:xmpp-sasl" />
SEND: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" to="x.y.com" version="1.0" >
RECV: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="x.y.cisco.com" version="1.0" id="qq44e5e05367f" >

I don't really get any stacktrace OnError as the code seems to be obfuscated (I'm currently using the evaluation version of MatriX)

Thanks for your help so far!
Avatar
Alex #6
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
sorry, but i see no errors in your log. The OnError event forwards all HTTP errors without obfuscation.
I guess only a complete HTTP trace could help. Or you can try to contact your server vendor.

Alex
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: