hengsokchamroeun / javapns

Automatically exported from code.google.com/p/javapns
0 stars 0 forks source link

strange logs, multiple connections? #186

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hello,

What steps will reproduce the problem?

Can't be sure but that the way i did: created enterprise application using 
JavaPNS2.2 as external jar. Than on xhtml page to see list of devices, mark 
some then click push and push is delivered but logs are strange. First PUSH 
(mark some device and click on push button) -> everything is fine. second logs 
are doubled, third - there are tripled ect. So my question : should i be 
worried about that because that means in 3rd try i'm connecting to APNS three 
times and later when i will be using large amount of PUSH-es i could get block 
from Apple. Or that is just bug in logs and connection is created only once. 
I'm using import org.apache.log4j.BasicConfigurator; and 
BasicConfigurator.configure(); for generating logs
and here are the logs:

 (http-localhost%2F127.0.0.1-8080-1) 146502 [http-localhost%2F127.0.0.1-8080-1] DEBUG javapns.notification.Payload  - Adding alert [two]
(http-localhost%2F127.0.0.1-8080-1) 146502 [http-localhost%2F127.0.0.1-8080-1] 
DEBUG javapns.notification.Payload  - Adding alert [two]
 (http-localhost%2F127.0.0.1-8080-1) 146502 [http-localhost%2F127.0.0.1-8080-1] DEBUG javapns.notification.Payload  - Adding alert [two]
 (http-localhost%2F127.0.0.1-8080-1) 146505 [http-localhost%2F127.0.0.1-8080-1] DEBUG javapns.communication.ConnectionToAppleServer  - Creating SSLSocketFactory
 (http-localhost%2F127.0.0.1-8080-1) 146505 [http-localhost%2F127.0.0.1-8080-1] DEBUG javapns.communication.ConnectionToAppleServer  - Creating SSLSocketFactory
 (http-localhost%2F127.0.0.1-8080-1) 146505 [http-localhost%2F127.0.0.1-8080-1] DEBUG javapns.communication.ConnectionToAppleServer  - Creating SSLSocketFactory
 (http-localhost%2F127.0.0.1-8080-1) 146509 [http-localhost%2F127.0.0.1-8080-1] DEBUG javapns.communication.ConnectionToAppleServer  - Creating SSLSocket to gateway.sa
ndbox.push.apple.com:2195
 (http-localhost%2F127.0.0.1-8080-1) 146509 [http-localhost%2F127.0.0.1-8080-1] DEBUG javapns.communication.ConnectionToAppleServer  - Creating SSLSocket to gateway.sa
ndbox.push.apple.com:2195
 (http-localhost%2F127.0.0.1-8080-1) 146509 [http-localhost%2F127.0.0.1-8080-1] DEBUG javapns.communication.ConnectionToAppleServer  - Creating SSLSocket to gateway.sa
ndbox.push.apple.com:2195
 (http-localhost%2F127.0.0.1-8080-1) 146658 [http-localhost%2F127.0.0.1-8080-1] DEBUG javapns.notification.PushNotificationManager  - Initialized Connection to Host: [

gateway.sandbox.push.apple.com] Port: [2195]: 3e6f28c4[SSL_NULL_WITH_NULL_NULL: 
Socket[addr=gateway.sandbox.push.apple.com/17.172.233.66,port=2195,localport=404
74]]
 (http-localhost%2F127.0.0.1-8080-1) 146658 [http-localhost%2F127.0.0.1-8080-1] DEBUG javapns.notification.PushNotificationManager  - Initialized Connection to Host: [
gateway.sandbox.push.apple.com] Port: [2195]: 3e6f28c4[SSL_NULL_WITH_NULL_NULL: 
Socket[addr=gateway.sandbox.push.apple.com/17.172.233.66,port=2195,localport=404
74]]
 (http-localhost%2F127.0.0.1-8080-1) 146658 [http-localhost%2F127.0.0.1-8080-1] DEBUG javapns.notification.PushNotificationManager  - Initialized Connection to Host: [
gateway.sandbox.push.apple.com] Port: [2195]: 3e6f28c4[SSL_NULL_WITH_NULL_NULL: 
Socket[addr=gateway.sandbox.push.apple.com/17.172.233.66,port=2195,localport=404
74]]
 (http-localhost%2F127.0.0.1-8080-1) 146658 [http-localhost%2F127.0.0.1-8080-1] DEBUG javapns.notification.PushNotificationManager  - Building Raw message from deviceT
oken and payload
 (http-localhost%2F127.0.0.1-8080-1) 146658 [http-localhost%2F127.0.0.1-8080-1] DEBUG javapns.notification.PushNotificationManager  - Building Raw message from deviceT
oken and payload
 (http-localhost%2F127.0.0.1-8080-1) 146658 [http-localhost%2F127.0.0.1-8080-1] DEBUG javapns.notification.PushNotificationManager  - Building Raw message from deviceT
oken and payload
 (http-localhost%2F127.0.0.1-8080-1) 146659 [http-localhost%2F127.0.0.1-8080-1] DEBUG javapns.notification.PushNotificationManager  - Built raw message ID 1 of total l
ength 68
(http-localhost%2F127.0.0.1-8080-1) 146659 [http-localhost%2F127.0.0.1-8080-1] 
DEBUG javapns.notification.PushNotificationManager  - Built raw message ID 1 of 
total l
ength 68
(http-localhost%2F127.0.0.1-8080-1) 146659 [http-localhost%2F127.0.0.1-8080-1] 
DEBUG javapns.notification.PushNotificationManager  - Built raw message ID 1 of 
total l
ength 68
 (http-localhost%2F127.0.0.1-8080-1) 146660 [http-localhost%2F127.0.0.1-8080-1] DEBUG javapns.notification.PushNotificationManager  - Attempting to send notification: 
{"aps":{"alert":"two"}}
 (http-localhost%2F127.0.0.1-8080-1) 146660 [http-localhost%2F127.0.0.1-8080-1] DEBUG javapns.notification.PushNotificationManager  - Attempting to send notification: 
{"aps":{"alert":"two"}}
 (http-localhost%2F127.0.0.1-8080-1) 146660 [http-localhost%2F127.0.0.1-8080-1] DEBUG javapns.notification.PushNotificationManager  - Attempting to send notification: 
{"aps":{"alert":"two"}}
 (http-localhost%2F127.0.0.1-8080-1) 146660 [http-localhost%2F127.0.0.1-8080-1] DEBUG javapns.notification.PushNotificationManager  -   to device: [token]
(http-localhost%2F127.0.0.1-8080-1) 146660 [http-localhost%2F127.0.0.1-8080-1] 
DEBUG javapns.notification.PushNotificationManager  -   to device: [token]
 (http-localhost%2F127.0.0.1-8080-1) 146660 [http-localhost%2F127.0.0.1-8080-1] DEBUG javapns.notification.PushNotificationManager  -   to device: [token]
 (http-localhost%2F127.0.0.1-8080-1) 147129 [http-localhost%2F127.0.0.1-8080-1] DEBUG javapns.notification.PushNotificationManager  - Flushing
(http-localhost%2F127.0.0.1-8080-1) 147129 [http-localhost%2F127.0.0.1-8080-1] 
DEBUG javapns.notification.PushNotificationManager  - Flushing
 (http-localhost%2F127.0.0.1-8080-1) 147129 [http-localhost%2F127.0.0.1-8080-1] DEBUG javapns.notification.PushNotificationManager  - Flushing
 (http-localhost%2F127.0.0.1-8080-1) 147130 [http-localhost%2F127.0.0.1-8080-1] DEBUG javapns.notification.PushNotificationManager  - At this point, the entire 68-byte
s message has been streamed out successfully through the SSL connection
 (http-localhost%2F127.0.0.1-8080-1) 147130 [http-localhost%2F127.0.0.1-8080-1] DEBUG javapns.notification.PushNotificationManager  - At this point, the entire 68-byte
s message has been streamed out successfully through the SSL connection
 (http-localhost%2F127.0.0.1-8080-1) 147130 [http-localhost%2F127.0.0.1-8080-1] DEBUG javapns.notification.PushNotificationManager  - At this point, the entire 68-byte
s message has been streamed out successfully through the SSL connection
 (http-localhost%2F127.0.0.1-8080-1) 147131 [http-localhost%2F127.0.0.1-8080-1] DEBUG javapns.notification.PushNotificationManager  - Notification sent on first attemp
t
 (http-localhost%2F127.0.0.1-8080-1) 147131 [http-localhost%2F127.0.0.1-8080-1] DEBUG javapns.notification.PushNotificationManager  - Notification sent on first attemp
t

 (http-localhost%2F127.0.0.1-8080-1) 147131 [http-localhost%2F127.0.0.1-8080-1] DEBUG javapns.notification.PushNotificationManager  - Notification sent on first attempt
 (http-localhost%2F127.0.0.1-8080-1) 147131 [http-localhost%2F127.0.0.1-8080-1] DEBUG javapns.notification.PushNotificationManager  - Building Raw message from deviceToken and payload
 (http-localhost%2F127.0.0.1-8080-1) 147131 [http-localhost%2F127.0.0.1-8080-1] DEBUG javapns.notification.PushNotificationManager  - Building Raw message from deviceToken and payload
 (http-localhost%2F127.0.0.1-8080-1) 147131 [http-localhost%2F127.0.0.1-8080-1] DEBUG javapns.notification.PushNotificationManager  - Building Raw message from deviceToken and payload
 (http-localhost%2F127.0.0.1-8080-1) 147132 [http-localhost%2F127.0.0.1-8080-1] DEBUG javapns.notification.PushNotificationManager  - Built raw message ID 2 of total length 68
 (http-localhost%2F127.0.0.1-8080-1) 147132 [http-localhost%2F127.0.0.1-8080-1] DEBUG javapns.notification.PushNotificationManager  - Built raw message ID 2 of total length 68
 (http-localhost%2F127.0.0.1-8080-1) 147132 [http-localhost%2F127.0.0.1-8080-1] DEBUG javapns.notification.PushNotificationManager  - Built raw message ID 2 of total length 68
 (http-localhost%2F127.0.0.1-8080-1) 147132 [http-localhost%2F127.0.0.1-8080-1] DEBUG javapns.notification.PushNotificationManager  - Attempting to send notification: {"aps":{"alert":"two"}}
 (http-localhost%2F127.0.0.1-8080-1) 147132 [http-localhost%2F127.0.0.1-8080-1] DEBUG javapns.notification.PushNotificationManager  - Attempting to send notification: {"aps":{"alert":"two"}}
2 (http-localhost%2F127.0.0.1-8080-1) 147132 
[http-localhost%2F127.0.0.1-8080-1] DEBUG 
javapns.notification.PushNotificationManager  - Attempting to send 
notification: {"aps":{"alert":"two"}}
 (http-localhost%2F127.0.0.1-8080-1) 147133 [http-localhost%2F127.0.0.1-8080-1] DEBUG javapns.notification.PushNotificationManager  -   to device: [token]
 (http-localhost%2F127.0.0.1-8080-1) 147133 [http-localhost%2F127.0.0.1-8080-1] DEBUG javapns.notification.PushNotificationManager  -   to device: [token]
 (http-localhost%2F127.0.0.1-8080-1) 147133 [http-localhost%2F127.0.0.1-8080-1] DEBUG javapns.notification.PushNotificationManager  -   to device: [token]
 (http-localhost%2F127.0.0.1-8080-1) 147134 [http-localhost%2F127.0.0.1-8080-1] DEBUG javapns.notification.PushNotificationManager  - Flushing
 (http-localhost%2F127.0.0.1-8080-1) 147134 [http-localhost%2F127.0.0.1-8080-1] DEBUG javapns.notification.PushNotificationManager  - Flushing
 (http-localhost%2F127.0.0.1-8080-1) 147134 [http-localhost%2F127.0.0.1-8080-1] DEBUG javapns.notification.PushNotificationManager  - Flushing
 (http-localhost%2F127.0.0.1-8080-1) 147134 [http-localhost%2F127.0.0.1-8080-1] DEBUG javapns.notification.PushNotificationManager  - At this point, the entire 68-bytes message has been streamed out successfully through the SSL connection
 (http-localhost%2F127.0.0.1-8080-1) 147134 [http-localhost%2F127.0.0.1-8080-1] DEBUG javapns.notification.PushNotificationManager  - At this point, the entire 68-bytes message has been streamed out successfully through the SSL connection
 (http-localhost%2F127.0.0.1-8080-1) 147134 [http-localhost%2F127.0.0.1-8080-1] DEBUG javapns.notification.PushNotificationManager  - At this point, the entire 68-bytes message has been streamed out successfully through the SSL connection
 (http-localhost%2F127.0.0.1-8080-1) 147135 [http-localhost%2F127.0.0.1-8080-1] DEBUG javapns.notification.PushNotificationManager  - Notification sent on first attempt
 (http-localhost%2F127.0.0.1-8080-1) 147135 [http-localhost%2F127.0.0.1-8080-1] DEBUG javapns.notification.PushNotificationManager  - Notification sent on first attempt
 (http-localhost%2F127.0.0.1-8080-1) 147135 [http-localhost%2F127.0.0.1-8080-1] DEBUG javapns.notification.PushNotificationManager  - Notification sent on first attempt
 (http-localhost%2F127.0.0.1-8080-1) 147136 [http-localhost%2F127.0.0.1-8080-1] DEBUG javapns.notification.PushNotificationManager  - Reading responses
 (http-localhost%2F127.0.0.1-8080-1) 147136 [http-localhost%2F127.0.0.1-8080-1] DEBUG javapns.notification.PushNotificationManager  - Reading responses
 (http-localhost%2F127.0.0.1-8080-1) 147136 [http-localhost%2F127.0.0.1-8080-1] DEBUG javapns.notification.PushNotificationManager  - Reading responses
 (http-localhost%2F127.0.0.1-8080-1) 152141 [http-localhost%2F127.0.0.1-8080-1] DEBUG javapns.notification.PushNotificationManager  - Closing connection
 (http-localhost%2F127.0.0.1-8080-1) 152141 [http-localhost%2F127.0.0.1-8080-1] DEBUG javapns.notification.PushNotificationManager  - Closing connection
 DEBUG javapns.notification.PushNotificationManager  - Closing connection

Original issue reported on code.google.com by matwo...@gmail.com on 23 May 2013 at 10:22

GoogleCodeExporter commented 8 years ago
my fault i forgot about 
BasicConfigurator.resetConfiguration();
        remove/close subject

Original comment by matwo...@gmail.com on 23 May 2013 at 10:32

GoogleCodeExporter commented 8 years ago
Closing.

Original comment by sype...@gmail.com on 23 May 2013 at 7:46