snnagar / apns-sharp

Automatically exported from code.google.com/p/apns-sharp
0 stars 0 forks source link

Connection Error to APNS #30

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,
We have downloaded the code. And we are 
running "jdSoft.Apple.Apns.Notifications.Test" application with proper 
deviceToekn, password and p12 File. 

But we are getting exception as "Error: A connection attempt failed 
because the connected party did not properly
respond after a period of time, or established connection failed because 
connected host has failed to respond 17.149.34.140:2195"

Could anyone please tell us how to resolve this.

Original issue reported on code.google.com by bipinka...@gmail.com on 20 May 2010 at 12:05

GoogleCodeExporter commented 9 years ago
Check your firewalls and make sure 2195 is open.  A good test is always to try
telnet'ing to the server on that port as well.

Original comment by jond...@gmail.com on 20 May 2010 at 12:58

GoogleCodeExporter commented 9 years ago
Hi jondick, Thanks for the reply.

We had checked the port 2195 it is NOT open. 
We are making post notification to "gateway.sandbox.push.apple.com", whose ip 
is "17.149.34.143" & we are getting exception for ip "17.149.34.140:2195"

So could you please give us valid range of ips for which we can open the port 
2195.

Thanks again!

Original comment by bipinka...@gmail.com on 20 May 2010 at 1:24

GoogleCodeExporter commented 9 years ago
Ok, apple uses round robin dns (meaning they have multiple A records associated 
with
their domains).  Given that fact I'd really suggest you open ports for the 
domain
instead of specific IP addresses.

If you MUST use IP addresses, you can simply do a DNS Lookup on the A records 
for
'gateway.push.apple.com', 'gateway.sandbox.push.apple.com' and for feedback you 
of
course need 'feedback.push.apple.com' and 'feedback.sandbox.push.apple.com' 
(feedback
services use port 2196).

So for example:
gateway.push.apple.com actually points to 'gateway.push-apple.com.akadns.net', 
and
when we look up the A records for that we get:
A record found: 17.149.38.142
A record found: 17.149.38.159
A record found: 17.149.38.150
A record found: 17.149.38.140
A record found: 17.149.38.128
A record found: 17.149.38.132
A record found: 17.149.38.166
A record found: 17.149.38.129

Again, I suggest opening ports based on the domain names, not IP addresses, 
since the
IP addresses are subject to change in the future.

Original comment by jond...@gmail.com on 20 May 2010 at 1:33

GoogleCodeExporter commented 9 years ago
Hi jondick,
Thanks for the reply. 
We had given access to (apple's) domains and not IP. And this error stopped.

Original comment by bipinka...@gmail.com on 21 May 2010 at 9:39

GoogleCodeExporter commented 9 years ago
Our firewalls don't allow access to a "DNS" entry...plus it resolves to many 
different 17.x.x.x addresses.  Our IT security group isn't going to like this!

Original comment by shannaha...@gmail.com on 4 Jan 2011 at 5:45