[erlang-questions] SSL connection is closed unexpectedly

Ingela Andin ingela.andin@REDACTED
Thu Jan 17 09:26:07 CET 2013


Hi!

2013/1/15 Alex Shneyderman <a.shneyderman@REDACTED>:
> Hello, everybody!
>
> I had a need to STARTTLS-enable tsung's jabber client. I use ssl
> engine that comes with R15B02. Basically, code takes an existing
> socket (tsung client - FSM owns that socket) and does an upgrade to
> TLS at an appropriate moment in time. Like so:
>
>       {ok,SslSocket} = ssl:connect(Socket, [{verify,
> verify_none},{reuse_sessions,false}]),
>       ssl:controlling_process(SslSocket,ClientFSMPid),
>       ssl:setopts(SslSocket,[{active, once}]),
>
>
> If I spawn some number of clients (the number varies but anything
> beyond 200 seems to cause the problem) - connections get dropped and I
> believe it is the client side that drops the connections (since this
> behavior is not observed without TLS in the picture). So the
> questions:
>
> 1. Is this a known default behavior? If so how do I make it go away,
> i.e. some of the tests we are running need 2000 clients and plain
> (non-tls).

No it is not.  What server are you running against? Servers may allow different
number of concurrent connections for TLS and non TLS.

> 2. Is there a simple way to debug these disconnects. In the logs all I
> am getting is {tcp_closed, #Port<0.1608>}. Message does not have hints
> as to why this socket was closed. Anything I can do to figure out
> exactly why this happens?

tcp_closed indicates that the peer closed the connection.

Regards Ingela Erlang/OTP team - Ericsson AB



More information about the erlang-questions mailing list