Trouble Communicating with APNS 2195

djhorners
New Contributor

Having a strange issue here. MDM enrolment worked no problem and APNS could be sent to devices (lock,wipe, etc). however when trying to add an app to the app catalogue i can not browse the app store at all. from the JSS server (Mac Mini 10.8.2) i can access the app store just fine. It took me a while but decided to bounce Tomcat, bingo, can browse the app store, but i can not send out APNS! I tried various connotations of replacing push cert, replacing built in cert etc still cannot send out APNS. iw ould suspect ports but it was working.... and i can run profile manager on a mac server on the same VLAN with the same ports open. I used an app called push diagnostics to check ports and then are open. However in my JSS logs i get the following:

2013-03-06 14:18:33,597 [ERROR] [APNSConnection ] - Unable to connect to APN server (565544369)
2013-03-06 14:18:33,597 [ERROR] [APNSConnection ] - Exception in APNSConnection: Unable to connect to APN server "gateway.push.apple.com:2195" (565544369)
2013-03-06 14:18:33,597 [ERROR] [APNSConnection ] - Exception (class com.jamfsoftware.pushnotification.APNSConnectionException : Unable to connect to APN server "gateway.push.apple.com:2195") sending check-in Notification for device: 1
2013-03-06 14:18:45,584 [ERROR] [APNSConnection ] - Exception (class java.net.SocketException : Malformed reply from SOCKS server) in getAPNSSocket (126244814)
2013-03-06 14:18:45,597 [ERROR] [APNSConnection ] - Unable to connect to APN server (126244814)
2013-03-06 14:18:45,597 [ERROR] [APNSConnection ] - Exception in APNSConnection: Unable to connect to APN server "gateway.push.apple.com:2195" (126244814)
2013-03-06 14:18:45,597 [ERROR] [APNSConnection ] - Exception (class com.jamfsoftware.pushnotification.APNSConnectionException : Unable to connect to APN server "gateway.push.apple.com:2195") sending check-in Notification for device: 1
2013-03-06 14:18:57,586 [ERROR] [APNSConnection ] - Exception (class java.net.SocketException : Malformed reply from SOCKS server) in getAPNSSocket (1091987127)
2013-03-06 14:18:57,598 [ERROR] [APNSConnection ] - Unable to connect to APN server (1091987127)
2013-03-06 14:18:57,598 [ERROR] [APNSConnection ] - Exception in APNSConnection: Unable to connect to APN server "gateway.push.apple.com:2195" (1091987127)
2013-03-06 14:18:57,598 [ERROR] [APNSConnection ] - Exception (class com.jamfsoftware.pushnotification.APNSConnectionException : Unable to connect to APN server "gateway.push.apple.com:2195") sending check-in Notification for device: 1

12 REPLIES 12

franton
Valued Contributor II

Looks like your firewall is blocking the traffic to the APNS servers. See the bottom of this Apple TN.

https://developer.apple.com/library/ios/#technotes/tn2265/_index.html

djhorners
New Contributor

yes thats what i thought originally. however then i set up Profile Manager on the same server and APNS works seamlessly. From what I can tell the port requirements are the same as Casper? 2195 is definitely open outbound as is 2196. i can even telnet from the server to APNS.

2195 and 2196 is open outbound to the whole 17.0.0.0 range as well

telnet gateway.push.apple.com 2195
Trying 17.149.36.230...
Connected to gateway.push-apple.com.akadns.net.
Escape character is '^]'.

kcuccia
New Contributor

We are having the same issue. We can also telnet to gateway.push.apple.com:2195 on the casper server. But the logs show it is blocked.

kcuccia
New Contributor

We are having the same issue. We can also telnet to gateway.push.apple.com:2195 on the casper server.

bentoms
Honored Contributor III
Honored Contributor III

Do you guys use proxies?

donmontalvo
Esteemed Contributor II

This thread kind of fizzled...was it that proxies were in the way? If so how was it handled?

--
https://donmontalvo.com

jcompton
Contributor

APNs can not function via a proxy. Period.

mbuckner
Contributor

We are having trouble with this, too. Any updates?

egill
New Contributor III

Anyone ever get this figured out? We are also having this same issue. My support team is looking into it but hasn't found a solution yet. I know it's an old post but seems to be the exact same problem. We are using 9.93, thanks!

SeanA
Contributor III

Check out this thread at https://jamfnation.jamfsoftware.com/discussion.html?id=20726; it seems that the Push Diagnostics app may be at issue here (at least for the August 2016 occurrence).

luke_reagor
Contributor II

We have recently set up HAProxy to load balance our JSS frontends and are now seeing similar APNS errors. We can connect to 2195 and 2196 from the JSS servers so it's not being blocked. I believe it has something to do with HAProxy since I heard of others using Pound to load balance their JSS's with no APNS issues. Also, it's only the receiving JSS servers giving the errors, not the sending. As in, I can send from one server with no errors, but the one with the main JSS address (the address the devices talk to) will show the error. Ex. I send from https://testjss:8443 and all my devices connect to https://jss.example.com:8443. Only https://jss.example.com:8443 will report the error.

2017-02-08 13:58:59,318 [ERROR] [Tomcat-2147] [APNSConnection ] - Exception (class java.net.ConnectException : Connection refused (Connection refused)) in getAPNSSocket (286908303)
2017-02-08 13:58:59,319 [ERROR] [Tomcat-2147] [APNSConnection ] - Unable to connect to APN server (286908303)
2017-02-08 13:58:59,319 [ERROR] [Tomcat-2147] [APNSConnection ] - Exception in APNSConnection: Unable to connect to APN server "gateway.push.apple.com:2195" (286908303)
2017-02-08 13:58:59,323 [ERROR] [Tomcat-2147] [PushNotificationUtility ] - Unable to send push notification com.jamfsoftware.jss.pushnotification.notifications.AppleMDMCheckInNotification@f23c87b2. Unable to connect to APN server "gateway.push.apple.com:2195"

hawkzhang45
New Contributor II

Same issue here, tried everything still not working.
Anyone solved this issue please offer some help. Thanks