APNs client pipeline caught an exception - An existing connection was forcibly closed by the remote

74 views
Skip to first unread message

NG K

unread,
Jan 25, 2017, 5:38:11 PM1/25/17
to pushy
Hi,

I have deployed the my app which uses pushy in tomcat and made the netty jars replaced in tomcat lib.

Tested the pushnotification and it worked, i did receive the token in my mobile however after few minutes i got the below exception.

As suggested, i initiated apns client during startup but not every time i send the notification as it is long lived.

what should be done for this ..? please suggest, shall i initiate client everytime i send and close when i the notification was sent..?

2017-01-25 16:23:03.850-0600 WARN  [nioEventLoopGroup-3-1]ApnsClientHandler.exceptionCaught:380 APNs client pipeline caught an exception.
java.io.IOException: An existing connection was forcibly closed by the remote host
at sun.nio.ch.SocketDispatcher.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:43)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
at sun.nio.ch.IOUtil.read(IOUtil.java:192)
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380)
at io.netty.buffer.PooledUnsafeDirectByteBuf.setBytes(PooledUnsafeDirectByteBuf.java:288)
at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1100)
at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:366)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:118)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:651)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:574)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:488)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:450)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:873)
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144)
at java.lang.Thread.run(Thread.java:745)

Jon Chambers

unread,
Jan 26, 2017, 1:51:18 AM1/26/17
to NG K, pushy
Does this happen often, or did it just happen once? To me, that just sounds like routine network weirdness. Also, an ApnsClient should reconnect automatically when something like this happens. Do you have reason to believe that didn't happen in your case?

-Jon

--
Pushy is an open-source Java library for sending APNs (iOS and OS X) push notifications. Pushy is brought to you by the engineers at RelayRides.
---
You received this message because you are subscribed to the Google Groups "pushy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pushy-apns+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages