powered by Jive Software

Smack and jabberd2

I have some simple Smack code that successfully connects to a Jive Messenger server. However, if I shutdown JM and start up jabberd 2.0s9, the smack code fails with “no response from server”. Meanwhile, I can open chats with, say, Exodus, via my jabberd2 server. I.e., Exodus works but Smack doesn’'t.

Are there known problems with smack 2.0.0 and jabberd 2.0s9?

Try setting the smack timeout to a higher value.

Try setting the smack timeout to a higher value.

Thanks. I tried setting it to 20000 ms and I still get the same error. About a minute later instead of about 16 seconds later with the default timeout. Since the default timeout is 5 seconds, it seems that Smack apparently tries three times behind the scenes, or uses 3 times the timeout. In any case, Smack simply doesn’‘t connect to my jabberd2 server. Meanwhile, Exodus continues to connect successfully. And meanwhile the identical Smack code connects without problems to a Jive Messenger server. Here’'s the Smack stacktrace. This happens when calling new XMPPConnection ((XMPPConnection.java:130)

Any other ideas?

Do your jabberd logs have any useful information?

FWIW, I get the same “no response from server” when using jabberd 1.4.4. But Jive Messenger works. I must have something misconfigured in Smack. But what? This happens during the initial new XMPPConnection() call.

The Smack debug screen shows the following raw packet sent:

I think this looks okay too. Yet Smack throws the Exception shown in my previous message.

This must be something simple. All ideas welcome. Thanks.

Very interestingly, reverting to Smack 1.5.1, my otherwise identical smack client code works with jabberd2!

Something must be broken in Smack 2.0.0. Any ideas?

For now, I can work with version 1.5.1, but that’'s obviously not a good long term solution.

jxt,

My guess is that something isn’‘t working with the new XMPP 1.0 compliant code (SASL and TLS). Do you know of a public jabberd2 server that we can test against to figure out what is going on? I’'ve created SMACK-88 to track progress on this.

Regards,

Matt

No, I don’‘t know of a public jabberd2 server, but that’'s not something I would know.

Unfortunately, I cannot open mine up to you because of firewall issues at my organization. I do have 5269 open for s2s, but not 5222.

If you want to test against your own jabberd installation, installing jabberd2 on a Linux box is not what I would call easy, but it is fairly straightforward, and the installation guide is very good.

public jabberd2: jabbernuke.com

public jabberd2: jabbernuke.com

Thanks for this. It turns out that my Smack 2.0.0 client code can connect to jabbernuke.com. So the question becomes what have I done wrong in my jabberd installation such that smack 1.5.1 connects but smack 2.0.0 doesn’'t?

OTOH, Exodus reports that jabbernuke is running jabberd 1.4.3. My specific smack problems were with jabberd 2.0s9 and jabberd 1.4.4. I have not tested jabberd 1.4.3 or earlier.

Yea, I just had checked on their website which said they upgraded to jabberd2 on aug 21. The search continues.

I found that xmpp.us is hosting a jabberd 2.0s6. And my smack 2.0.0 client can connect to and log in there. This still doesn’‘t completely disprove my claim that smack 2.0 doesn’‘t work with my jabberd 2 server which is 2.0s9, but it’'s looking more and more like my server installation may be bad.

But how? Exodus works with my server, but smack 2.0 doesn’'t. Meanwhile smack 1.5.1 does.

put up the exodus and smack XMPP traces maybe we can track down the origin of the failure

Thanks for the offer. I’‘ll post the Exodus logs later today. I’‘m testing some stuff while running another server right now. As for the smack traces, there’‘s very little there. The failure happens during new XMPPConnection(). I’'ve already posted the single raw sent packet and raw received packet that appear in the smack debug window. Is there more to look at somewhere else?

yeah, whoops i didnt see that. Sorry

Here are the Exodus logs when connecting to my jabberd2 server:

Looking up SRV: xmpp-client.tcp.proto-rdc.ornl.gov

Got A: 160.91.156.148 5222

SENT:

Comparing the SENT packet, the only difference with the smack SENT packet posted earlier is the addition of the xml:lang=“en” attribute.

The first received packet looks identical except for the id attribute and the second received packet looks identical.

That’'s all that shows up in the smack debugger window. Is there somewhere else to look?

Did you pull from the raw xml tabs in the smack debugger window? As the all packets tab only displays the packets after they have been parsed. If not post this raw output so we can see everything that smack is receiving and sending.

Yes, those are the raw packets.

Also, exodus doesn’‘t contain the XML closing </stream:stream> where smack does. Neither do the returned packets from jabberd and checking Messenger, it does not appear as the closing stanza is there either. I’'m not sure if that is the source of the problem but it is a contention between the two packet traces.

You can test it by telneting to your server on 5222 and sending the xml without the closing stanza.

You can test it by telneting to your server on 5222

and sending the xml without the closing stanza.

If I telnet and send:

packet. Then I can still go ahead and log in via telnet.