Not logged in. · Lost password · Register
Forum: MatriX RSS
Avatar
GroundLoop #1
Member since Jan 2012 · 2 posts
Group memberships: Members
Show profile · Link to this post
Subject: Cannot connect using Openfire using default settings
Have installed Openfire 3.71 on a Hyper-V VM. Downloaded and installed Spark IM client from Openfire site. Spark works both inside and outside the domain. Downloaded the MatriX SDK and miniClient sample project. No matter what I do I cannot connect. For Openfire I have the Server Name = machinename.domain.com  and  Host name = machinename. Attached below is the XML debug output. Can someone please look at this and explain why it will not work. To me it looks like something with the encryption.  I am new to XMPP programming. Thank you in advance for any help.


SEND: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" to="machinename" version="1.0" >
RECV: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="machinename.domain.com" id="5cfc1a97" xml:lang="en" version="1.0" >
RECV: <stream:features xmlns:stream="http://etherx.jabber.org/streams">
  <starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
  <mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
    <mechanism>DIGEST-MD5</mechanism>
    <mechanism>PLAIN</mechanism>
    <mechanism>ANONYMOUS</mechanism>
    <mechanism>CRAM-MD5</mechanism>
  </mechanisms>
  <compression xmlns="http://jabber.org/features/compress">
    <method>zlib</method>
  </compression>
  <auth xmlns="http://jabber.org/features/iq-auth" />
  <register xmlns="http://jabber.org/features/iq-register" />
</stream:features>
SEND: <auth mechanism="DIGEST-MD5" xmlns="urn:ietf:params:xml:ns:xmpp-sasl" />
RECV: <challenge xmlns="urn:ietf:params:xml:ns:xmpp-sasl">cmVhbG09ImVudDIwMDhyMi0xdm0xLnN1YnVyYmFuY29tcHV0ZXJzZXJ2aWNlLmNvbSIsbm9uY2U9IkZkRkljOGxZcldSQk9GWGFhS1RpZDNOc1oxeHRLaXRkbVdTdktqL2IiLHFvcD0iYXV0aCIsY2hhcnNldD11dGYtOCxhbGdvcml0aG09bWQ1LXNlc3M=</challenge>
SEND: <response xmlns="urn:ietf:params:xml:ns:xmpp-sasl">dXNlcm5hbWU9IlR1cmJvbWFuQHN1YnVyYmFuY29tcHV0ZXJzZXJ2aWNlLmNvbSIscmVhbG09ImVudDIwMDhyMi0xdm0xLnN1YnVyYmFuY29tcHV0ZXJzZXJ2aWNlLmNvbSIsbm9uY2U9IkZkRkljOGxZcldSQk9GWGFhS1RpZDNOc1oxeHRLaXRkbVdTdktqL2IiLGNub25jZT0iYjU2YjJjMzVmZTdhYWIyOWE2Nzc0MTFkYjk2N2NhYTMwM2Q5ZDI0ZTZmODg0NDhmMTBmM2RlZmRkMjdhNDJmMyIsbmM9MDAwMDAwMDEscW9wPWF1dGgsZGlnZXN0LXVyaT0ieG1wcC9lbnQyMDA4cjItMXZtMSIsY2hhcnNldD11dGYtOCxyZXNwb25zZT0xYmQ1ZTJjZDBlYzc1NTMxN2ZiYjM0YzQ5ZDFiYTFmZA==</response>
RECV: <failure xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
  <not-authorized />
</failure>
SEND: </stream:stream>
RECV: </stream:stream>
Avatar
Alex #2
Member since Feb 2003 · 4327 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Your server is configured wrong, or you are using the wrong XMPP domain in MatriX. See here:

SEND: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" to="machinename" version="1.0" >
RECV: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="machinename.domain.com" id="5cfc1a97" xml:lang="en" version="1.0" >

In MatriX your XmppDomain is machinename. In the Openfire configuration it is machinename.domain.com.
MatriX is using the most secure Sasl authentication mechanism which is available on the server. Which is DIGEST-MD5 with your current setup. This SASL mechanism uses also the Xmpp Domain name for authentication, not only username and password. This is why authentication fails.
Spark is using SASL plain which has no encryption at all and sends only username and password in plain text for authentication, so it succeeds. Even when it succeeds you will run in problems later with this wrong configuration.

Alex
Avatar
GroundLoop #3
Member since Jan 2012 · 2 posts
Group memberships: Members
Show profile · Link to this post
OK. Reset VM and reinstalled Openfire to default settings. Set everything to the machine name. Still fails. Is this a certificate issue now? XML dump below. Again, thanks in advance.

SEND: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" to="ent2008r2-1vm1" version="1.0" >
RECV: <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="ent2008r2-1vm1" id="90dc521c" xml:lang="en" version="1.0" >
RECV: <stream:features xmlns:stream="http://etherx.jabber.org/streams">
  <starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
  <mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
    <mechanism>DIGEST-MD5</mechanism>
    <mechanism>PLAIN</mechanism>
    <mechanism>ANONYMOUS</mechanism>
    <mechanism>CRAM-MD5</mechanism>
  </mechanisms>
  <compression xmlns="http://jabber.org/features/compress">
    <method>zlib</method>
  </compression>
  <auth xmlns="http://jabber.org/features/iq-auth" />
  <register xmlns="http://jabber.org/features/iq-register" />
</stream:features>
SEND: <auth mechanism="DIGEST-MD5" xmlns="urn:ietf:params:xml:ns:xmpp-sasl" />
RECV: <challenge xmlns="urn:ietf:params:xml:ns:xmpp-sasl">cmVhbG09ImVudDIwMDhyMi0xdm0xIixub25jZT0icForVWdNYktzWjQvWnJHODVWakM3VDl2RjZzOHNCdjFicUFkaHowUSIscW9wPSJhdXRoIixjaGFyc2V0PXV0Zi04LGFsZ29yaXRobT1tZDUtc2Vzcw==</challenge>
SEND: <response xmlns="urn:ietf:params:xml:ns:xmpp-sasl">dXNlcm5hbWU9IlR1cmJvbWFuQEVOVDIwMDhSMi0xVk0xIixyZWFsbT0iZW50MjAwOHIyLTF2bTEiLG5vbmNlPSJwWitVZ01iS3NaNC9ackc4NVZqQzdUOXZGNnM4c0J2MWJxQWRoejBRIixjbm9uY2U9IjY3YTFlMmZiMjNlMTYwYWZmYWE5MTZlYmMyNzdlMjE4YTM5N2U4ZjAxN2ZhMzhkZTI4ZTY2NWFlNTA1OTdkY2YiLG5jPTAwMDAwMDAxLHFvcD1hdXRoLGRpZ2VzdC11cmk9InhtcHAvZW50MjAwOHIyLTF2bTEiLGNoYXJzZXQ9dXRmLTgscmVzcG9uc2U9YmIxOTk0Nzc2N2Y0NzhlMDNiYjgxOGZlOTAzN2RlZDM=</response>
RECV: <failure xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
  <not-authorized />
</failure>
SEND: </stream:stream>
RECV: </stream:stream>
Avatar
Alex #4
Member since Feb 2003 · 4327 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
The Domain is correct now. But you are using either a wrong username or password.
Please post your code which sets all properties and opens the connection.

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:
Forum: MatriX RSS