[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, 
0}],
Params = #amqp_params{username = <<"guest">>, password = <<"guest">>,
virtual_host = <<"/">>, host = "localhost", port = 5671, ssl_options  =
SSLOptions},
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 0.0.0.0:5672

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

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

=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 127.0.0.1:51406 to SSL:
esslerrssl

My rabbitmq.config file looks like this:

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

Thanks!









More information about the rabbitmq-discuss mailing list