本文涵盖有助于诊断TLS连接问题和错误(TLS警报)的方法和一些工具。这策略是在排除问题过程中使用替代的TLS实现来测试所需的组件,以识别有问题的终端(客户端或服务器)。
请记住,如果两个特定组件之间的交互是造成问题的原因,则不能保证此过程能够识别出问题。
推荐的步骤如下:
使用TLS设置RabbitMQ节点设计修改配置。在执行任何其他TLS股涨排除步骤之前,验证配置文件位置和有效配置非常重要。(配置指导)
这个步骤检查mq服务器是否正在监听预期的端口,如AMQP0-9-1和1.0的5671,MQTT的8883等。
要验证节点上是否已启用TLS,请使用rabbitmq-diagnostics listeners 或rabbitmq-diagnostics status 中的listeners部分。
C:\Users\stone>rabbitmq-diagnostics listeners
Asking node rabbit@DESKTOP-CEMOR3J to report its protocol listeners ...
Interface: [::], port: 15672, protocol: http, purpose: HTTP API
Interface: 0.0.0.0, port: 15672, protocol: http, purpose: HTTP API
Interface: [::], port: 25672, protocol: clustering, purpose: inter-node and CLI tool communication
Interface: [::], port: 5672, protocol: amqp, purpose: AMQP 0-9-1 and AMQP 1.0
Interface: 0.0.0.0, port: 5672, protocol: amqp, purpose: AMQP 0-9-1 and AMQP 1.0
rabbitmq-diagnostics status
Status of node rabbit@DESKTOP-CEMOR3J ...
[1mRuntime[0m
OS PID: 28232
OS: Windows
Uptime (seconds): 152582
Is under maintenance?: false
RabbitMQ version: 3.8.14
Node name: rabbit@DESKTOP-CEMOR3J
Erlang configuration: Erlang/OTP 23 [erts-11.2] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1]
Erlang processes: 511 used, 1048576 limit
Scheduler run queue: 1
Cluster heartbeat timeout (net_ticktime): 60
[1mPlugins[0m
....
....
[1mListeners[0m
Interface: [::], port: 15672, protocol: http, purpose: HTTP API
Interface: 0.0.0.0, port: 15672, protocol: http, purpose: HTTP API
Interface: [::], port: 25672, protocol: clustering, purpose: inter-node and CLI tool communication
Interface: [::], port: 5672, protocol: amqp, purpose: AMQP 0-9-1 and AMQP 1.0
Interface: 0.0.0.0, port: 5672, protocol: amqp, purpose: AMQP 0-9-1 and AMQP 1.0
RabbitMQ必须能够读取其配置的CA证书包、服务器证书和私钥,这些文件必须存在并具有适当的权限。
C:\Users\stone>rabbitmq-diagnostics --silent tls_versions
tlsv1.3
tlsv1.2
tlsv1.1
tlsv1