EMQX Cluster Nodes Not Connecting
DodaTech
Updated 2026-06-26
1 min read
In this tutorial, you'll learn about EMQX Cluster Nodes Not Connecting. We cover key concepts, practical examples, and best practices.
The Problem
EMQX nodes cannot form a cluster across multiple servers.
Quick Fix
Wrong
emqx_ctl cluster join emqx2@192.168.1.2 # Node not reachable
Join fails — node not reachable or cookie mismatch.
Right
# 1. Check node cookie (must match on all nodes)
sudo cat /etc/emqx/emqx.conf | grep cookie
# 2. Set cookie explicitly
# node.cookie = 'mysecrectcookie'
# 3. Ensure ports are open
sudo ufw allow 4370 # EPMD
sudo ufw allow 5370 # Cluster communication
# 4. Join cluster (on one node)
emqx_ctl cluster join emqx@node2.example.com
# 5. Verify
emqx_ctl cluster status
Cluster status: 2 nodes running.
Prevention
All nodes must use the same cookie. Open firewall ports 4370 (EPMD) and 5370 (cluster). Nodes should have synchronized clocks (NTP). Use static cluster or DNS-based discovery for auto-clustering. EMQX Enterprise supports multi-datacenter replication.
DodaTech engineers apply these same patterns across Doda Browser, DodaZIP, and Durga Antivirus Pro for production IoT reliability.
FAQ
Built by the developers of DodaTech
Doda Browser, DodaZIP & Durga Antivirus Pro