官术网_书友最值得收藏!

  • WildFly Cookbook
  • Luigi Fugaro
  • 247字
  • 2021-07-16 13:38:18

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:
    [domain@localhost:9990 /] /server-group=server-group-REST-app:start-servers()
    {
        "outcome" => "success",
        "result" => undefined,
        "server-groups" => undefined
    }
    [domain@localhost:9990 /]

How it works...

In the CLI, you have basically remapped the entire configuration, hence, if you look at the domain.xml or host.xml files, you find pretty much the same hierarchy.

In our recipe we wanted to stop a server group, so if you look at the domain.xml you can determine the contexts and commands – you can see the available commands by hitting the Tab key next to : or /.

主站蜘蛛池模板: 全椒县| 玉山县| 屯门区| 哈巴河县| 许昌县| 宁强县| 绥德县| 香格里拉县| 丰县| 扬州市| 大洼县| 拉孜县| 临城县| 呼图壁县| 长宁县| 泰安市| 阿巴嘎旗| 邵阳县| 遂昌县| 曲靖市| 西华县| 娄烦县| 罗江县| 巴林左旗| 合水县| 塘沽区| 赤城县| 太仓市| 武宣县| 新竹县| 巴彦县| 吉安市| 秭归县| 通海县| 普安县| 隆尧县| 穆棱市| 梨树县| 新兴县| 岑巩县| 商洛市|