Open santosh-1987 opened 8 years ago
I can confirm that... After calling:
apnsClient.push(payload, token);
thread enters into WAITING (or TIMED_WAITING I can't remember) state... As the result no PUSH messages were delivered...
Here is how I am instantiating new service:
APNS.newService() .asPool(Configuration.getExecutor(), 12) .withDelegate(getDelegate()) .withCert(Configuration.APNS_PROD_KEY_STORE, Configuration.APNS_PROD_KEY_STORE_PASSWORD) .withReconnectPolicy(ReconnectPolicy.Provided.EVERY_HALF_HOUR) .withProductionDestination() .build();
Also I have noticed that .build()
in ApnsServiceBuilder
instantiates ApnsServiceImpl
and calls start()
, whereas in class ApnsServiceImpl function start()
is empty...
Am I missing something? Or doing it wrong?
Thanks in advance...
I also sometimes encounter the infinite blocking on service.push()
.
It's hard to debug because it only happens very rarely.
I had this today as well. It seems to be SSL related, although I'm still figuring out what causes it.
Using IBM J9 JVM and (sadly) with an older apns-0.2.3
version.
11:11:04 [APP] 1 Task seem to not respond anymore (stack trace to follow).
11:11:04 [APP] StackTrace for thread Worker-9
11:11:04 [APP] java.net.SocketInputStream.socketRead0(Native Method)
11:11:04 [APP] java.net.SocketInputStream.read(SocketInputStream.java:140)
11:11:04 [APP] com.ibm.jsse2.c.a(c.java:125)
11:11:04 [APP] com.ibm.jsse2.c.a(c.java:245)
11:11:04 [APP] com.ibm.jsse2.SSLSocketImpl.a(SSLSocketImpl.java:852)
11:11:04 [APP] com.ibm.jsse2.SSLSocketImpl.h(SSLSocketImpl.java:691)
11:11:04 [APP] com.ibm.jsse2.SSLSocketImpl.a(SSLSocketImpl.java:99)
11:11:04 [APP] com.ibm.jsse2.l.write(l.java:4)
11:11:04 [APP] java.io.OutputStream.write(OutputStream.java:69)
11:11:04 [APP] com.notnoop.apns.internal.ApnsConnectionImpl.sendMessage(ApnsConnectionImpl.java:240)
11:11:05 [APP] com.notnoop.apns.internal.ApnsConnectionImpl.sendMessage(ApnsConnectionImpl.java:230)
11:11:05 [APP] com.notnoop.apns.internal.ApnsServiceImpl.push(ApnsServiceImpl.java:46)
11:11:05 [APP] com.notnoop.apns.internal.AbstractApnsService.push(AbstractApnsService.java:56)
11:11:05 [APP] com.notnoop.apns.internal.ApnsServiceImpl.push(ApnsServiceImpl.java:36)
11:11:05 [APP] com.notnoop.apns.internal.AbstractApnsService.push(AbstractApnsService.java:45)
11:11:05 [APP] com.myapp.mypackage.common.notification.NotificationManager.sendJobNotifications(NotificationManager.java:265)
11:11:05 [APP] com.myapp.mypackage.tasklets.NotificationTask.doRun(NotificationTask.java:37)
11:11:05 [APP] com.ibm.dots.task.AbstractServerTaskExt.run(AbstractServerTaskExt.java:47)
11:11:05 [APP] com.ibm.dots.task.JobTaskService$ServiceTaskJob.doRun(JobTaskService.java:136)
11:11:05 [APP] com.ibm.dots.task.JobTaskService$ServiceTaskJob.run(JobTaskService.java:99)
11:11:05 [APP] org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
11:11:05 [APP] Still Waiting for 1 manual tasks to complete
11:11:36 [APP] Still Waiting for 1 manual tasks to complete
11:12:05 [APP] Still Waiting for 1 manual tasks to complete
11:12:36 [APP] Still Waiting for 1 manual tasks to complete
11:13:06 [APP] 1 Task seem to not respond anymore (stack trace to follow).
11:13:06 [APP] StackTrace for thread Worker-9
11:13:06 [APP] java.net.SocketInputStream.socketRead0(Native Method)
11:13:06 [APP] java.net.SocketInputStream.read(SocketInputStream.java:140)
11:13:06 [APP] com.ibm.jsse2.c.a(c.java:125)
11:13:06 [APP] com.ibm.jsse2.c.a(c.java:245)
11:13:06 [APP] com.ibm.jsse2.SSLSocketImpl.a(SSLSocketImpl.java:852)
11:13:06 [APP] com.ibm.jsse2.SSLSocketImpl.h(SSLSocketImpl.java:691)
11:13:06 [APP] com.ibm.jsse2.SSLSocketImpl.a(SSLSocketImpl.java:99)
11:13:06 [APP] com.ibm.jsse2.l.write(l.java:4)
11:13:06 [APP] java.io.OutputStream.write(OutputStream.java:69)
11:13:06 [APP] com.notnoop.apns.internal.ApnsConnectionImpl.sendMessage(ApnsConnectionImpl.java:240)
11:13:06 [APP] com.notnoop.apns.internal.ApnsConnectionImpl.sendMessage(ApnsConnectionImpl.java:230)
11:13:06 [APP] com.notnoop.apns.internal.ApnsServiceImpl.push(ApnsServiceImpl.java:46)
11:13:06 [APP] com.notnoop.apns.internal.AbstractApnsService.push(AbstractApnsService.java:56)
11:13:06 [APP] com.notnoop.apns.internal.ApnsServiceImpl.push(ApnsServiceImpl.java:36)
11:13:06 [APP] com.notnoop.apns.internal.AbstractApnsService.push(AbstractApnsService.java:45)
11:13:06 [APP] com.myapp.mypackage.common.notification.NotificationManager.sendJobNotifications(NotificationManager.java:265)
11:13:06 [APP] com.myapp.mypackage.tasklets.NotificationTask.doRun(NotificationTask.java:37)
11:13:06 [APP] com.ibm.dots.task.AbstractServerTaskExt.run(AbstractServerTaskExt.java:47)
11:13:06 [APP] com.ibm.dots.task.JobTaskService$ServiceTaskJob.doRun(JobTaskService.java:136)
11:13:06 [APP] com.ibm.dots.task.JobTaskService$ServiceTaskJob.run(JobTaskService.java:99)
11:13:06 [APP] org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
we switchted to pushy, works great!
On Wed, 26 Apr 2017 at 12:19, Petr Petrov notifications@github.com wrote:
I had this today as well. It seems to be an SSL related, although I'm still figuring out what causes it.
Using IBM J9 JVM and (sadly) with an old apns-0.2.3 version.
11:11:04 [APP] 1 Task seem to not respond anymore (stack trace to follow). 11:11:04 [APP] StackTrace for thread Worker-9 11:11:04 [APP] java.net.SocketInputStream.socketRead0(Native Method) 11:11:04 [APP] java.net.SocketInputStream.read(SocketInputStream.java:140) 11:11:04 [APP] com.ibm.jsse2.c.a(c.java:125) 11:11:04 [APP] com.ibm.jsse2.c.a(c.java:245) 11:11:04 [APP] com.ibm.jsse2.SSLSocketImpl.a(SSLSocketImpl.java:852) 11:11:04 [APP] com.ibm.jsse2.SSLSocketImpl.h(SSLSocketImpl.java:691) 11:11:04 [APP] com.ibm.jsse2.SSLSocketImpl.a(SSLSocketImpl.java:99) 11:11:04 [APP] com.ibm.jsse2.l.write(l.java:4) 11:11:04 [APP] java.io.OutputStream.write(OutputStream.java:69) 11:11:04 [APP] com.notnoop.apns.internal.ApnsConnectionImpl.sendMessage(ApnsConnectionImpl.java:240) 11:11:05 [APP] com.notnoop.apns.internal.ApnsConnectionImpl.sendMessage(ApnsConnectionImpl.java:230) 11:11:05 [APP] com.notnoop.apns.internal.ApnsServiceImpl.push(ApnsServiceImpl.java:46) 11:11:05 [APP] com.notnoop.apns.internal.AbstractApnsService.push(AbstractApnsService.java:56) 11:11:05 [APP] com.notnoop.apns.internal.ApnsServiceImpl.push(ApnsServiceImpl.java:36) 11:11:05 [APP] com.notnoop.apns.internal.AbstractApnsService.push(AbstractApnsService.java:45) 11:11:05 [APP] com.myapp.mypackage.common.notification.NotificationManager.sendJobNotifications(NotificationManager.java:265) 11:11:05 [APP] com.myapp.mypackage.tasklets.NotificationTask.doRun(NotificationTask.java:37) 11:11:05 [APP] com.ibm.dots.task.AbstractServerTaskExt.run(AbstractServerTaskExt.java:47) 11:11:05 [APP] com.ibm.dots.task.JobTaskService$ServiceTaskJob.doRun(JobTaskService.java:136) 11:11:05 [APP] com.ibm.dots.task.JobTaskService$ServiceTaskJob.run(JobTaskService.java:99) 11:11:05 [APP] org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) 11:11:05 [APP] Still Waiting for 1 manual tasks to complete 11:11:36 [APP] Still Waiting for 1 manual tasks to complete 11:12:05 [APP] Still Waiting for 1 manual tasks to complete 11:12:36 [APP] Still Waiting for 1 manual tasks to complete 11:13:06 [APP] 1 Task seem to not respond anymore (stack trace to follow). 11:13:06 [APP] StackTrace for thread Worker-9 11:13:06 [APP] java.net.SocketInputStream.socketRead0(Native Method) 11:13:06 [APP] java.net.SocketInputStream.read(SocketInputStream.java:140) 11:13:06 [APP] com.ibm.jsse2.c.a(c.java:125) 11:13:06 [APP] com.ibm.jsse2.c.a(c.java:245) 11:13:06 [APP] com.ibm.jsse2.SSLSocketImpl.a(SSLSocketImpl.java:852) 11:13:06 [APP] com.ibm.jsse2.SSLSocketImpl.h(SSLSocketImpl.java:691) 11:13:06 [APP] com.ibm.jsse2.SSLSocketImpl.a(SSLSocketImpl.java:99) 11:13:06 [APP] com.ibm.jsse2.l.write(l.java:4) 11:13:06 [APP] java.io.OutputStream.write(OutputStream.java:69) 11:13:06 [APP] com.notnoop.apns.internal.ApnsConnectionImpl.sendMessage(ApnsConnectionImpl.java:240) 11:13:06 [APP] com.notnoop.apns.internal.ApnsConnectionImpl.sendMessage(ApnsConnectionImpl.java:230) 11:13:06 [APP] com.notnoop.apns.internal.ApnsServiceImpl.push(ApnsServiceImpl.java:46) 11:13:06 [APP] com.notnoop.apns.internal.AbstractApnsService.push(AbstractApnsService.java:56) 11:13:06 [APP] com.notnoop.apns.internal.ApnsServiceImpl.push(ApnsServiceImpl.java:36) 11:13:06 [APP] com.notnoop.apns.internal.AbstractApnsService.push(AbstractApnsService.java:45) 11:13:06 [APP] com.myapp.mypackage.common.notification.NotificationManager.sendJobNotifications(NotificationManager.java:265) 11:13:06 [APP] com.myapp.mypackage.tasklets.NotificationTask.doRun(NotificationTask.java:37) 11:13:06 [APP] com.ibm.dots.task.AbstractServerTaskExt.run(AbstractServerTaskExt.java:47) 11:13:06 [APP] com.ibm.dots.task.JobTaskService$ServiceTaskJob.doRun(JobTaskService.java:136) 11:13:06 [APP] com.ibm.dots.task.JobTaskService$ServiceTaskJob.run(JobTaskService.java:99) 11:13:06 [APP] org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
— You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub https://github.com/notnoop/java-apns/issues/289#issuecomment-297337589, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJnzmzv5Ty6zEDWjW53cM21c_OXu2Hpks5rzxoTgaJpZM4HLkIb .
-- Sent from Gmail Mobile
@matzew AFAIS, this is a timeout issue (or the lack of a socket timeout to be more precise) that have probably already been fixed in the latest apns version.
But yeah, as I look the commits section, pushy does seem more frequently updated.
Hi , Team My java application which is currently hosted in AWS is freezing during sending notification to multiple devices .
I am using the following JDK and environment [ec2-user@ip-10-96-285-17 ~]$ java -version java version "1.6.0_37" OpenJDK Runtime Environment (IcedTea6 1.13.9) (rhel-1.13.9.4.el6_7-x86_64) OpenJDK 64-Bit Server VM (build 23.25-b01, mixed mode)
CentOS release 6.7 (Final)
I am not sure why does it freeze continuously, Here is the Dump that I have collected when the application freezed .
STATUS | wrapper | 2016/01/23 01:40:29 | Dumping JVM state. INFO | jvm 1 | 2016/01/23 01:40:29 | 2016-01-23 01:40:29 INFO | jvm 1 | 2016/01/23 01:40:29 | Full thread dump OpenJDK 64-Bit Server VM (23.25-b01 mixed mode): INFO | jvm 1 | 2016/01/23 01:40:29 | INFO | jvm 1 | 2016/01/23 01:40:29 | "MonitoringThread-4023" daemon prio=10 tid=0x00007fc76c00e000 nid=0x45ef runnable [0x00007fc7870c4000] INFO | jvm 1 | 2016/01/23 01:40:29 | java.lang.Thread.State: RUNNABLE INFO | jvm 1 | 2016/01/23 01:40:29 | at java.net.SocketInputStream.socketRead0(Native Method) INFO | jvm 1 | 2016/01/23 01:40:29 | at java.net.SocketInputStream.read(SocketInputStream.java:146) INFO | jvm 1 | 2016/01/23 01:40:29 | at sun.security.ssl.InputRecord.readFully(InputRecord.java:442) INFO | jvm 1 | 2016/01/23 01:40:29 | at sun.security.ssl.InputRecord.read(InputRecord.java:480) INFO | jvm 1 | 2016/01/23 01:40:29 | at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:922) INFO | jvm 1 | 2016/01/23 01:40:29 |
INFO | jvm 1 | 2016/01/23 01:40:29 | Found 4 deadlocks. INFO | jvm 1 | 2016/01/23 01:40:29 |
INFO | jvm 1 | 2016/01/23 01:40:29 | Heap INFO | jvm 1 | 2016/01/23 01:40:29 | PSYoungGen total 259648K, used 245744K [0x00000007aaab0000, 0x00000007baab0000, 0x0000000800000000) INFO | jvm 1 | 2016/01/23 01:40:29 | eden space 257152K, 94% used [0x00000007aaab0000,0x00000007b985c2b0,0x00000007ba5d0000) INFO | jvm 1 | 2016/01/23 01:40:29 | from space 2496K, 94% used [0x00000007ba840000,0x00000007baa90000,0x00000007baab0000) INFO | jvm 1 | 2016/01/23 01:40:29 | to space 2496K, 0% used [0x00000007ba5d0000,0x00000007ba5d0000,0x00000007ba840000) INFO | jvm 1 | 2016/01/23 01:40:29 | ParOldGen total 1363712K, used 1240878K [0x0000000700000000, 0x00000007533c0000, 0x00000007aaab0000) INFO | jvm 1 | 2016/01/23 01:40:29 | object space 1363712K, 90% used [0x0000000700000000,0x000000074bbcbbd0,0x00000007533c0000) INFO | jvm 1 | 2016/01/23 01:40:29 | PSPermGen total 40384K, used 40334K [0x00000006f5a00000, 0x00000006f8170000, 0x0000000700000000) INFO | jvm 1 | 2016/01/23 01:40:29 | object space 40384K, 99% used [0x00000006f5a00000,0x00000006f8163a70,0x00000006f8170000)
Any Help would be much Appreciated .
Thank You