Hide Forgot
Hi guys, these operations work splendidly with jboss-cli.sh: {code} ./jboss-cli.sh --connect --commands='/extension=org.jboss.as.modcluster:add()' --timeout=12000 ./jboss-cli.sh --connect --commands='/subsystem=web/connector=ajp:add(name=ajp,protocol=ajp,scheme=ajp,socket-binding=ajp)' --timeout=120000 ./jboss-cli.sh --connect --commands='batch,/:composite(steps=[{"operation"=>"add","address"=>[("subsystem"=>"modcluster")]},{"operation"=>"add","address"=>[("subsystem"=>"modcluster"),("mod-cluster-config"=>"configuration")],"connector"=>"ajp","balancer"=>"qacluster","advertise"=>"true","advertise-socket"=>"modcluster"},{"operation"=>"add","address"=>[("socket-binding-group"=>"standard-sockets"),("socket-binding"=>"modcluster")],"port"=>0,"multicast-address"=>"224.0.5.213","multicast-port"=>"23364"}]),run-batch' --timeout=120000 {code} whereas on Windows, these first two pass: {code} jboss-cli.bat --connect --commands=/extension=org.jboss.as.modcluster:add() --timeout=12000 jboss-cli.bat --connect --commands=/subsystem=web/connector=ajp:add(name=ajp,protocol=ajp,scheme=ajp,socket-binding=ajp) --timeout=120000 {code} and this last one just hangs in cmd and terminates on hitting Return, leaving no output, no error message, nothing. {code} jboss-cli.bat --connect --commands=batch,/:composite(steps=[{"operation"=>"add","address"=>[("subsystem"=>"modcluster")]},{"operation"=>"add","address"=>[("subsystem"=>"modcluster"),("mod-cluster-config"=>"configuration")],"connector"=>"ajp","balancer"=>"qacluster","advertise"=>"true","advertise-socket"=>"modcluster"},{"operation"=>"add","address"=>[("socket-binding-group"=>"standard-sockets"),("socket-binding"=>"modcluster")],"port"=>0,"multicast-address"=>"224.0.5.213","multicast-port"=>"23364"}]),run-batch --timeout=120000 {code} I tried to escape ' " ' and ' , ' with both ^ and \ and it didn't help. I also tried to swap " with ', no luck either. As you might see, I omitted all the spaces as well and again, it didn't bring any improvement. I admit my knowledge of Windows and Batch is rather limited, so it's possible that someone might know how to make jboss-cli.bat swallow this batch operation of mine. THX for comments.
This is windows command line specific. The correct syntax would be to escape and quote all the special characters, e.g. the line would start as: jboss-cli.bat --connect --commands=batch,/:composite(steps=[{\"operation\"=">"\"add\"... And so on. '>' character is treated as outout redirection which explains why there is no output on the terminal. The other thing is, I don't know whether that is intentional, but using composite inside a batch doesn't make any sense. It simply further and unnecessary complicates the line. Since that is what the batch is all about - to create a single composite operation out of the commands and operations included into the batch.