-
1. Re: Wildfly CLI - jgroups
pferraro Dec 2, 2016 7:54 AM (in response to dominique_claes)Something like this:
batch /subsystem=jgroups:add(default-channel=ee) /subsystem=jgroups/channel=ee:add(stack=udp) /subsystem=jgroups/stack=udp:add() /subsystem=jgroups/stack=udp/transport=UDP:add(socket-binding=jgroups-udp) /subsystem=jgroups/stack=udp/protocol=PING:add() /subsystem=jgroups/stack=udp/protocol=MERGE3:add() /subsystem=jgroups/stack=udp/protocol=FD_SOCK:add(socket-binding=jgroups-udp-fd) /subsystem=jgroups/stack=udp/protocol=FD_ALL:add() /subsystem=jgroups/stack=udp/protocol=VERIFY_SUSPECT:add() /subsystem=jgroups/stack=udp/protocol=pbcast.NAKACK2:add() /subsystem=jgroups/stack=udp/protocol=UNICAST3:add() /subsystem=jgroups/stack=udp/protocol=pbcast.STABLE:add() /subsystem=jgroups/stack=udp/protocol=pbcast.GMS:add() /subsystem=jgroups/stack=udp/protocol=UFC:add() /subsystem=jgroups/stack=udp/protocol=MFC:add() /subsystem=jgroups/stack=udp/protocol=FRAG2:add() /subsystem=jgroups/stack=tcp:add() /subsystem=jgroups/stack=tcp/transport=TCP:add(socket-binding=jgroups-tcp) /subsystem=jgroups/stack=tcp/protocol=MPING:add(socket-binding=jgroups-mping) /subsystem=jgroups/stack=tcp/protocol=MERGE3:add() /subsystem=jgroups/stack=tcp/protocol=FD_SOCK:add(socket-binding=jgroups-udp-fd) /subsystem=jgroups/stack=tcp/protocol=FD:add() /subsystem=jgroups/stack=tcp/protocol=VERIFY_SUSPECT:add() /subsystem=jgroups/stack=tcp/protocol=pbcast.NAKACK2:add() /subsystem=jgroups/stack=tcp/protocol=UNICAST3:add() /subsystem=jgroups/stack=tcp/protocol=pbcast.STABLE:add() /subsystem=jgroups/stack=tcp/protocol=pbcast.GMS:add() /subsystem=jgroups/stack=tcp/protocol=MFC:add() /subsystem=jgroups/stack=tcp/protocol=FRAG2:add() run-batch
-
2. Re: Wildfly CLI - jgroups
dominique_claes Dec 2, 2016 4:01 AM (in response to pferraro)The following works: jboss-cli.sh --connect command="/subsystem=jgroups:add(default-channel=ee,default-stack=udp)"
But the next command fails: .jboss-cli.sh --connect command="/subsystem=jgroups/channel=ee:add"
Then I get the message:
{
"outcome" => "failed",
"failure-description" => "WFLYCTL0216: Management resource '[
(\"subsystem\" => \"jgroups\"),
(\"stack\" => \"udp\")
]' not found",
"rolled-back" => true
}
Even when I run it in batch, it fails
-
3. Re: Wildfly CLI - jgroups
pferraro Dec 3, 2016 7:50 AM (in response to dominique_claes)dominique_claes My apologies - I was a little tired when I originally responded. I've edited the above batch of commands for correctness.
You *must* execute the above commands as a batch, otherwise they would need to be ordered carefully to prevent resources being referenced before they are defined. Also, don't use default-stack, it is deprecated.
The following equivalent set of commands will be runnable without a batch:
/subsystem=jgroups:add() /subsystem=jgroups/stack=udp:add() /subsystem=jgroups/stack=udp/transport=UDP:add(socket-binding=jgroups-udp) /subsystem=jgroups/stack=udp/protocol=PING:add() /subsystem=jgroups/stack=udp/protocol=MERGE3:add() /subsystem=jgroups/stack=udp/protocol=FD_SOCK:add(socket-binding=jgroups-udp-fd) /subsystem=jgroups/stack=udp/protocol=FD_ALL:add() /subsystem=jgroups/stack=udp/protocol=VERIFY_SUSPECT:add() /subsystem=jgroups/stack=udp/protocol=pbcast.NAKACK2:add() /subsystem=jgroups/stack=udp/protocol=UNICAST3:add() /subsystem=jgroups/stack=udp/protocol=pbcast.STABLE:add() /subsystem=jgroups/stack=udp/protocol=pbcast.GMS:add() /subsystem=jgroups/stack=udp/protocol=UFC:add() /subsystem=jgroups/stack=udp/protocol=MFC:add() /subsystem=jgroups/stack=udp/protocol=FRAG2:add() /subsystem=jgroups/stack=tcp:add() /subsystem=jgroups/stack=tcp/transport=TCP:add(socket-binding=jgroups-tcp) /subsystem=jgroups/stack=tcp/protocol=MPING:add(socket-binding=jgroups-mping) /subsystem=jgroups/stack=tcp/protocol=MERGE3:add() /subsystem=jgroups/stack=tcp/protocol=FD_SOCK:add(socket-binding=jgroups-udp-fd) /subsystem=jgroups/stack=tcp/protocol=FD:add() /subsystem=jgroups/stack=tcp/protocol=VERIFY_SUSPECT:add() /subsystem=jgroups/stack=tcp/protocol=pbcast.NAKACK2:add() /subsystem=jgroups/stack=tcp/protocol=UNICAST3:add() /subsystem=jgroups/stack=tcp/protocol=pbcast.STABLE:add() /subsystem=jgroups/stack=tcp/protocol=pbcast.GMS:add() /subsystem=jgroups/stack=tcp/protocol=MFC:add() /subsystem=jgroups/stack=tcp/protocol=FRAG2:add() /subsystem=jgroups/channel=ee:add(stack=udp) /subsystem=jgroups:write-attribute(name=default-channel, value=ee)
-
4. Re: Wildfly CLI - jgroups
dominique_claes Dec 5, 2016 9:17 AM (in response to pferraro)Sadly it fails. When I implement the commands from above, I get the following message:
{
"outcome" => "failed",
"failure-description" => "WFLYCLJG0010: Transport for stack udp is not defined. Please specify both a transport and protocol list, either as optional parameters to add() or via batching.",
"rolled-back" => true,
"response-headers" => {"process-state" => "reload-required"}
}
I believe it fails with command: "/subsystem=jgroups/stack=udp:add()"
-
5. Re: Wildfly CLI - jgroups
pferraro Dec 5, 2016 9:26 AM (in response to dominique_claes)dominique_claes The batch-less commands I posted will only work in admin-only mode. If you are trying to run these commands against a runtime server, then you need to batch them.
-
6. Re: Wildfly CLI - jgroups
dominique_claes Dec 6, 2016 1:39 AM (in response to pferraro)Hi Paul,
Still no result. It still gives the error from the previous post.
-
7. Re: Wildfly CLI - jgroups
pferraro Dec 6, 2016 6:55 AM (in response to dominique_claes)Are you certain that you are batching them correctly?
Here is my output:
[standalone@embedded /] batch [standalone@embedded / #] /subsystem=jgroups:add(default-channel=ee) [standalone@embedded / #] /subsystem=jgroups/channel=ee:add(stack=udp) [standalone@embedded / #] /subsystem=jgroups/stack=udp:add() [standalone@embedded / #] /subsystem=jgroups/stack=udp/transport=UDP:add(socket-binding=jgroups-udp) [standalone@embedded / #] /subsystem=jgroups/stack=udp/protocol=PING:add() [standalone@embedded / #] /subsystem=jgroups/stack=udp/protocol=MERGE3:add() [standalone@embedded / #] /subsystem=jgroups/stack=udp/protocol=FD_SOCK:add(socket-binding=jgroups-udp-fd) [standalone@embedded / #] /subsystem=jgroups/stack=udp/protocol=FD_ALL:add() [standalone@embedded / #] /subsystem=jgroups/stack=udp/protocol=VERIFY_SUSPECT:add() [standalone@embedded / #] /subsystem=jgroups/stack=udp/protocol=pbcast.NAKACK2:add() [standalone@embedded / #] /subsystem=jgroups/stack=udp/protocol=UNICAST3:add() [standalone@embedded / #] /subsystem=jgroups/stack=udp/protocol=pbcast.STABLE:add() [standalone@embedded / #] /subsystem=jgroups/stack=udp/protocol=pbcast.GMS:add() [standalone@embedded / #] /subsystem=jgroups/stack=udp/protocol=UFC:add() [standalone@embedded / #] /subsystem=jgroups/stack=udp/protocol=MFC:add() [standalone@embedded / #] /subsystem=jgroups/stack=udp/protocol=FRAG2:add() [standalone@embedded / #] /subsystem=jgroups/stack=tcp:add() [standalone@embedded / #] /subsystem=jgroups/stack=tcp/transport=TCP:add(socket-binding=jgroups-tcp) [standalone@embedded / #] /subsystem=jgroups/stack=tcp/protocol=MPING:add(socket-binding=jgroups-mping) [standalone@embedded / #] /subsystem=jgroups/stack=tcp/protocol=MERGE3:add() [standalone@embedded / #] /subsystem=jgroups/stack=tcp/protocol=FD_SOCK:add(socket-binding=jgroups-udp-fd) [standalone@embedded / #] /subsystem=jgroups/stack=tcp/protocol=FD:add() [standalone@embedded / #] /subsystem=jgroups/stack=tcp/protocol=VERIFY_SUSPECT:add() [standalone@embedded / #] /subsystem=jgroups/stack=tcp/protocol=pbcast.NAKACK2:add() [standalone@embedded / #] /subsystem=jgroups/stack=tcp/protocol=UNICAST3:add() [standalone@embedded / #] /subsystem=jgroups/stack=tcp/protocol=pbcast.STABLE:add() [standalone@embedded / #] /subsystem=jgroups/stack=tcp/protocol=pbcast.GMS:add() [standalone@embedded / #] /subsystem=jgroups/stack=tcp/protocol=MFC:add() [standalone@embedded / #] /subsystem=jgroups/stack=tcp/protocol=FRAG2:add() [standalone@embedded / #] run-batch 06:49:54,166 INFO [org.jboss.as.clustering.jgroups] (AeshProcess: 34) WFLYCLJG0001: Activating JGroups subsystem. The batch executed successfully process-state: reload-required
-
8. Re: Wildfly CLI - jgroups
dominique_claes Dec 6, 2016 8:57 AM (in response to pferraro)When I create a separate file with all the commands in batch and I execute that script in 'embed-server' mode than it works.
It was like you suggested that I needed to run this while Wildfly is not running.