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 servers via the CLI


In this recipe, we will learn how to stop and start a single server that belongs to a server group using the CLI. Because servers that belong to a server group might be spread over a series of different machines, with different resources available, you might need to stop a single server, without stopping the entire server group to add more resources and start it up back again. Fortunately, WildFly provides such granularity with regards to stop servers.

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:

    $ ./bin/jboss-cli.sh --connect
    
    [domain@localhost:9990 /]
  2. What we want to do is to "stop" the server named REST-server-one, which belongs to the Host Controller named slave-1. This is done as follows:

    [domain@localhost:9990 /] /host...