我在iOS上有一個Worklight 6.1應用程序,其中包含推送通知。它工作正常,直到Worklight服務器出現問題。之後的所有推送通知都會失敗,直到服務器重新啓動。工作燈推送通知(APNS)因javax.net.ssl.SSLHandshakeException而失敗
工作燈服務器是自由8.5.5.0在Linux x86_64的 使用JDK:Java的1.7.0-IBM-1.7.0.5.0.x86_64 工作燈數據庫是德比(這是一個測試服務器)
當我啓動服務器時,一切正常。在服務器啓動
10分鐘後,我看到:
[2/20/14 19:39:15:319 CST] 0000003e com.notnoop.apns.internal.ApnsFeedbackConnection W Failed to retreive invalid devices
java.lang.RuntimeException: javax.net.ssl.SSLHandshakeException: com.ibm.jsse2.util.j: End user tried to act as a CA
但是,這似乎並沒有破壞任何東西。推送通知仍然有效。 30分鐘後服務器啓動,我看到:
[2/20/14 19:59:48:657 CST] 00000061 com.ibm.ws.webcontainer.util.ApplicationErrorUtils E SRVE0777E: Exception thrown by application class 'org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException:365'
org.jboss.resteasy.spi.UnhandledException: org.springframework.dao.InvalidDataAccessApiUsageException: Multiple DISTINCT aggregates are not supported at this time. {SELECT COUNT(DISTINCT t0.DEVICE), COUNT(DISTINCT t1.ID) FROM NOTIFICATION_DEVICE t0 INNER JOIN NOTIFICATION_USER t1 ON t0.USERSUBSCRIPTIONID = t1.ID WHERE (t0.APPLICATIONID IN (?) AND t0.PLATFORM = ?)} [code=30000, state=42Z02]; nested exception is <openjpa-1.2.2-r422266:898935 nonfatal user error> org.apache.openjpa.persistence.ArgumentException: Multiple DISTINCT aggregates are not supported at this time. {SELECT COUNT(DISTINCT t0.DEVICE), COUNT(DISTINCT t1.ID) FROM NOTIFICATION_DEVICE t0 INNER JOIN NOTIFICATION_USER t1 ON t0.USERSUBSCRIPTIONID = t1.ID WHERE (t0.APPLICATIONID IN (?) AND t0.PLATFORM = ?)} [code=30000, state=42Z02]
而到了推適配器的任何調用導致後:
[2/21/14 19:06:44:038 CST] 00000090 com.notnoop.apns.internal.ApnsConnectionImpl I Exception while waiting for error code
java.net.SocketException: Socket is closed
at com.ibm.jsse2.qc.j(qc.java:301)
at com.ibm.jsse2.e.read(e.java:32)
at java.io.InputStream.read(InputStream.java:102)
at com.notnoop.apns.internal.ApnsConnectionImpl$1MonitoringThread.run(ApnsConnectionImpl.java:114)
[2/21/14 19:06:44:650 CST] 00000085 com.notnoop.apns.internal.ApnsConnectionImpl I Failed to send message Message(Id=2; Token=499D9813FBC377CCDE787E2749CDA914F826EDF39B0830D4AFEEF7A5D71A1802; Payload={"aps":{"alert":{"body":"You have 4 available messages","action-loc-key":null},"sound":"","badge":4},"payload":"{\"alias\":\"myNotificationPush\"}"})... trying again after delay
javax.net.ssl.SSLHandshakeException: com.ibm.jsse2.util.j: End user tried to act as a CA
這導致同樣的失敗後,所有的重試。
在「最終用戶試圖充當CA」和「APNS」上有一些谷歌命中,表明這是一個JDK 1.5問題(在1.6中修復),並且可以通過使用IbmPKIX信任管理器,但我確定我正在使用JDK 1.7,並且java.security中的信任管理器爲PKIX
確定。我以爲我有這個順序,但進一步測試我真正可以說的是,有時候通過APNS的推動起作用,有時它會因上述錯誤而失敗。 –
notnoop與JRE 7 AFAIK不兼容。使用6並觀察是否有任何變化。 –
切換到java-x86_64-60(1.6.0)。現在,APNS在服務器啓動時工作,但稍後停止工作,Worklight服務器日誌中沒有任何錯誤。通知只是永遠不會到達設備上。 GCM一直沒有問題。 –