Setup :
- Erlang cluster with two Erlang nodes, different names, identical SSL setup (certificates, keys, authority)
- the two nodes are listening for connections on the same port
- the accept scheme is simple and doesn't have an acceptor pool in front :
ListenSocket = ssl:listen()
when the app starts -> then, in the children, I doAcceptSock = ssl:transport_accept(ListenSocket)
+ssl:ssl_accept(AcceptSock)
+mysup:start_child()
which will start a new gen_server to listen on ListenSocket (in the gen_serverinit()
I have timeout == 0, btw - to make the gen_server receive a timeout message which will be handled withhandle_info(timeout...)
which does the accept scheme above).
Expected behavior :
- I expect all of this to work all the time :)
Observed behavior :
- from time to time, one or both servers stop accepting ssl connections from the iOS apps. telnet to that port works - and it even passes transport_accept().
- from the iOS app, I get a "SSLHandshake failed, error -9806" and it doesn't look like transport_accept() was successful (I have error logging before and after that line and I do not see any error messages printed in the log - theoretically, it looked like the iOS app is not trying to connect to that port, but it did try, because it says SSLHandshake failed).
I followed this thread - and got the followings :
openssl s_client -connect myserver:4321 -servername myserver -ssl3 -tls1 -prexit CONNECTED(00000003) write:errno=60 --- no peer certificate available --- No client certificate CA names sent --- SSL handshake has read 0 bytes and written 0 bytes --- New, (NONE), Cipher is (NONE) Secure Renegotiation IS NOT supported Compression: NONE Expansion: NONE SSL-Session: Protocol : TLSv1 Cipher : 0000 Session-ID: Session-ID-ctx: Master-Key: Key-Arg : None Start Time: 1460057622 Timeout : 7200 (sec) Verify return code: 0 (ok) ---
same command executed with the second server (that is still accepting connections) returned a lot more infos and doesn't time out.
Any help is appreciated, thank you.