How to configure HA from erlang econfd application?

Yes, they do. It just that when I execute econfd:beslave/4 function, it returns “ok” but the slave won’t connect to the cluster.

Also, all this functions has to be executed in the master node right? or do I have to execute econfd:beslave/4 function in the slave node?

No. Yes. See confd_lib_ha(3) man page under “confd_ha_beslave” for details. See also the C-example under examples.confd/ha/dummy as a reference.

Yes, I did go through the manual pages and also had gone through the example. That’s exactly what I was following but the slave node just won’t connect to the cluster. Every time I execute the function econfd:beslave/4 in my slave node it returns “ok”. When I give the waitreply argument as 1, it returns an error as {error, 25}.

Also I have just gone through the econfd_ha module and found out that if I give the waitreply argument as 0, It just writes to the socket and returns “ok”. The actual error is returned when I give the waitreply argument as 1. The error code being returned is 25 . Where can I find error descriptions?

Well, if you don’t wait for a reply you will get “ok” even if the connection from the slave to the master later fail. As stated in the man page for confd_ha_beslave() and in the ConfD UG chapter “High Availability - Cluster Events” under “CONFD_HA_INFO_BESLAVE_RESULT”, if you choose to not wait for a reply you will get a reply through a notification message. I.e. you then have to subscribe to HA notifications, which you should anyway.

See erlang/econfd/include/econfd_errors.hrl. Check your IP and port settings.

Oh I see. I will give that a try. Thank you.

Yes, I did go through the econfd_error.hrl file and had figured out the error. Thank you.