我有一個Java應用程序,它可以與Apple推送通知服務器(APNS)一起使用。我使用lib:JavaPNS.jar發送推送消息到iDevices。 但是,有時推送通知是不行的,我發現這樣的錯誤:Apns:通過遠程主機關閉的連接
[16:35:40] Andrew Balakhanov: 2012-10-27 04:00:00,616 WARN [com.notnoop.apns.internal.ApnsConnectionImpl] Failed to send message [email protected] trying again java.net.SocketException: Connection closed by remote host at com.sun.net.ssl.internal.ssl.SSLSocketImpl.checkWrite(SSLSocketImpl.java:1339) at com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:44) at java.io.OutputStream.write(OutputStream.java:58) at com.notnoop.apns.internal.ApnsConnectionImpl.sendMessage(ApnsConnectionImpl.java:161) at com.notnoop.apns.internal.ApnsServiceImpl.push(ApnsServiceImpl.java:46) at com.notnoop.apns.internal.AbstractApnsService.push(AbstractApnsService.java:52) at com.notnoop.apns.internal.ApnsServiceImpl.push(ApnsServiceImpl.java:36) at com.clinics.core.api.util.APN.sendReminderAlert(APN.java:55) at com.clinics.core.api.services.schedule.reminder.impl.ReminderSenderMobile.prepareAndSend(ReminderSenderMobile.java:190) at com.clinics.core.api.services.schedule.reminder.impl.ReminderSenderMobile.send(ReminderSenderMobile.java:132) at com.clinics.core.api.services.schedule.reminder.AbstractReminderFacade.generateAndSendReports(AbstractReminderFacade.java:53) at com.clinics.core.api.services.schedule.reminder.ReminderJob.doIt(ReminderJob.java:64) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:273) at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:264) at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86) at org.quartz.core.JobRunShell.run(JobRunShell.java:202) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525)
能否請你告訴我,什麼錯誤意味着什麼?這是否意味着,蘋果服務器禁止我,是否意味着我發送了太多請求?
現在我得到相同的例外,但我也可以得到推送消息。你知道如何解決這個問題嗎?謝謝 :) – Felix