My guess the error is me not understanding how nginx works 100%. First I thought the problem was that I hadn’t set the internal ip, but that’s now fixed for all the nodes but the still can’t connect to each other. I also think it might because I don’t have a proper dns, instead I try to use nginx to fill that gap without luck. I get a “Gossip send failed” for all nodes, which I guess means they can’t find each other through the reverse proxy I’ve set up.
One more reason to why use docker, it’s good demonstration for what you need to set up a cluser.
If anyone have time to have a quick look it would be much appreciated: https://github.com/mastoj/dockerplayground
Some log messages I got when running:
esnode1_1 | [00011,11,21:43:38.843] Subscriptions received state change to Unknown stopping listening.
esnode1_1 | [00011,11,21:43:38.843] SLOW BUS MSG [PersistentSubscriptionsBus]: BecomeUnknown - 76ms. Handler: PersistentSubscriptionService.
esnode1_1 | [00011,24,21:43:38.855] ELECTIONS: STARTING ELECTIONS.
esnode1_1 | [00011,24,21:43:38.855] ELECTIONS: (V=0) SHIFT TO LEADER ELECTION.
esnode1_1 | [00011,24,21:43:38.855] ELECTIONS: (V=0) VIEWCHANGE FROM [172.17.0.107:2112, {f1297dca-308a-4f44-ba3b-102207b5220c}].
esnode1_1 | [00011,24,21:43:38.867] SLOW BUS MSG [MainBus]: StartElections - 63ms. Handler: ElectionsService.
esnode1_1 | [00011,24,21:43:38.867] SLOW QUEUE MSG [MainQueue]: StartElections - 63ms. Q: 1/3.
esnode1_1 | [00011,24,21:43:38.913] Looks like node [192.168.99.101:2113] is DEAD (Gossip send failed).
esnode1_1 | [00011,24,21:43:38.913] CLUSTER HAS CHANGED (gossip send failed to [192.168.99.101:2113])
esnode1_1 | Old:
esnode1_1 | MAN {00000000-0000-0000-0000-000000000000} [Manager, 192.168.99.101:2113, 192.168.99.101:2113] | 2015-10-06 21:43:38.713
esnode1_1 | VND {f1297dca-308a-4f44-ba3b-102207b5220c} [Unknown, 172.17.0.107:1112, n/a, 172.17.0.107:1113, n/a, 172.17.0.107:2112, 172.17.0.107:2113] 7520503/7521001/7521001/E13@7504579:{f6efef66-e455-4b23-af0f-926eb97750b0} | 2015-10-06 21:43:38.894
esnode1_1 | New:
esnode1_1 | MAN {00000000-0000-0000-0000-000000000000} [Manager, 192.168.99.101:2113, 192.168.99.101:2113] | 2015-10-06 21:43:38.913
esnode1_1 | VND {f1297dca-308a-4f44-ba3b-102207b5220c} [Unknown, 172.17.0.107:1112, n/a, 172.17.0.107:1113, n/a, 172.17.0.107:2112, 172.17.0.107:2113] 7520503/7521001/7521001/E13@7504579:{f6efef66-e455-4b23-af0f-926eb97750b0} | 2015-10-06 21:43:38.894
esnode1_1 | --------------------------------------------------------------------------------
esnode3_1 | [00012,24,21:43:39.287] ELECTIONS: (V=0) TIMED OUT! (S=ElectingLeader, M=).
esnode3_1 | [00012,24,21:43:39.287] ELECTIONS: (V=1) SHIFT TO LEADER ELECTION.
esnode3_1 | [00012,24,21:43:39.287] ELECTIONS: (V=1) VIEWCHANGE FROM [172.17.0.105:2112, {e367c130-01e1-4151-ab56-674b42a317a2}].
esnode2_1 | [00012,24,21:43:39.478] ELECTIONS: (V=0) TIMED OUT! (S=ElectingLeader, M=).
esnode2_1 | [00012,24,21:43:39.478] ELECTIONS: (V=1) SHIFT TO LEADER ELECTION.
esnode2_1 | [00012,24,21:43:39.478] ELECTIONS: (V=1) VIEWCHANGE FROM [172.17.0.106:2112, {72d6e50c-bb0a-410f-85dd-a6cccfaad619}].
esnode1_1 | [00011,24,21:43:39.871] ELECTIONS: (V=0) TIMED OUT! (S=ElectingLeader, M=).
esnode1_1 | [00011,24,21:43:39.871] ELECTIONS: (V=1) SHIFT TO LEADER ELECTION.
esnode1_1 | [00011,24,21:43:39.871] ELECTIONS: (V=1) VIEWCHANGE FROM [172.17.0.107:2112, {f1297dca-308a-4f44-ba3b-102207b5220c}].
esnode3_1 | [00012,24,21:43:40.289] ELECTIONS: (V=1) TIMED OUT! (S=ElectingLeader, M=).
esnode3_1 | [00012,24,21:43:40.289] ELECTIONS: (V=2) SHIFT TO LEADER ELECTION.
esnode3_1 | [00012,24,21:43:40.289] ELECTIONS: (V=2) VIEWCHANGE FROM [172.17.0.105:2112, {e367c130-01e1-4151-ab56-674b42a317a2}].