AnsweredAssumed Answered

android developer use asmack-android-8-4.0.5.jar

Question asked by favstiger on Dec 23, 2014
Latest reply on Dec 23, 2014 by favstiger

hi guys, I'm android xmpp developer, when I use asmack-android-8-4.0.5.jar, it often throw  java.net.SocketException, the log is like this

I have follow https://github.com/Flowdalic/asmack/blob/master/README.asmack  instruction,  and I hava goole this problem,  I can't find the answer.

Thank you.

 

12-23 16:53:22.923: W/PacketWriter(13991): Exception writing closing stream element

12-23 16:53:22.923: W/PacketWriter(13991): java.net.SocketException: sendto failed: EPIPE (Broken pipe)

12-23 16:53:22.923: W/PacketWriter(13991): at libcore.io.IoBridge.maybeThrowAfterSendto(IoBridge.java:499)

12-23 16:53:22.923: W/PacketWriter(13991): at libcore.io.IoBridge.sendto(IoBridge.java:468)

12-23 16:53:22.923: W/PacketWriter(13991): at java.net.PlainSocketImpl.write(PlainSocketImpl.java:507)

12-23 16:53:22.923: W/PacketWriter(13991): at java.net.PlainSocketImpl.access$100(PlainSocketImpl.java:46)

12-23 16:53:22.923: W/PacketWriter(13991): at java.net.PlainSocketImpl$PlainSocketOutputStream.write(PlainSocketImpl.java:269 )

12-23 16:53:22.923: W/PacketWriter(13991): at org.jivesoftware.smack.compression.Java7ZlibInputOutputStream$2.flush(Java7Zlib InputOutputStream.java:121)

12-23 16:53:22.923: W/PacketWriter(13991): at java.io.OutputStreamWriter.flushBytes(OutputStreamWriter.java:171)

12-23 16:53:22.923: W/PacketWriter(13991): at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:158)

12-23 16:53:22.923: W/PacketWriter(13991): at java.io.BufferedWriter.flush(BufferedWriter.java:124)

12-23 16:53:22.923: W/PacketWriter(13991): at org.jivesoftware.smack.tcp.PacketWriter.writePackets(PacketWriter.java:190)

12-23 16:53:22.923: W/PacketWriter(13991): at org.jivesoftware.smack.tcp.PacketWriter.access$000(PacketWriter.java:40)

12-23 16:53:22.923: W/PacketWriter(13991): at org.jivesoftware.smack.tcp.PacketWriter$1.run(PacketWriter.java:77)

12-23 16:53:22.923: W/PacketWriter(13991): Caused by: libcore.io.ErrnoException: sendto failed: EPIPE (Broken pipe)

12-23 16:53:22.923: W/PacketWriter(13991): at libcore.io.Posix.sendtoBytes(Native Method)

12-23 16:53:22.923: W/PacketWriter(13991): at libcore.io.Posix.sendto(Posix.java:147)

12-23 16:53:22.923: W/PacketWriter(13991): at libcore.io.BlockGuardOs.sendto(BlockGuardOs.java:177)

12-23 16:53:22.923: W/PacketWriter(13991): at libcore.io.IoBridge.sendto(IoBridge.java:466)

12-23 16:53:22.923: W/PacketWriter(13991): ... 10 more

12-23 16:53:22.926: W/XMPPConnection(13991): Connection closed with error

12-23 16:53:22.926: W/XMPPConnection(13991): java.net.SocketException: recvfrom failed: ECONNRESET (Connection reset by peer)

12-23 16:53:22.926: W/XMPPConnection(13991): at libcore.io.IoBridge.maybeThrowAfterRecvfrom(IoBridge.java:545)

12-23 16:53:22.926: W/XMPPConnection(13991): at libcore.io.IoBridge.recvfrom(IoBridge.java:509)

12-23 16:53:22.926: W/XMPPConnection(13991): at java.net.PlainSocketImpl.read(PlainSocketImpl.java:488)

12-23 16:53:22.926: W/XMPPConnection(13991): at java.net.PlainSocketImpl.access$000(PlainSocketImpl.java:46)

12-23 16:53:22.926: W/XMPPConnection(13991): at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:240)

12-23 16:53:22.926: W/XMPPConnection(13991): at java.io.InputStream.read(InputStream.java:163)

12-23 16:53:22.926: W/XMPPConnection(13991): at java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:198)

12-23 16:53:22.926: W/XMPPConnection(13991): at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:152)

12-23 16:53:22.926: W/XMPPConnection(13991): at java.io.InputStreamReader.read(InputStreamReader.java:244)

12-23 16:53:22.926: W/XMPPConnection(13991): at java.io.BufferedReader.read(BufferedReader.java:310)

12-23 16:53:22.926: W/XMPPConnection(13991): at org.kxml2.io.KXmlParser.fillBuffer(KXmlParser.java:1496)

12-23 16:53:22.926: W/XMPPConnection(13991): at org.kxml2.io.KXmlParser.peekType(KXmlParser.java:979)

12-23 16:53:22.926: W/XMPPConnection(13991): at org.kxml2.io.KXmlParser.next(KXmlParser.java:346)

12-23 16:53:22.926: W/XMPPConnection(13991): at org.kxml2.io.KXmlParser.next(KXmlParser.java:310)

12-23 16:53:22.926: W/XMPPConnection(13991): at org.jivesoftware.smack.tcp.PacketReader.parsePackets(PacketReader.java:291)

12-23 16:53:22.926: W/XMPPConnection(13991): at org.jivesoftware.smack.tcp.PacketReader.access$000(PacketReader.java:47)

12-23 16:53:22.926: W/XMPPConnection(13991): at org.jivesoftware.smack.tcp.PacketReader$1.run(PacketReader.java:81)

12-23 16:53:22.926: W/XMPPConnection(13991): Caused by: libcore.io.ErrnoException: recvfrom failed: ECONNRESET (Connection reset by peer)

12-23 16:53:22.926: W/XMPPConnection(13991): at libcore.io.Posix.recvfromBytes(Native Method)

12-23 16:53:22.926: W/XMPPConnection(13991): at libcore.io.Posix.recvfrom(Posix.java:132)

12-23 16:53:22.926: W/XMPPConnection(13991): at libcore.io.BlockGuardOs.recvfrom(BlockGuardOs.java:164)

12-23 16:53:22.926: W/XMPPConnection(13991): at libcore.io.IoBridge.recvfrom(IoBridge.java:506)

12-23 16:53:22.926: W/XMPPConnection(13991): ... 15 more

12-23 16:53:54.164: W/PacketWriter(13991): Exception writing closing stream element

12-23 16:53:54.164: W/PacketWriter(13991): java.net.SocketException: sendto failed: EPIPE (Broken pipe)

12-23 16:53:54.164: W/PacketWriter(13991): at libcore.io.IoBridge.maybeThrowAfterSendto(IoBridge.java:499)

12-23 16:53:54.164: W/PacketWriter(13991): at libcore.io.IoBridge.sendto(IoBridge.java:468)

12-23 16:53:54.164: W/PacketWriter(13991): at java.net.PlainSocketImpl.write(PlainSocketImpl.java:507)

12-23 16:53:54.164: W/PacketWriter(13991): at java.net.PlainSocketImpl.access$100(PlainSocketImpl.java:46)

12-23 16:53:54.164: W/PacketWriter(13991): at java.net.PlainSocketImpl$PlainSocketOutputStream.write(PlainSocketImpl.java:269 )

12-23 16:53:54.164: W/PacketWriter(13991): at org.jivesoftware.smack.compression.Java7ZlibInputOutputStream$2.flush(Java7Zlib InputOutputStream.java:121)

12-23 16:53:54.164: W/PacketWriter(13991): at java.io.OutputStreamWriter.flushBytes(OutputStreamWriter.java:171)

12-23 16:53:54.164: W/PacketWriter(13991): at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:158)

12-23 16:53:54.164: W/PacketWriter(13991): at java.io.BufferedWriter.flush(BufferedWriter.java:124)

12-23 16:53:54.164: W/PacketWriter(13991): at org.jivesoftware.smack.tcp.PacketWriter.writePackets(PacketWriter.java:190)

12-23 16:53:54.164: W/PacketWriter(13991): at org.jivesoftware.smack.tcp.PacketWriter.access$000(PacketWriter.java:40)

12-23 16:53:54.164: W/PacketWriter(13991): at org.jivesoftware.smack.tcp.PacketWriter$1.run(PacketWriter.java:77)

12-23 16:53:54.164: W/PacketWriter(13991): Caused by: libcore.io.ErrnoException: sendto failed: EPIPE (Broken pipe)

12-23 16:53:54.164: W/PacketWriter(13991): at libcore.io.Posix.sendtoBytes(Native Method)

12-23 16:53:54.164: W/PacketWriter(13991): at libcore.io.Posix.sendto(Posix.java:147)

12-23 16:53:54.164: W/PacketWriter(13991): at libcore.io.BlockGuardOs.sendto(BlockGuardOs.java:177)

12-23 16:53:54.164: W/PacketWriter(13991): at libcore.io.IoBridge.sendto(IoBridge.java:466)

12-23 16:53:54.164: W/PacketWriter(13991): ... 10 more

12-23 16:53:54.180: W/XMPPConnection(13991): Connection closed with error

12-23 16:53:54.180: W/XMPPConnection(13991): java.net.SocketException: recvfrom failed: ECONNRESET (Connection reset by peer)

12-23 16:53:54.180: W/XMPPConnection(13991): at libcore.io.IoBridge.maybeThrowAfterRecvfrom(IoBridge.java:545)

12-23 16:53:54.180: W/XMPPConnection(13991): at libcore.io.IoBridge.recvfrom(IoBridge.java:509)

12-23 16:53:54.180: W/XMPPConnection(13991): at java.net.PlainSocketImpl.read(PlainSocketImpl.java:488)

12-23 16:53:54.180: W/XMPPConnection(13991): at java.net.PlainSocketImpl.access$000(PlainSocketImpl.java:46)

12-23 16:53:54.180: W/XMPPConnection(13991): at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:240)

12-23 16:53:54.180: W/XMPPConnection(13991): at java.io.InputStream.read(InputStream.java:163)

12-23 16:53:54.180: W/XMPPConnection(13991): at java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:198)

12-23 16:53:54.180: W/XMPPConnection(13991): at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:152)

12-23 16:53:54.180: W/XMPPConnection(13991): at java.io.InputStreamReader.read(InputStreamReader.java:244)

12-23 16:53:54.180: W/XMPPConnection(13991): at java.io.BufferedReader.read(BufferedReader.java:310)

12-23 16:53:54.180: W/XMPPConnection(13991): at org.kxml2.io.KXmlParser.fillBuffer(KXmlParser.java:1496)

12-23 16:53:54.180: W/XMPPConnection(13991): at org.kxml2.io.KXmlParser.peekType(KXmlParser.java:979)

12-23 16:53:54.180: W/XMPPConnection(13991): at org.kxml2.io.KXmlParser.next(KXmlParser.java:346)

12-23 16:53:54.180: W/XMPPConnection(13991): at org.kxml2.io.KXmlParser.next(KXmlParser.java:310)

12-23 16:53:54.180: W/XMPPConnection(13991): at org.jivesoftware.smack.tcp.PacketReader.parsePackets(PacketReader.java:291)

12-23 16:53:54.180: W/XMPPConnection(13991): at org.jivesoftware.smack.tcp.PacketReader.access$000(PacketReader.java:47)

12-23 16:53:54.180: W/XMPPConnection(13991): at org.jivesoftware.smack.tcp.PacketReader$1.run(PacketReader.java:81)

12-23 16:53:54.180: W/XMPPConnection(13991): Caused by: libcore.io.ErrnoException: recvfrom failed: ECONNRESET (Connection reset by peer)

12-23 16:53:54.180: W/XMPPConnection(13991): at libcore.io.Posix.recvfromBytes(Native Method)

12-23 16:53:54.180: W/XMPPConnection(13991): at libcore.io.Posix.recvfrom(Posix.java:132)

12-23 16:53:54.180: W/XMPPConnection(13991): at libcore.io.BlockGuardOs.recvfrom(BlockGuardOs.java:164)

12-23 16:53:54.180: W/XMPPConnection(13991): at libcore.io.IoBridge.recvfrom(IoBridge.java:506)

12-23 16:53:54.180: W/XMPPConnection(13991): ... 15 more

Outcomes