[rabbitmq-discuss] pika + ssl disconnects with ssl_upgrade_error

Alexandru Scvorţov alexandru at rabbitmq.com
Thu Jan 5 17:15:03 GMT 2012


>    error on TCP connection <0.265.0>:{ssl_upgrade_error, {eoptions,
> {certfile, '/xxx/server/cert.pem'}}}

eoptions means that particular option is incorrect.

>            {ssl_options, [
>                {cacertfile, '/xxx/testca/cacert.pem'},
>                {certfile, '/xxx/server/cert.pem'},
>                {keyfile, '/xxx/server/key.pem'},

Please use double quotes.  So, "/xxx/server/cert.pem", not
'/xxx/server/cert.pem'.  The same goes for the other options.

In case you're wondering, it's because in Erlang 'meh' is an atom and
"meh" is a string, and the code there expects a string.

Cheers,
Alex

On Thu, Jan 05, 2012 at 09:04:13AM -0800, Roy Hyunjin Han wrote:
> Hi Gavin,
> 
> Thanks to pika, I am able to connect to RabbitMQ over SSL.  However,
> the code disconnects immediately.  Do you have suggestions on what
> might be going wrong?
> 
> Thanks,
> RHH
> 
> 
> Here is the error I see in /var/log/rabbitmq/rabbit at yyy.log.
> ::
> 
>    error on TCP connection <0.265.0>:{ssl_upgrade_error, {eoptions,
> {certfile, '/xxx/server/cert.pem'}}}
> 
> Here are the contents of /etc/rabbitmq/rabbitmq.config, where I
> created the certificates as specified on <http://www.rabbitmq.com/
> ssl.html>.
> ::
> 
>    [
>        {rabbit, [
>            {ssl_listeners, [5671]},
>            {ssl_options, [
>                {cacertfile, '/xxx/testca/cacert.pem'},
>                {certfile, '/xxx/server/cert.pem'},
>                {keyfile, '/xxx/server/key.pem'},
>                {verify, verify_peer},
>                {fail_if_no_peer_cert, true}
>            ]}
>        ]}
>    ].
> 
> Here is the Python code.
> ::
> 
>    parameters = ConnectionParameters(host, port,
> credentials=credentials, ssl=True, ssl_options=dict(
>        ca_certs='/xxx/testca/cacert.pem',
>        certfile='/xxx/client/cert.pem',
>        keyfile='/xxx/client/key.pem',
>        cert_reqs=CERT_REQUIRED))
> 
> Here is the pika version that I am using.
> ::
> 
>    https://github.com/pika/pika/commit/5e3e91bcab50d492bb887f298fbf59ba345439a6
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss


More information about the rabbitmq-discuss mailing list