【问题标题】:Handshake timeout ERROR with ssl connection in RabbitMQ握手超时错误与 RabbitMQ 中的 ssl 连接
【发布时间】:2016-07-27 01:25:30
【问题描述】:

我使用 ssl 连接关注 RabbitMQ 的 tutorial。

我已经为 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}

【问题讨论】:

    标签: ssl openssl rabbitmq


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 2013-07-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-02-11
      • 2014-07-07
      • 2018-05-16
      相关资源
      最近更新 更多