[ejabberd] Cannot connect via SSL

Дмитрий Сиваченко mitya at cavia.pp.ru
Wed Feb 4 11:15:02 MSK 2004


I use FreeBSD-current and erlang-r9c0_4.

I have the following in my ejabberd.cfg:

{listen, [{5222, ejabberd_c2s,
                      [{access,   c2s},
                       {shaper,   c2s_shaper}]},
          {5223, ejabberd_c2s,
                      [{access,   c2s},
                       {shaper,   c2s_shaper},
                       {ssl,    [{certfile, "./ssl.pem"}]}
          {5269, ejabberd_s2s_in,
                      [{shaper,   s2s_shaper}]}]}.

I tried both ejabberd-0.5 and the version from today's CVS.

When I am trying to connect with SSL enabled, I get in ejabber log:

=INFO REPORT==== 2-Feb-2004::13:03:57 ===
I(<0.241.0>:ejabberd_listener:92): ({sslsocket,7,<0.2268.0>}) Accepted SSL conne
ction {{194,87,2,103},49377} -> {{194,87,2,103},5223}

TKabber prints the following in the console window:

jlib: (jlib::disconnect)
jlib: (jlib::connect) Socket:'sock4' Server:'tear.demos.ru' ConnectionID:'1'
jlib: (jlib::outmsg) (1) '<stream:stream xmlns:stream='http://etherx.jabber.org/
streams' xmlns='jabber:client' to='tear.demos.ru'>'
jlib: (jlib::inmsg) (1) ''
jlib: error (jlib::inmsg) Socket is closed by server. Disconnecting...

At the same time, I can successfully login without SSL.

I generated my ssl.pem with the following command:

openssl req -x509 -newkey rs:1024 -keyout ssl.pem -out ssl.pem -days 365 -nodes

What should I do to login over SSL?


More information about the ejabberd mailing list