I'm trying to test the connection between my server & Apple's sandbox APNS server with the following command:
$ openssl s_client -connect gateway.sandbox.apple.com:2195 -cert cert.pem -key key.pem
Enter pass phrase for key.pem:
gethostbyname failure
connect:errno=0
What is the meaning of gethostbyname failure, and what is the cause?
In the same server, telnet to port 2195 is working fine:
$ telnet gateway.push.apple.com 2195
Trying 17.149.36.242...
Connected to gateway.push-apple.com.akadns.net.
Escape character is '^]'.
UPDATE: If I use IP instead of host name, it works fine:
$ openssl s_client -connect 17.149.36.242:2195 -cert cert.pem -key key.pem
OpenSSL is unable to resolve DNS ?