There is some confusion about setting the WildFly node name (at least in the standalone
server case).
<tl;dr>
QUESTION: How does one change the server's cluster node name (say, for the JGroups
configuration). I thought both would be equivalent (either setting <server
name="a"> or setting -Djboss.node.name=a) but that does not seem to be the
case.
</tl;dr>
Suppose I start WildFly via standalone.sh (with its stock out of box standalone.xml) but
with the command line option:
-Djboss.node.name=wotgorilla
When I do this, I see the node-name (in the server-environment subsystem) set to
"wotgorilla" but the server's name is my normal hostname (in this case
"mazztower"):
/core-service=server-environment/:read-attribute(name=node-name)
{
"outcome" => "success",
"result" => "wotgorilla"
}
/:read-attribute(name=name)
{
"outcome" => "success",
"result" => "mazztower"
}
OK, but now suppose I edit standalone.xml - in the top-level root element <server> I
add the name attribute:
<server name="foobar">
and I start the server WITHOUT any commmand line options (just "standalone.sh").
I see that BOTH "name" and "node-name" match my new server name:
/core-service=server-environment/:read-attribute(name=node-name)
{
"outcome" => "success",
"result" => "foobar"
}
/:read-attribute(name=name)
{
"outcome" => "success",
"result" => "foobar"
}
QUESTION: Why the discrepency? Is this a bug or expected behavior? How does one change the
server's cluster node name (say, for the JGroups configuration). I thought both would
be equivalent (either setting <server name="a"> or setting
jboss.node.name) but that does not seem to be the case.
Thanks,
John Mazz