基于3台虚拟机搭建ArangoDB集群的技术实操问询
Got it, let's get your 3-node ArangoDB cluster up and running without a hitch. Here's a step-by-step breakdown of what to do next:
1. Fix the Master Node's Startup (Critical for Cross-VM Connectivity)
First off, the initial arangodb command you ran on the first machine uses the local loopback IP (127.0.0.1), which other VMs can't reach. If that process is still running, shut it down with Ctrl+C first, then restart the master node using its actual local network IP (e.g., 192.168.1.100 if that's its LAN address):
arangodb --starter.data-dir=./db1 --starter.address=<your-first-vm-lan-ip>
When it starts up, you'll see updated output that includes a --starter.join command pointing to this LAN IP—this is the command you'll use for the other nodes.
2. Start the Second Node
Log into your second VM, then run this command (replace the IP with your first VM's actual LAN IP):
arangodb --starter.data-dir=./db2 --starter.join=<your-first-vm-lan-ip>
This will register the second node with the master, and it'll automatically sync cluster configurations to join the setup.
3. Start the Third Node
Repeat the process on your third VM—just use a unique data directory (to avoid confusion, though it's not strictly required on separate machines):
arangodb --starter.data-dir=./db3 --starter.join=<your-first-vm-lan-ip>
4. Verify Your Cluster
Once all three nodes are running, you can check the cluster status via the ArangoDB web UI. On any of the VMs, open a browser and go to http://<vm-ip>:8528 (8528 is the default starter port). After logging in, you'll see a dashboard showing all three nodes as healthy if everything worked.
Quick Notes to Avoid Headaches
- Make sure all three VMs can ping each other, and that ports
8528(starter port) and8529(ArangoDB main port) are open in any firewalls/security groups. - The
--starter.data-dirpath needs to have read/write permissions for the user running the command, and enough disk space for your data. - If you get connection timeouts, double-check that you're using the correct LAN IP for the master node, not
127.0.0.1.
内容的提问来源于stack exchange,提问作者L.Souhir

