My project is using Pushy Library to send APNS to iOS devices from last one year, recently we upgraded Pushy to use HTTP/2 mechanism for sending APNS. (our application is in Java 8)
It works as it supposed to in our test environment, but when We installed it on client's machine we are getting following error:
io.netty.handler.ssl.ApplicationProtocolNegotiationHandler.handshakeFailure : [id: 0x581db609, L:/IP-Address:58781 - R:api.push.apple.com/17.188.140.153:443] TLS handshake failed: javax.net.ssl.SSLException: handshake timed out
I checked for everything available on forums but nothing seems to help.
As a last resort I tried looking into Wireshark to see the difference between my test environment & client environment, what I see is the "Server Hello" message is getting delayed due to which the connection times out.
Snapshot of WireShark Capture:
You can see the delay in "Server Hello" & what I observed the "Server Hello" always comes after "Close Notify" is sent by a client, exactly after 10 seconds. As per my understanding its done by the client to say we are timing out on the connection.
I tried increasing connection time-out value in Pushy, but it did not work, but that may be a different question, I think.
Can someone tell me what are we doing wrong? Is there some setting we have to do on client's network to enable HTTP/2? Is there something I have to change in Pushy Library?