RabbitMQ MQTT SSL连接失败

时间:2018-09-25 05:41:38

标签: ssl rabbitmq mqtt tls1.2

我正在尝试通过mqtt和amqp连接设置RabbitMQ服务器。 我已经在端口1883上打开了mqtt tcp连接,并在端口8883上打开了mqtt ssl连接。TLS和SSL列表器已成功打开为日志。我使用mqttBox作为客户端,并且可以使用tcp成功连接到端口1883。但是我无法使用TLS / SSL连接到端口8883。

这是我的配置文件。

[
 {rabbit,
  [
   {tcp_listeners, [{"127.0.0.1", 5672}, {"::1", 5672}]},
   {default_vhost, <<"/">>},
   {default_user, <<"user">>},
   {default_pass, <<"bitnami">>},    
   {default_permissions, [<<".*">>, <<".*">>, <<".*">>]},

   {ssl_options, [{cacertfile,  "/opt/bitnami/rabbitmq/tls/result/ca_certificate.pem"},
                {certfile,   "/opt/bitnami/rabbitmq/tls/result/server_certificate.pem"},
                {keyfile,    "/opt/bitnami/rabbitmq/tls/result/server_key.pem"},
  %%                  {password,""},
                {verify,     verify_peer},
                {fail_if_no_peer_cert, true}]}
  %%     {ssl_listeners, [5671]}

  ]
  },
  {kernel, []},
  {rabbitmq_management,
  [
   {listener, [{port, 15672}, {ip, "0.0.0.0"}]}
  ]
 },
 {rabbitmq_shovel,
  [
   {shovels, []}
  ]
 },
 {rabbitmq_stomp, []},
 {rabbitmq_mqtt, [{ssl_cert_login, true}, {allow_anonymous, false} , 
  {ssl_listeners,    [8883]}, {tcp_listeners,    [1883]}]},
  {rabbitmq_amqp1_0, []},
  {rabbitmq_auth_backend_ldap, []},
  {rabbit, [{vm_memory_high_watermark, 0.6}]
 }
].

还有我的日志文件。

started MQTT TCP Listener on [::]:1883
started MQTT SSL Listener on [::]:8883
started TCP Listener on [::]:5672
started SSL Listener on [::]:5671


<0.13639.4> MQTT vhost picked using plugin configuration or default

TCP连接成功

 <0.13639.4> accepting MQTT connection <0.13639.4> (123.231.123.82:54601 -> 10.128.0.5:1883)

TLS连接失败

 <0.13639.4> MQTT detected network error for "123.231.123.82:54601 -> 10.128.0.5:1883": peer closed TCP connection

tcp和tls请求似乎都指向10.128.0.5:1883。

我该如何解决?

编辑:客户端配置: enter image description here

0 个答案:

没有答案