We are using the confd as master/slave.
In master node, the confd.conf shows:
< confdIpcAddress>
< ip>127.0.0.1< /ip>
< port>4565< /port>
< /confdIpcAddress>
< confdIpcExtraListenIp>10.54.8.35< /confdIpcExtraListenIp>
< ha>
< ip>10.54.8.35< /ip>
< enabled>true< /enabled>
< /ha>
On Slave, the confd.conf shows:
< confdIpcAddress>
< ip>127.0.0.1< /ip>
< port>4565< /port>
< /confdIpcAddress>
< confdIpcExtraListenIp>10.54.8.37< /confdIpcExtraListenIp>
< ha>
< ip>10.54.8.37< /ip>
< enabled>true< /enabled>
< /ha>
We are using the com.tailf.ha.Ha for managing the nodes.
Master is getting set properly.
Ha confdha = new Ha(s, “mynode”);
ConfBuf buff = new ConfBuf(“master”);
confdha.beMaster(buff);
But while setting the slave like this:
Ha confdha = new Ha(s, “mynode”);
ConfBuf buff = new ConfBuf(“master”);
String peerIPAddress = “10.54.8.35:4565”;
ConfBuf buff1 = new ConfBuf(“slave”);
ConfBuf buff2 = new ConfBuf(peerIPAddress);
ConfHaNode node = new ConfHaNode(buff, buff2);
confdha.beSlave(buff1, node, true);
We are getting the following exception:
com.tailf.ha.HaException: wrong response for HA:BESLAVE responded with: {error,25}
at com.tailf.ha.Ha.checkResponse(Ha.java:258)
at com.tailf.ha.Ha.beSlave(Ha.java:130)
…
And the confd.log is showing:
30-May-2016::00:39:15.959 WRTC-10 confd[13019]: - Failed to connect to master: invalid IP address
Also tried using String peerIPAddress = “10.54.8.35”; still same problem.
We are using confd 4.2.
Can you please throw some light on this? Why does it say invalid IP address?