Skip to content

TLS-PSK开启后,集群节点建立连接认证失败 #14

@yinlonglyl

Description

@yinlonglyl

首先非常感谢提供mosquitto-cluster这个工具。请问目前集群是否支持TLS-PSK认证加密,node_identity和node_psk 配置生效了么?

问题描述:
moquitto broker开启TLS-PSK认证后,使用mosquitto_sub/pub可以通过psk连接成功,命令如下:./mosquitto_sub --psk-identity id --psk 123456 -h 172.17.0.4 -p 8883 -t sensor/+
但moquitto broker之间通过配置mosquitto.conf 中的node_identity和node_psk无法成功认证,mosquitto.conf集群详细配置如下:
node_name node2
node_address 172.17.0.3:8883
node_identity id
node_psk 123456
node_remote_clientid mqb1

node_name node3
node_address 172.17.0.4:8883
node_identity id
node_psk 123456
node_remote_clientid mqb1

错误日志:
1563525650: New connection from 172.17.0.3 on port 8883.
1563525651: OpenSSL Error: error:140760FC:SSL routines:SSL23_GET_CLIENT_HELLO:unknown protocol
1563525651: Socket error on client , disconnecting.
1563525653: [CLUSTER INIT] node node1 service maybe down, will reconnect later after 20 seconds..
1563525653: [CLUSTER INIT] Finally handshake with node: node2 success.
1563525653: Socket error on client node2, disconnecting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions