mongoose
mongoose

Reputation: 79

RabbitMQ - Tls Connection - Golang

I configured RabbitMQ connection using follow link: https://github.com/streadway/amqp/blob/master/examples_test.go

Certificate I created according to the instructions here: https://www.rabbitmq.com/ssl.html#enabling-tls-paths

I use RabbitMQ 3.7.0 installed in docker. After the call amqp.DialTLS I receive "Bad certificate" error on the server side (in the docker logs).

I suppose that the problem is that certificate should contain the server name and if so, which server name should I set in the certificate if RabbitMQ is installed inside docker?

Besides, any other ideas?

Upvotes: 2

Views: 2311

Answers (1)

mongoose
mongoose

Reputation: 79

I solved this issue by adding to the hosts file full_machine_name from the connection string to RabbitMQ with appropriate IP address: amqps://connection_string_to_RabbitMQ@full_machine_name:5671

Upvotes: 4

Related Questions