Hello @Ro0tk1t . I investigated using a similar setup using vagrant, and I was not able to reproduce the issue. This is how I ran the test below:
Setup two machines
I used Vagrantfile configuration file that looks like this:
@hosts = {"zero"=>"192.168.3.2", "alpha"=>"192.168.3.4"}
Vagrant.configure("2") do |config|
@hosts.each do |hostname, ipaddr|
config.vm.define hostname do |node|
node.vm.box = "generic/centos7"
node.vm.hostname = "#{hostname}"
node.vm.network "private_network", ip: ipaddr
node.vm.synced_folder ".", "/vagrant"
end
end
end
And then I bring up the two systems. I previously build the dgraph binary on my host and copied in to the local directory, I was using 32f1f5893 commit. Then I launch the systems, run dgraph on the zero machine, and then run dgraph on the alpha machine.
# launch two vm systems
vagrant up
Setup and run dgraph zero
# log into zero and run commands
vagrant ssh zero
sudo firewall-cmd --zone=public --permanent --add-port=5080/tcp
sudo firewall-cmd --zone=public --permanent --add-port=6080/tcp
sudo firewall-cmd --reload
sudo cp /vagrant/dgraph /usr/local/bin
dgraph zero --bindall=true --my 192.168.3.2:5080 --raft idx=1 &
logout
Setup and run dgraph alpha
# log into alpha and run commands
vagrant ssh alpha
sudo firewall-cmd --zone=public --permanent --add-port=7080/tcp
sudo firewall-cmd --zone=public --permanent --add-port=8080/tcp
sudo firewall-cmd --zone=public --permanent --add-port=9080/tcp
sudo firewall-cmd --reload
sudo cp /vagrant/dgraph /usr/local/bin
dgraph alpha --bindall=true --zero=192.168.3.2:5080 \
-v 5 --my=192.168.3.4:7080 --security whitelist=192.168.3.1/16
Health checks
On the host system, I can also check the status of the two services:
$ curl -s 192.168.3.2:6080/state | jq '.zeros."1"'
{
"id": "1",
"groupId": 0,
"addr": "192.168.3.2:5080",
"leader": true,
"amDead": false,
"lastUpdate": "0",
"learner": false,
"clusterInfoOnly": false,
"forceGroupId": false
}
and
$ curl -s 192.168.3.4:8080/health | jq '.[0]'
{
"instance": "alpha",
"address": "192.168.3.4:7080",
"status": "healthy",
"group": "1",
"version": "v20.11.0-rc1-506-g32f1f5893",
"uptime": 820,
"lastEcho": 1617424155,
"ongoing": [
"opRollup"
],
"ee_features": [
"backup_restore",
"cdc"
],
"max_assigned": 2
}