[rabbitmq-discuss] Could not upgrade the network driver to ssl

Steve Ellis steve at changesciences.com
Sat Oct 31 19:03:22 GMT 2009

OS: Ubuntu 8.04.1
Erlang Version: R12B-5
Rabbit Version: 1.7.0

I'm trying to get ssl going with the Erlang client. Have followed the
instructions here: http://www.rabbitmq.com/ssl.html creating all the
certificates etc.

I attempt to connect to the server with code like this:
SSLOptions = [{cacertfile, "/home/testca/cacert.pem"}, {certfile, 
"/home/client/cert.pem"}, {keyfile,"/home/client/key.pem"},{verify_code, 
Params = #amqp_params{username = <<"guest">>, password = <<"guest">>,
virtual_host = <<"/">>, host = "localhost", port = 5671, ssl_options  =
Connection = amqp_connection:start_network(Params),

And the Erlang shell says:

=ERROR REPORT==== 31-Oct-2009::14:07:59 ===
SSL: certify: ./ssl_connection.erl:1356:Fatal error: internal_error

=ERROR REPORT==== 31-Oct-2009::14:07:59 ===
Could not upgrade the network driver to ssl: esslerrssl
** exception exit: {badmatch,{error,esslerrssl}}
      in function  amqp_connection:start_network_internal/2
      in call from test_2:init/1
      in call from gen_server:init_it/6
      in call from proc_lib:init_p_do_apply/3

The rabbit.log says:
=INFO REPORT==== 31-Oct-2009::14:07:47 ===
started TCP Listener on

=INFO REPORT==== 31-Oct-2009::14:07:47 ===
started SSL Listener on

=INFO REPORT==== 31-Oct-2009::14:07:59 ===
accepted TCP connection on from

=ERROR REPORT==== 31-Oct-2009::14:07:59 ===
SSL: hello: ./ssl_handshake.erl:227:Fatal error: internal_error

=ERROR REPORT==== 31-Oct-2009::14:07:59 ===
failed to upgrade TCP connection from to SSL:

My rabbitmq.config file looks like this:

[{rabbit, [{ssl_listeners, [{"",5671}]}, {ssl_options, 
{certfile,"/home/server/cert.pem"}, {keyfile,"/home/server/key.pem"}, 
{verify_code, 0}]}]}].


More information about the rabbitmq-discuss mailing list