Closed dcorbacho closed 5 years ago
@dcorbacho I cannot find the the mqtt_node
module used in this code. Without it, a node cannot be started. Was everything committed and pushed?
@michaelklishin both mqtt_node
and mqtt_machine
were missing. Fixed now
Relevant log entries:
2019-06-03 15:17:05.044 [info] <0.689.0> accepting MQTT connection <0.689.0> ([::1]:57714 -> [::1]:1883)
2019-06-03 15:17:06.116 [debug] <0.718.0> MQTT accepting TCP connection <0.718.0> ([::1]:57717 -> [::1]:1883)
2019-06-03 15:17:06.116 [debug] <0.718.0> Received a CONNECT, client ID: "client-1" (expanded to "client-1"), username: undefined, clean session: true, protocol version: 4, keepalive: 60
2019-06-03 15:17:06.133 [warning] <0.689.0> MQTT disconnecting client "[::1]:57714 -> [::1]:1883" with duplicate id 'client-1'
2019-06-03 15:17:06.134 [info] <0.718.0> accepting MQTT connection <0.718.0> ([::1]:57717 -> [::1]:1883)
2019-06-03 15:17:07.144 [debug] <0.747.0> MQTT accepting TCP connection <0.747.0> ([::1]:57718 -> [::1]:1883)
2019-06-03 15:17:07.144 [debug] <0.747.0> Received a CONNECT, client ID: "client-1" (expanded to "client-1"), username: undefined, clean session: true, protocol version: 4, keepalive: 60
2019-06-03 15:17:07.152 [info] <0.747.0> accepting MQTT connection <0.747.0> ([::1]:57718 -> [::1]:1883)```
Additional logging leads me to the following hypothesis:
rabbit_mqtt_collector:unregister/2
deletes the entry in the client IDs maprabbit_mqtt_collector:register/2
@kjnilsson not everything above is addressed but this is ready for another round.
Uses a ra cluster to keep the client id tracking information - in the state of the ra machine.
If nodes are decommissioned from the RMQ cluster, the command decommission_mqtt_node must be invoked first to disconnect the clients on that node and remove the node from the ra cluster.
[#135330629]
Types of Changes
Checklist
CONTRIBUTING.md
document