Book Image

Wildfly Cookbook

Book Image

Wildfly Cookbook

Overview of this book

Table of Contents (23 chapters)
WildFly Cookbook
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Stopping and starting your server groups via the CLI


In this recipe, we will learn how to stop and start an entire server group using the CLI. Since a server can belong to more than one server group, you might want to stop or start all the servers at once, and thus stop or start the server group.

Getting ready

For this recipe, both the domain controller and host controllers should be up and running. For their configuration, refer to the recipe Connecting the host controller to the domain controller in this chapter.

How to do it…

  1. Open your terminal and do as follows:

  2. With the command ls, you can list the entire context that you walk through. What we want to do is to "stop" the entire server group named server-group-REST-app:

    [domain@localhost:9990 /] /server-group=server-group-REST-app:stop-servers()
    {
        "outcome" => "success",
        "result" => undefined,
        "server-groups" => undefined
    }
    [domain@localhost:9990 /]
  3. Now let's start the server-group again, by invoking the start-servers method...