ssl - RabbitMQ 中的 ssl 连接握手超时错误

标签 ssl openssl rabbitmq

我关注这个tutorial具有 SSL 连接的 RabbitMQ。

我已经为 ssl 连接配置了 5672 端口,我正在启动 openssl 工具

用于测试与本地端口的连接(是RabbitMQ的官方docker容器)。

我的 rabbitmq.config 是:

[{rabbit,   [ {loopback_users, []},
       {tcp_listeners, [5671]},
       {ssl_listeners, [5672]},
       {auth_mechanisms, ['EXTERNAL','PLAIN']},
       {handshake_timeout, 60000},
       {ssl_options, [
         {cacertfile, "/etc/rabbitmq/ssl/ca/cacert.pem" },
         {certfile, "/etc/rabbitmq/ssl/server/server.cert.pem" },
         {keyfile, "/etc/rabbitmq/ssl/server/server.key.pem" },
         {verify, verify_peer},
         {ssl_cert_login_from, common_name},
         {fail_if_no_peer_cert, true }]}]}].

然后我执行这个命令:

openssl s_client -connect localhost:5672 -cert ../client/client.pem -key ../client/client.key.pem -CAfile ../ca/cacert.pem

我在 RabbitMQ 日志中收到此错误:

=INFO REPORT==== 6-Apr-2016::14:16:06 ===
accepting AMQP connection <0.696.0> (127.0.0.1:34977 -> 127.0.0.1:5672)

=ERROR REPORT==== 6-Apr-2016::14:16:06 ===
closing AMQP connection <0.696.0> (127.0.0.1:34977 -> 127.0.0.1:5672):
{handshake_timeout,handshake}

最佳答案

当您看到 {handshake_timeout, handshake} 时,这通常意味着某些事情正在阻止 AMQP 握手(与 TCP 握手相反)完成。使用 Wireshark 跟踪网络流量可能会让您了解在握手过程中您失败的位置。

关于ssl - RabbitMQ 中的 ssl 连接握手超时错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36454573/

相关文章:

laravel - 如何使用 https 而不是 http 在 GCP 上设置 laravel?

sockets - 使用 STARTTLS 发送电子邮件

linux -/usr/local/ssl/lib/libcrypto.a : could not read symbols: Bad value

RabbitMQ - 按优先级使用多个队列

ubuntu - Rabbitmq 忽略 Ubuntu 12 上的配置

security - 是否可以购买新的 SSL 证书而不更新旧证书?

node.js - Tomcat 和 NodeJS(不同的 IP)使用相同的 SSL 证书

windows - cat 未被识别为内部或外部命令

openssl - 在 OpenSSL 命令行工具中为自定义扩展创建自己的 ASN.1 模块

rabbitmq-server 无法启动 - 无法连接到 epmd/Ubuntu 16.04