imnimit / javapns

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

Unable to connect to the APNS. #49

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Executing the same code from the Java environment
2.
3.

What is the expected output? What do you see instead?
Connected to the APNS

What version of the product are you using? On what operating system?
The current version of the product on Windows XP operating system

Please provide any additional information below.
Have been receiving the following error:
java.net.ConnectException: Connection timed out: connect
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
        at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
        at java.net.Socket.connect(Socket.java:520)
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:545)
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.<init>(SSLSocketImpl.java:348)
        at com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:69)
        at javapns.back.SSLConnectionHelper.getSSLSocket(Unknown Source)
        at javapns.back.PushNotificationManager.initializeConnection(Unknown Source)
        at com.homedepot.pushnotif.PushServlet.doPost(PushServlet.java:79)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at com.homedepot.ta.aa.dao.catalina.THDDAOValve.invoke(THDDAOValve.java:811)
        at com.homedepot.ta.aa.catalina.realm.THDSingleSignOn.invoke(THDSingleSignOn.java:473)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:595)

Original issue reported on code.google.com by arulmala...@gmail.com on 9 May 2011 at 1:37

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Connection Timed Out.... seems like a firewall issue. what does the debugging 
say?

Original comment by idbill.p...@gmail.com on 11 May 2011 at 10:58

GoogleCodeExporter commented 8 years ago
Not sure if this is a firewall issue..tried the same from home and office 
network, and getting the same connection timed out exception.

Here is what we do

public class Constants {
// APNs Server Host & port
public static String HOST = "gateway.sandbox.push.apple.com";
public static int PORT = 2195;
public static String CERTIFICATE = "local cert path";
public static String PASSWWORD = "password";
public static String DEVICE = "iPhone";
public static String SOUND = "default";
public static int BADGE = 66;
}

pushManager.initializeConnection(Constants.HOST, Constants.PORT, 
Constants.CERTIFICATE, Constants.PASSWWORD,
SSLConnectionHelper.KEYSTORE_TYPE_PKCS12);

Original comment by arulmala...@gmail.com on 12 May 2011 at 2:23

GoogleCodeExporter commented 8 years ago
what does the debugging output say?

http://code.google.com/p/javapns/wiki/Tips

Original comment by idb...@pugetworks.com on 16 May 2011 at 4:26

GoogleCodeExporter commented 8 years ago
arulmalar.t, were you able to solve the connection issue you reported?  If so, 
could you elaborate on what was the problem and how you solved it?  May we 
close the issue as fixed?

Original comment by sype...@gmail.com on 7 Sep 2011 at 3:46

GoogleCodeExporter commented 8 years ago
Issue suspected of being caused by user-specific network environment / 
configuration.

Closing issue as no feedback was received since issue was reported.  
Please feel free to re-open if the issue is still valid.

Original comment by sype...@gmail.com on 14 Sep 2011 at 3:53