Using 0.1.6 and getting "Broken pipe"

279 views
Skip to first unread message

Arthur Neves

unread,
Jul 20, 2011, 5:23:09 PM7/20/11
to Java client for Apple Push Notification service (APNs)
Hi,

really weird again, now I am using queued service, and if I want to
send a push notification for about 20 users, I am still getting the
following error:

java.net.SocketException: Broken pipe
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:
109)
at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
at sun.security.ssl.OutputRecord.writeBuffer(OutputRecord.java:314)
at sun.security.ssl.OutputRecord.write(OutputRecord.java:303)
at
sun.security.ssl.SSLSocketImpl.writeRecordInternal(SSLSocketImpl.java:
763)
at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:751)
at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:78)
at java.io.OutputStream.write(OutputStream.java:75)
at
com.notnoop.apns.internal.ApnsConnectionImpl.sendMessage(ApnsConnectionImpl.java:
100)
at
com.notnoop.apns.internal.ApnsServiceImpl.push(ApnsServiceImpl.java:
45)
at com.notnoop.apns.internal.QueuedApnsService
$1.run(QueuedApnsService.java:75)


Some solution for that?

Arthur Neves

unread,
Jul 20, 2011, 5:25:03 PM7/20/11
to Java client for Apple Push Notification service (APNs)
actually, I am also getting this message before the exception:


2011-07-20 17:20:07,026[internal.ApnsConnectionImpl]: Failed to send
message com.notnoop.apns.ApnsNotification@2324e0f5... trying again

Mahmood Ali

unread,
Jul 21, 2011, 12:28:12 AM7/21/11
to java-apn...@googlegroups.com
This should be marked as a WARNING not an ERROR in your logs, as it means that Apple has closed the connection. The subsequent logging message indicates the library re-attempted to deliver the message (successfully otherwise you would have seen another error).

Apple usually drops the connection if one of the device tokens is invalid (e.g. old token, production token when using sandbox and visa versa). Please ensure that you send notifications to valid device tokens only.

Regards,- Mahmood

Reply all
Reply to author
Forward
0 new messages