mwkirk / javapns

Test import of svn javapns repo from Google Code
3 stars 0 forks source link

javapns works well when I test it at mac osx server, however not work on linux #158

Closed mwkirk closed 11 years ago

mwkirk commented 11 years ago

Original author: chencong...@163.com (December 06, 2012 12:52:22)

when I deployed javapns on a mac osx server, it works well as the following.

12-12-6 17:48:46 DEBUG (javapns.notification.Payload:219) - Adding alert [1210007] 12-12-6 17:48:46 DEBUG (javapns.communication.ConnectionToAppleServer:94) - Creating SSLSocketFactory 12-12-6 17:48:46 DEBUG (javapns.communication.ConnectionToAppleServer:149) - Creating SSLSocket to gateway.sandbox.push.apple.com:2195 12-12-6 17:48:48 DEBUG (javapns.notification.PushNotificationManager:111) - Initialized Connection to Host: [gateway.sandbox.push.apple.com] Port: [2195]: 2e879860[SSL_NULL_WITH_NULL_NULL: Socket[addr=gateway.sandbox.push.apple.com/17.149.34.66,port=2195,localport=52843]] 12-12-6 17:48:48 DEBUG (javapns.notification.PushNotificationManager:538) - Building Raw message from deviceToken and payload 12-12-6 17:48:48 DEBUG (javapns.notification.PushNotificationManager:617) - Built raw message ID 1 of total length 72 12-12-6 17:48:48 DEBUG (javapns.notification.PushNotificationManager:396) - Attempting to send notification: {"aps":{"alert":"1210007"}} 12-12-6 17:48:48 DEBUG (javapns.notification.PushNotificationManager:397) - to device: 04148cdde764f05ba7fb368df18998c5324449d466c8aee7afd130b0b8361f52 12-12-6 17:48:49 DEBUG (javapns.notification.PushNotificationManager:415) - Flushing 12-12-6 17:48:49 DEBUG (javapns.notification.PushNotificationManager:417) - At this point, the entire 72-bytes message has been streamed out successfully through the SSL connection 12-12-6 17:48:49 DEBUG (javapns.notification.PushNotificationManager:420) - Notification sent on first attempt 12-12-6 17:48:49 DEBUG (javapns.notification.PushNotificationManager:222) - Reading responses 12-12-6 17:48:54 DEBUG (javapns.notification.PushNotificationManager:200) - Closing connection


however, when I deploy it to the linux server, it show logs as the following, what happened? I can not get the push message for the device correctly.

12-12-6 16:42:28 DEBUG (javapns.notification.Payload:219) - Adding alert [1212100212] 12-12-6 16:42:28 DEBUG (javapns.communication.ConnectionToAppleServer:94) - Creating SSLSocketFactory 12-12-6 16:42:28 DEBUG (javapns.communication.ConnectionToAppleServer:149) - Creating SSLSocket to gateway.sandbox.push.apple.com:2195 12-12-6 16:42:28 DEBUG (javapns.notification.PushNotificationManager:111) - Initialized Connection to Host: [gateway.sandbox.push.apple.com] Port: [2195]: 5a940f82[SSL_NULL_WITH_NULL_NULL: Socket[addr=gateway.sandbox.push.apple.com/17.149.34.66,port=2195,localport=36547]] 12-12-6 16:42:28 DEBUG (javapns.notification.PushNotificationManager:222) - Reading responses 12-12-6 16:42:35 DEBUG (javapns.notification.PushNotificationManager:200) - Closing connection

Any help would be appreciated, thanks.

Original issue: http://code.google.com/p/javapns/issues/detail?id=158

mwkirk commented 11 years ago

From sype...@gmail.com on February 05, 2013 19:23:43 Are you absolutely sure that when your code runs under Linux, it has notifications to push? Looking at the log, it seems like you are asking to push ZERO notifications, thus opening and closing the connexion.

mwkirk commented 11 years ago

From sype...@gmail.com on March 01, 2013 17:22:09 Closing for lack of feedback from original poster.