ravikantsharma7 / javapns

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

CommunicationException Connection timed out #188

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
We are using 2.3 from the trunk on Linux AWS EC2.

In the logs we are getting the following exception (result of calling 
mQueue.getCriticalExceptions() ):

Critical exceptions:[javapns.communication.exceptions.CommunicationException: 
Communication exception: java.net.ConnectException: Connection timed out, 
javapns.communication.exceptions.CommunicationException: Communication 
exception: java.net.ConnectException: Connection timed out, 
javapns.communication.exceptions.CommunicationException: Communication 
exception: java.net.ConnectException: Connection timed out, 
javapns.communication.exceptions.CommunicationException: Communication 
exception: java.net.ConnectException: Connection timed out, 
javapns.communication.exceptions.CommunicationException: Communication 
exception: java.net.ConnectException: Connection timed out, 
javapns.communication.exceptions.CommunicationException: Communication 
exception: java.net.ConnectException: Connection timed out, 
javapns.communication.exceptions.CommunicationException: Communication 
exception: java.net.ConnectException: Connection timed out, 
javapns.communication.exceptions.CommunicationException: Communication 
exception: java.net.ConnectException: Connection timed out, 
javapns.communication.exceptions.CommunicationException: Communication 
exception: java.net.ConnectException: Connection timed out, 
javapns.communication.exceptions.CommunicationException: Communication 
exception: java.net.ConnectException: Connection timed out]

It seems we are getting a ConnectException  each notification we send out.
However,  the result of 
mQueue.getPushedNotifications(true).getFailedNotifications() is empty.

I saw another closed ticket (Issue 172) related to the same topic but this is 
happening on every environment and  no security restrictions are applied to 
outbound connections.

Thank you in advance for looking into it.

Original issue reported on code.google.com by gianni.s...@gmail.com on 6 Jun 2013 at 10:48

GoogleCodeExporter commented 8 years ago
Any update on that ?
Thanks

Original comment by gianni.s...@gmail.com on 3 Jul 2013 at 4:17

GoogleCodeExporter commented 8 years ago
running into the same problem. Code works on our development environment but 
not on our production environment. 

javapns.communication.exceptions.CommunicationException: Communication 
exception: java.net.ConnectException: Connection timed out
Communication exception: java.net.ConnectException: Connection timed out

Error in MobilePushNotificationImpl

javapns.communication.exceptions.CommunicationException: Communication 
exception: java.net.ConnectException: Connection timed out
    at javapns.communication.ConnectionToAppleServer.getSSLSocket(ConnectionToAppleServer.java:158)
    at javapns.notification.PushNotificationManager.initializeConnection(PushNotificationManager.java:106)
    at javapns.notification.transmission.NotificationThread.runQueue(NotificationThread.java:257)
    at javapns.notification.transmission.NotificationThread.run(NotificationThread.java:202)
    at java.lang.Thread.run(Thread.java:662)
Caused by: java.net.ConnectException: Connection timed out
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
    at java.net.Socket.connect(Socket.java:529)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:559)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.<init>(SSLSocketImpl.java:360)
    at com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:71)
    at javapns.communication.ConnectionToAppleServer.getSSLSocket(ConnectionToAppleServer.java:155)
    ... 4 more

Original comment by mateusz....@gmail.com on 14 Nov 2013 at 4:32

GoogleCodeExporter commented 8 years ago
And it was the firewall ... we have a dedicated server for the feedbackservice 
but we are sending notifications from several server. Took me one week. Hope 
this helps someone.

Original comment by mateusz....@gmail.com on 19 Nov 2013 at 10:25

GoogleCodeExporter commented 8 years ago

Original comment by sype...@gmail.com on 11 Oct 2014 at 9:28