I've got a Java program running on a firewalled server that is intended to send push notifications to my iPhone app by using java-apns. Problem is, whenever I try to send a notification the library fails to connect to the APNS server. From the stack trace, it seems that when creating the required SSL connection, the connection is being refused at some point (a java.net.ConnectException
with a detail message of "connection refused" is being thrown when the library calls SSLSocketFactory
's createSocket
method).
It would not surprise me at all if the firewall is blocking the connection, but unfortunately as I do not manage the server I am unable to verify that that is indeed the case. The fact that the program works fine from my (non-firewalled) desktop seems to support the theory.
My question is, does anyone know of any method by which I can find the root cause of the problem, and/or can anyone tell me what I should tell the server admin to change to get things to work (if it is indeed the firewall that's the problem)? My understanding of such things is a bit limited, but it should be as simple as unblocking outgoing connections on port 2195 (the port used by the APNS servers), right?
For reference, the server is a Linux box and I'm using version 0.1.2 of java-apns.