RabbitMQ-Tls连接-Golang

我使用以下链接配置了RabbitMQ连接:
https://github.com/streadway/amqp/blob/master/examples_test.go </ p>

< p>我根据此处的说明创建了证书:
https:// www .rabbitmq.com / ssl.html#enabling-tls-paths </ p>

我使用安装在docker中的RabbitMQ 3.7.0。
调用amqp.DialTLS之后,我收到“错误 服务器端(在docker日志中)“证书”错误。</ p>

我认为问题在于证书应包含服务器名,如果包含,则应在服务器名中设置哪个服务器名。 证书是否是否在docker内部安装了RabbitMQ?</ p>

此外,还有其他想法吗?</ p>
</ div>

展开原文

原文

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?

dongming4994
dongming4994 从这里开始:rabbitmq.com/troubleshooting-ssl.html
一年多之前 回复

1个回答



我解决了此问题,方法是将连接字符串中的full_machine_name添加到具有适当IP地址的RabbitMQ的主机文件中:amqps:// connection_string_to_RabbitMQ @ full_machine_name:5671 </ p>
</ div>

展开原文

原文

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

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问