powered by Jive Software

Stange problem with Smack & Wildfire

Hi,

I’'m trying to test out some functionality of smack in conjunction with wildfire server.

I’'m using Wildfire 2.5.0 with smack-dev-2006-03-08 using jdk 1.4.2_08

I try the following in a loop (20 times):

  1. Open a connection.

  2. Login.

  3. Close the connection.

And I get the following Exception:

java.net.SocketException: Socket closed

at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:99)

at java.net.SocketOutputStream.write(SocketOutputStream.java:136)

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

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

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

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

java.net.SocketException: Software caused connection abort: recv failed

at java.net.SocketInputStream.socketRead0(Native Method)

at java.net.SocketInputStream.read(SocketInputStream.java:129)

at com.sun.net.ssl.internal.ssl.InputRecord.a(DashoA12275)

at com.sun.net.ssl.internal.ssl.InputRecord.read(DashoA12275)

at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)

at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA12275)

at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(DashoA12275)

at org.jivesoftware.smack.XMPPConnection.proceedTLSReceived(XMPPConnection.java:10 53)

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

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

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

Not connected to server.

java.lang.IllegalStateException: Not connected to server.

at org.jivesoftware.smack.XMPPConnection.sendPacket(XMPPConnection.java:672)

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

at org.jivesoftware.smack.SASLAuthentication.authenticate(SASLAuthentication.java: 213)

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

at com.bt.platform.services.jabber.command.Signon.execute(Signon.java:35)

at com.bt.platform.jabber.test.TestJabberConnection.main(TestJabberConnection.java :39)

java.lang.IllegalStateException: Not connected to server.

at org.jivesoftware.smack.XMPPConnection.sendPacket(XMPPConnection.java:672)

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

at org.jivesoftware.smack.SASLAuthentication.authenticate(SASLAuthentication.java: 223)

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

at com.bt.platform.services.jabber.command.Signon.execute(Signon.java:35)

at com.bt.platform.jabber.test.TestJabberConnection.main(TestJabberConnection.java :39)

Any clue?

Thanks in advance,

Partha.

Forgot to mention: this happenes randomly after a few successful log in.

Hi,

I wonder if Smack is sending the unavailable message of the previous session, the debug window shows that most of the closed connections did not send unavailable while the first connection does send an unavailable.

LG

1st connection:

/code

Sent packets of connection which causes the stacktrace:

/code

I got the same problem (mostly with Wildfire 2.4.0 connected by a weblogic server with smack 2.1.0). I will try sending unavailable packets manually to testify the hypothesis.

No, it didn’'t work. Still have the problem after changing the code.