I understand your negative thoughts about the editing feature : )
Ok, I simplified it and I’m using the code in examples.confd/ha/dummy/ctrl.c on each machine in order to simulate my process (which supposed to do HAFW), and I get the same error but I understood why I get confd_errno 17 - It happens when I get confd_errno 26 first.
confd_errno 26 first causes confd_errno 17 later. I don’t know why confd_errno 26 happened.
I’ll write what happened:
- Setup: two machines, machine_1 (10.168.251.16) and machine_2 (10.168.251.18).
- On both of the machines the confd.conf:
2.1) Enables confdLog, auditLog and developerLog to syslog.
2.2) Enables high availability
< ha>
< enabled>true< /enabled>
< ip>0.0.0.0< /ip>
< port>4569< /port>
< /ha>
- ConfD is stopped on both of the machines.
- I started it using the command confd (the default confd.conf location, the file that I changed). Everything looks fine with the log (in syslog) “ConfD started” on both of the machines.
-
confd --status on both of the machines:
status: started
cluster status:
mode: none
node id: NOT SET
- On machine_1 (master), I do: ./ctrl master node_1
Output on stderr:
TRACE Connected (ha) to ConfD
9-Jul-2015::09:26:28.279 22614/7f128b422740/3 SEND {1,#Bin<node_1>}
9-Jul-2015::09:26:28.280 22614/7f128b422740/3 GOT ok
Output on syslog:
confd[31598]: confd HA_INFO_IS_MASTER
ConfD state:
status: started
cluster status:
mode: master
node id: node_1
connected slaves: 0
- On machine_2 (slave), I do: ./ctrl slave node_2 node_1 10.168.251.16
Output on stderr:
TRACE Connected (ha) to ConfD
9-Jul-2015::09:28:22.406 22618/7f0447f13740/3 SEND {2,#Bin<node_2>,{#Bin<node_1>,{10,168,251,16}},1}
9-Jul-2015::09:28:28.807 22618/7f0447f13740/3 GOT {error,26}
not good: error: No such file or directory
What is this not good: error: No such file or directory? is it a ConfD’s internal error?
Output on syslog: nothing
Output on machine_1’s syslog:
confd[31598]: devel-cdb New slave transaction id 1436-367252-832646@ha_node_1 equals master - configuration db is up to date
confd[31598]: confd HA_INFO_IS_NONE
So, for a reason, now the master is dead.
ConfD statuses for both of the machines:
status: started
cluster status:
mode: none
node id: NOT SET
Since now, for every confd_ha_bemaster/beslave I try to call, I get confd_errno 17:
- I’ll try to set the master again with the command: ./ctrl master node_1
Output on stderr:
TRACE Connected (ha) to ConfD
9-Jul-2015::09:34:08.051 22646/7f733781b740/3 SEND {1,#Bin<node_1>}
9-Jul-2015::09:34:08.053 22646/7f733781b740/3 GOT {error,17}
void bemaster(char**): Assertion `(confd_ha_bemaster(s, &nodeid)) == 0’ failed.
Aborted (core dumped)
No output in syslog.
- For confd_ha_beslave: ./ctrl slave node_1 node_2 10.168.251.18
(I know I didn’t set machine_2 to be master. it doesn’t matter here)
TRACE Connected (ha) to ConfD
9-Jul-2015::09:43:54.043 22696/7fa1570be740/3 SEND {2,#Bin< node_1>,{#Bin< node_2>,{10,168,251,18}},1}
9-Jul-2015::09:43:54.044 22696/7fa1570be740/3 GOT {error,17}
not good: error: No such file or directory
No output in syslog.
What is this no good error? is it a ConfD’s internal error?
–> edit : )
I want to remind - this is kind of a random error.
I have another setup (another two machines) that the same commands work on.
Thanks.