在我的本地jboss 7.1服务器上运行的java源代码将苹果推送通知发送到我的设备。当我尝试使用本地服务器URL时,连接被拒绝。下面是我的jboss本地服务器日志。我无法检测到问题,因为它在生产服务器中运行良好,但在本地服务器中运行良好。
ServerLog中:
13:17:14,787 ERROR [stderr] (mohitsending_notification_for_ondemand_ios) Info: Apple push notification: Error in push notification.
13:17:14,787 ERROR [stderr] (mohitsending_notification_for_ondemand_ios) javapns.communication.exceptions.CommunicationException: Communication exception: java.net.UnknownHostException: gateway.sandbox.push.apple.com
13:17:14,787 ERROR [stderr] (mohitsending_notification_for_ondemand_ios) at javapns.communication.ConnectionToAppleServer.getSSLSocket(ConnectionToAppleServer.java:158)
13:17:14,787 ERROR [stderr] (mohitsending_notification_for_ondemand_ios) at javapns.notification.PushNotificationManager.initializeConnection(PushNotificationManager.java:106)
13:17:14,803 ERROR [stderr] (mohitsending_notification_for_ondemand_ios) at javapns.notification.transmission.NotificationThread.runList(NotificationThread.java:215)
13:17:14,803 ERROR [stderr] (mohitsending_notification_for_ondemand_ios) at javapns.notification.transmission.NotificationThread.run(NotificationThread.java:199)
13:17:14,803 ERROR [stderr] (mohitsending_notification_for_ondemand_ios) at java.lang.Thread.run(Thread.java:722)
13:17:14,803 ERROR [stderr] (mohitsending_notification_for_ondemand_ios) Caused by: java.net.UnknownHostException: gateway.sandbox.push.apple.com
13:17:14,803 ERROR [stderr] (mohitsending_notification_for_ondemand_ios) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:178)
13:17:14,803 ERROR [stderr] (mohitsending_notification_for_ondemand_ios) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:157)
13:17:14,819 ERROR [stderr] (mohitsending_notification_for_ondemand_ios) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)
13:17:14,819 ERROR [stderr] (mohitsending_notification_for_ondemand_ios) at java.net.Socket.connect(Socket.java:579)
13:17:14,819 ERROR [stderr] (mohitsending_notification_for_ondemand_ios) at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:618)
13:17:14,819 ERROR [stderr] (mohitsending_notification_for_ondemand_ios) at sun.security.ssl.SSLSocketImpl.<init>(SSLSocketImpl.java:407)
13:17:14,819 ERROR [stderr] (mohitsending_notification_for_ondemand_ios) at sun.security.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:88)
13:17:14,819 ERROR [stderr] (mohitsending_notification_for_ondemand_ios) at javapns.communication.ConnectionToAppleServer.getSSLSocket(ConnectionToAppleServer.java:155)
13:17:14,819 ERROR [stderr] (mohitsending_notification_for_ondemand_ios) ... 4 more