This content has been marked as final.
Show 1 reply
-
1. Re: Finding JBoss leader
rhusar Mar 19, 2019 6:02 AM (in response to jkwysdom)1 of 1 people found this helpfulI suppose by leader you mean coordinator (a jgroups concept).
One way is to use the jboss-cli in scripting, for instance run this script to find out whether the current node is the coordinator:
[rhusar@ribera x]$ ./bin/jboss-cli.sh -c --controller=127.0.0.1:10190 "/subsystem=jgroups/channel=ee/protocol=pbcast.GMS:read-attribute(name=coord)"
{
"outcome" => "success",
"result" => false
}
to find out the coordinator from any node, you could use
[rhusar@ribera x]$ ./bin/jboss-cli.sh -c --controller=127.0.0.1:10190 "/subsystem=jgroups/channel=ee/protocol=pbcast.GMS:read-attribute(name=members)"
{
"outcome" => "success",
"result" => "(2) node3,node2"
}
where the 1st node name is the coordinator.