powered by Jive Software

It''s difficult to login to gtalk these days

I’'m using smack-3.0.2 and smack-3.0.4_beta1.

when I use

xmppconn.connect();

xmppconn.login(“user”, “password”, “resource”);

There are aways exceptions :

XMPPError connecting to gmail.com:5222.: remote-server-error(502) XMPPError connecting to gmail.com:5222.

– caused by: java.net.ConnectException: Connection timed out

at org.jivesoftware.smack.XMPPConnection.connectUsingConfiguration(XMPPConnection. java:830)

at org.jivesoftware.smack.XMPPConnection.connect(XMPPConnection.java:1276)

at dictbot.jabber.GtalkDictBot.(GtalkDictBot.java:59)

at dictbot.jabber.GtalkDictBot.main(GtalkDictBot.java:93)

OR

connection started.

java.net.SocketException: Connection closed by remote host

at com.sun.net.ssl.internal.ssl.SSLSocketImpl.checkWrite(SSLSocketImpl.java:1187)

at com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:43)

at sun.nio.cs.StreamEncoder$CharsetSE.writeBytes(StreamEncoder.java:336)

at sun.nio.cs.StreamEncoder$CharsetSE.implFlushBuffer(StreamEncoder.java:404)

at sun.nio.cs.StreamEncoder$CharsetSE.implFlush(StreamEncoder.java:408)

at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:152)

at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:213)

at java.io.BufferedWriter.flush(BufferedWriter.java:236)

at org.jivesoftware.smack.util.ObservableWriter.flush(ObservableWriter.java:48)

at org.jivesoftware.smack.PacketWriter.writePackets(PacketWriter.java:274)

at org.jivesoftware.smack.PacketWriter.access$000(PacketWriter.java:40)

at org.jivesoftware.smack.PacketWriter$1.run(PacketWriter.java:87)

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:368)

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

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

connection colsed on error : input contained no data

It seems that it is the lag of google talk server that causes the SocketException

But, at the mean time, gaim/pidgin and gtalk can login to gtalk successfully.

Can somebody tell me why and how to fix it?