powered by Jive Software

Smack 2.0 can''t connect to Jabber

When I try to connect ejabberd server using Smack 2.0[/b] I get following message:

Connection failed. No response from server.:

at org.jivesoftware.smack.PacketReader.startup(PacketReader.java:170)

at org.jivesoftware.smack.XMPPConnection.init(XMPPConnection.java:766)

at org.jivesoftware.smack.XMPPConnection.(XMPPConnection.java:146)

After I had switched back to Smack 1.5.1[/b], XMPPConnection class established connection to ejabberd server without any problems.

Is there a bug or new feature?

Hey slava_cps,

I guess that you have hit a known problem that happens when the server reports that it supports XMPP 1.0 but is not offering TLS. The problem has been fixed so I would recommend downloading the nightly build version and give it a try. BTW, a couple of other bugs have been fixed too. If you want to stick with Smack 2.0.0 then try enabling starttls support in the ejabberd server.


– Gato

Hi Gaston,

Thanks for your answer, but in nightly builds I had found several other bugs and switched back to Smack 1.5.1. I prefer to use Smack 1.5.1 until new stable build will appear.



Hey Slava,

Could you comment more on the problems that you found using the latest nightly build?


– Gato

I saw the following uncaught exception while trying to connect to a jabber.org JID. This was with smack-dev-2005-09-25.

The connection attempt returned an “Connection failed. No response from server” exception, which I believe was correct – the server was being slow – but the exception was unhappy.

java.io.EOFException: input contained no data

at org.xmlpull.mxp1.MXParser.fillBuf(MXParser.java:2982)

at org.xmlpull.mxp1.MXParser.more(MXParser.java:3025)

at org.xmlpull.mxp1.MXParser.parseProlog(MXParser.java:1410)

at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1395)

at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)

at org.jivesoftware.smack.PacketReader.parsePackets(PacketReader.java:348)

at org.jivesoftware.smack.PacketReader.access$000(PacketReader.java:42)

at org.jivesoftware.smack.PacketReader$1.run(PacketReader.java:62)

Oh, I also saw my PacketCollector’'s accept method being called with a null packet argument. Again, it was inside parsePackets.


at org.volity.jabber.RPCRequester$1.accept(RPCRequester.java:110)

at org.jivesoftware.smack.PacketCollector.processPacket(PacketCollector.java:174)

at org.jivesoftware.smack.PacketReader.processPacket(PacketReader.java:402)

at org.jivesoftware.smack.PacketReader.parsePackets(PacketReader.java:275)

at org.jivesoftware.smack.PacketReader.access$000(PacketReader.java:42)

at org.jivesoftware.smack.PacketReader$1.run(PacketReader.java:62)