Testing APNS on Windows Server

ChrisTech
Contributor

I'm trying to troubleshoot APNS on my JSS. I tried to telnet telnet gateway.push.apple.com 2195 / 2196 but all I get is a blank screen on the Windows server. On my Mac I get some acknowledgment that it actually connected. Any other ways to test?

ChrisTech

11 REPLIES 11

blackholemac
Valued Contributor III

This is Apple based, but what I always use for authoritative testing of whether APNs is functioning right are two apps:

Mac: Push Diagnostics from Two Canoes. They actually do a test notification all the way through the servers and report back accurately. [https://itunes.apple.com/us/app/push-diagnostics/id689859502?mt=12](link URL)

iPhone: My Apple rep clued me into this little app...Services Test by Amsys...It tests connections to all Apple servers involved and you can even have it test up or down status of your JSS. [https://itunes.apple.com/us/app/services-test/id663823983?mt=8](link URL) This one costs $.99

ChrisTech
Contributor

@blackholemac Yeah I used Push Diagnostics on my Mac and everything looks great. Just on the JSS I can't confirm if it's working right. Thanks for the link for Services Test.

blackholemac
Valued Contributor III

If that's the case that it works well on your Mac, but not on the server itself, that makes me think firewall may be blocking outgoing ports on your JSS other than the ports you need for it to run. I assume your test Mac and server farm are on differing subnets...that's what I have here...it would seriously wonder if your firewall either on server or at the network level (if your server farm is on a separate subnet) is blocking outgoing telnet traffic.

KSchroeder
Contributor

On Windows telnet, if the screen blacks out, and you don't get an error, then you are connecting. You can press Ctrl+] to break out of it. If it can't connect you'll get an error message in your cmd prompt.
You can try:

telnet
set localecho
open <hostname> <port>

which might help.

bradtchapman
Valued Contributor

Try something that you know will fail, like using the wrong port; e.g.: telnet gateway.push.apple.com 2197. The output will be very different.

(Hint: if you get a blank screen, then the connection was established. Press [Enter] a few times to see what happens).

k3vmo
Contributor

@bradtchapman or @KSchroeder So I test with Putty from Windows - and the correct port 2195 opens a black screen and closes it. Using something that will fail as you suggested - opens a black window - and it hangs. Is that the expected behavior from Putty?

Thank you in advance from a *nix engineer trying to work with Windows.

JustDeWon
Contributor III

@k3vmo , Legacy ports 2195/2196 have been deprecated as of March of this year. You would need to use port 2197, if you are on prem.. Here is a reference

k3vmo
Contributor

@JustDeWon Thanks - but that doesn't answer my question on the response from putty.exe. Should it hang with a black terminal window when trying 2197?

bradtchapman
Valued Contributor

If you see a black terminal window instantly, and PuTTY doesn’t report a connection failure or timeout, then it connected successfully.

Test api.push.apple.com 2197 and 443.

bradtchapman
Valued Contributor

@k3vmo : if you’re on Windows, use telnet.exe in the command prompt. Easier to see successful connections — the screen is cleared instantly. If it times out or fails to connect, there will be a hang followed by an obvious error message.

k3vmo
Contributor

@bradtchapman Answered the question! Thank you. That confirms for me it's working.