RAbbit mq python TLS not Connectin

164 views
Skip to first unread message

Rahul S

unread,
Dec 18, 2019, 2:46:01 AM12/18/19
to rabbitmq-users
import pika
import ssl



credentials = pika.PlainCredentials('admin', 'vmware')


context = ssl.create_default_context(cafile="./private/testca/cacert.pem")
context.load_cert_chain("./private/client/cert.pem",
"./private/client/key.pem")


ssl_options = pika.SSLOptions(context, '127.0.0.1')

params = pika.ConnectionParameters(host="localhost", port=5671, ssl_options=ssl_options, credentials=credentials)
connection = pika.BlockingConnection(params)
channel = connection.channel()





this is the code i am using and is getting many kind of errors
1. where should the certifictes be
2. what should be the configuration file be like to connect to python and
3. can some one share me a working file or code which connects to a rabbit mq using tls

Wesley Peng

unread,
Dec 18, 2019, 2:49:43 AM12/18/19
to rabbitm...@googlegroups.com
Hi

on 2019/12/18 15:46, Rahul S wrote:
> 1. where should the certifictes be
> 2. what should be the configuration file be like to connect to python and
> 3. can some one share me a working file or code which connects to a
> rabbit mq using tls

It's hard to say what actually happened without knowing your running
environment.

You may refer this documentation and check your configuration step by step,
https://www.rabbitmq.com/troubleshooting-ssl.html

regards.
Reply all
Reply to author
Forward
0 new messages