-
Notifications
You must be signed in to change notification settings - Fork 455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Network is unreachable: api.push.apple.com/2620:149:208:4308:0:0:0:a:443
#1044
Comments
I've been experiencing the same issue with Pushy 0.13.9 for the past 10 days or so. I think this may be an issue on Apple's side, but I would appreciate any information you can give me. |
APNs does not have conventional load balancers (as near as I can tell). Instead, the expectation is that callers will query DNS for a list of active servers, then choose and connect to one of those servers directly. Please see the "best practices" section of "Sending notification requests to APNs" for details. Folks who are familiar with DNS might note that it is generally not considered an immediately-consistent system. I think what's happening here is that, after some time, Apple retires an APNs server, but its address is still in the DNS record. When Pushy tries to reconnect to that old address, the connection fails. It's possible that there's a bug in Pushy where we're over-caching, but if there is, I haven't found it yet. In fairness, Apple's best practices suggest:
It may be that in honoring the 30-second TTL on their DNS records, we're violating the "uncached" part of the suggestion. Even so, though, expecting faster-than-30-second propagation of DNS changes seems unreasonable to me, and I'm not sure that would actually be helpful (or really good for the DNS ecosystem as a whole). For now, I don't think there's anything to be done here; this is just a consequence of some upstream design decisions. At the same time, it sounds like more and more folks have been bumping into this lately. Let's leave this open and see if we can gather more information, I suppose. |
api.push.apple.com/2620:149:208:4308:0:0:0:a:443
…though, @ytakamura, 0.13.9 is a truly ancient version of Pushy. I'd be curious if you get better results just by updating to a more recent version. |
I have been seeing similar issues in the past several weeks as well. It does seem like it has increased significantly in the past three or four weeks. Here is the output from the error I am seeing:
@jchambers I can't tell from the logs, but will Pushy attempt to send the notification again? If not, it might be helpful to pass the error message up the chain so we can catch it and retry the notification. |
I found this thread. https://developer.apple.com/forums/thread/741313 |
I added the jvm parameter - Djava.net. preferIPv4Stack=true. domain name is no longer resolved ipv6, there is no problem for the time being. Thanks. |
Well, wait—this is still weird. @yong3269 did it ever work for you with IPv6? What happens if you, for example, |
And @dpenny-bravas and @ytakamura, I'd ask the same of you! Does this always fail with IPv6 for you? Is it possible that |
@jchambers What I see is really probabilistic error. api.push.apple.com resolution to ipv6 will definitely go wrong.
|
@yong3269 I think that answers the question, but I should have offered a better set of curl -6 --http2 https://api.push.apple.com
curl -4 --http2 https://api.push.apple.com |
@jchambers Since enabling IPv6 on my local network I have not had a single failure. |
Okay; it sounds like this was, indeed, a network configuration issue and not something specific to Pushy. Let's consider this resolved for the moment. |
Funny, this seems to have solved it on my side as well. Then I removed the parameter and everything worked fine. A bit later I decided to set Curl seems to work fine, so to me this looks like a combination of a JVM and local network-specific issue.
I have this problem only on my dev environment thus far (macOS) and thought I'd share even though the issue has been closed. |
I've been using At the moment, it's still trying to use IPv6 when told not to.
|
@nkavian I don't think you can set this property at runtime via |
It appears the IPV4 one can be set at runtime, but you need to do it early -- cf https://stackoverflow.com/questions/9882357/how-to-set-java-net-preferipv4stack-true-at-runtime#comment105040174_9882413 |
I do set it early, in the Spring Boot application before it creates the actual I did realize something interesting yesterday. The problem happened when I tethered my laptop to my iPhone for internet access. Once I reconnected at home, Pushy/Netty stopped that specific issue. Then it reverted to the previous intermittent issue which I have been ignoring:
|
Whenever I try and send a push notification using Pushy 0.15.1 I get the following exception with low probability. Most likely to occur after a longer interval.
The text was updated successfully, but these errors were encountered: