Smack and jabberd2

You can test it by telneting to your server on

5222

and sending the xml without the closing stanza.

If I telnet and send:

<stream:stream

to=‘‘proto-rdc.ornl.gov’’

xmlns=‘‘jabber:client’’

xmlns:stream=‘‘http://etherx.jabber.org/streams’’>

I get back

<?xml version=''1.0''?><stream:stream

xmlns:stream=‘‘http://etherx.jabber.org/streams’’

xmlns=‘‘jabber:client’’ from=‘‘proto-rdc.ornl.gov’’

id=‘‘tl4ktarye84ue1mekfaycvco5n7jb1s4mxpf7gdm’’>

This is pretty much what smack sends and receives.

Smack also shows receiving this:

Do you mean exodus?

<stream:features

xmlns:stream=‘‘http://etherx.jabber.org/streams’’><mecha

nisms

xmlns=‘‘urn:ietf:params:xml:ns:xmpp-sasl’’>DI

GEST-MD5PLAIN</mech

anisms></stream:features>

I don’'t understand why. Smack sent nothing else to

cause that reply (at least there’'s no other sent

packet in the smack debugger), but that packet

doesn’'t appear when I telnet.

Again exodus?

I can then go ahead and login with telnet. But smack

never logs any other packet and instead throws an

exception that says “no response from server”.

Actually, if I send via telnet exactly what smack

sends – i.e., add the versin=“1.0” attribute, then I

also get back the stream:features packet. Then I

can still go ahead and log in via telnet.

Hey guys,

A possible reason for this problem is that Smack 2.0.0 is indicating XMPP 1.0 compliance even when using old SSL connections. This problem has been fixed and the bug fix will be available in the next nightly build. Try using the next nightly build and let me know how it goes.

BTW, the latest build includes many other fixes and support for ANONYMOUS SASL too. You can check the change log url=http://www.jivesoftware.org/issues/browse/SMACK?report=com.atlassian.jira.pl ugin.system.project:roadmap-panelhere[/url].

Thanks,

– Gato

Actually, if I send via telnet exactly what smack

sends – i.e., add the versin=“1.0” attribute, then I

also get back the stream:features packet. Then I

can still go ahead and log in via telnet.

so you are sending this?

<stream:stream to=‘‘proto-rdc.ornl.gov’’ xmlns=‘‘jabber:client’’

xmlns:stream=‘‘http://etherx.jabber.org/streams’’ version =“1.0”>

</stream:stream>

/code

A possible reason for this problem is that Smack

2.0.0 is indicating XMPP 1.0 compliance even when

using old SSL connections. This problem has been

fixed and the bug fix will be available in the next

nightly build. Try using the next nightly build and

let me know how it goes.

Okay, I can try that tomorrow. I think. I’‘ve never used the nightly builds before, just the releases, but I’'ll look into it.

Meanwhile, I’‘m not using SSL at all, just plain old port 5222. SSL will come later, and that is one of the reasons for looking into jabberd2 since it supports STARTTLS on s2s connections. But I haven’'t gotten nearly enough to test that.

so you are sending this?

<stream:stream to=‘‘proto-rdc.ornl.gov’’

xmlns=‘‘jabber:client’’

xmlns:stream=‘‘http://etherx.jabber.org/streams’’

version =“1.0”>

/stream:stream>

/code

Yes. The first time I tried it will telnet, I did not include the version attribute. Then I added version, to send exactly what you listed above. That’'s also what smack 2.0.0 sends (but not smack 1.5.1). Exodus, however sends the version attribute (as well as an xml:lang attribute).

In any case, Exodus and telnet can proceed to login, but smack throws an exception.

But exodus does not send the </stream:stream>

Thanks for your help so far. But I’‘m in the eastern time zone and have an appointment to get to tonight at 5:00. I’'m logging off the forum for tonight.

I am also in the eastern time zone. We can setup to continue troubleshooting this in the chat room tomorrow and i can show you how to use the nightly builds too, if you like. Or we can continue it here.

Hey guys,

Try using the next nightly build and let me know how it goes. I don’'t have you complete XML traffic but it is possible that you are running into this problem SMACK-82 that has also been fixed. If you are still having troubles using the latest nightly build then I would need to see the complete XML traffic to/from the server.

Thanks,

– Gato

Try using the next nightly build and let me know how

it goes. I don’'t have you complete XML traffic but it

is possible that you are running into this problem

SMACK-82 that has also been fixed. If you are still

having troubles using the latest nightly build then I

would need to see the complete XML traffic to/from

the server.

THAT FIXED IT! Thanks. I suppose you can close SMACK-88 as well, or link it to SMACK-82, or whatever.

Thanks again to all who offered help. You’'re great!

This is strange. I have the exact same problem, but using Smack 2.1.0 client-side and jabberd 2.0s10 server-side. Could it be that the problem is not fixed yet?

Smack 1.5.0 had the same problem, and connecting with either 1.5.0 or 2.1.0 to jabberd 1.4.3 works well.

My server does not require the use of STARTTLS (yet).

I just configured my server to allow STARTTLS and to require it. It does not change anything.

Here is my debug input/output:

SENT:

Here is the exception:

2006-02-22 03:45:08 No response from the server.:

at org.jivesoftware.smack.NonSASLAuthentication.authenticate(NonSASLAuthentication .java:58)

at org.jivesoftware.smack.XMPPConnection.login(XMPPConnection.java:414)

at org.jivesoftware.smack.XMPPConnection.login(XMPPConnection.java:374)