JBoss Community Archive (Read Only)

WildFly 8

Starting & stopping Servers in a Managed Domain

Starting a standalone server is done through the bin/standalone.sh script. However in a managed domain server instances are managed by the domain controller and need to be started through the management layer:

First of all, get to know which servers are configured on a particular host:

[domain@localhost:9999 /] :read-children-names(child-type=host)
{
   "outcome" => "success",
   "result" => ["local"]
}


[domain@localhost:9999 /] /host=local:read-children-names(child-type=server-config)
{
   "outcome" => "success",
   "result" => [
       "my-server",
       "server-one",
       "server-three"
   ]
}

Now that we know, that there are two servers configured on host "local", we can go ahead and check their status:

[domain@localhost:9999 /] /host=local/server-config=server-one:read-resource(include-runtime=true)
{
   "outcome" => "success",
   "result" => {
       "auto-start" => true,
       "group" => "main-server-group",
       "interface" => undefined,
       "name" => "server-one",
       "path" => undefined,
       "socket-binding-group" => undefined,
       "socket-binding-port-offset" => undefined,
       "status" => "STARTED",
       "system-property" => undefined,
       "jvm" => {"default" => undefined}
   }
}

You can change the server state through the "start" and "stop" operations

[domain@localhost:9999 /] /host=local/server-config=server-one:stop
{
   "outcome" => "success",
   "result" => "STOPPING"
}

Set the "blocking" attribute to "true" if you want the operation to block until it is finished:

[domain@localhost:9999 /] /host=local/server-config=server-one:restart(blocking=true)
{
   "outcome" => "success",
   "result" => "STARTED"
}

Navigating through the domain topology is much more simple when you use the web interface.

JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-13 13:46:57 UTC, last content change 2015-03-23 08:39:50 UTC.