Stopping the application server
Stopping the application server can be done in several ways. Sending an interrupt signal (Ctrl + C) will interrupt the server abruptly, so it's not a recommended option.
So it is sending a kill -9 signal from the terminal against the application server process which is an extreme option to be used when the application server is not responsive through management channels.
The recommended approach is to connect through the Command Line Interface and execute the shutdown command:
- Execute
jboss-cli.sh
fromJBOSS_HOME/bin
. - Once in the command line prompt, execute the connect command:
[disconnected /] connect 127.0.0.1:9990 Connected to 127.0.0.1:9990
- Now issue the shutdown command that will stop the application server:
[127.0.0.1:9990 /] shutdown
- The shutdown command can be also executed with the
restart=true
parameter which will cause the application server to restart:[127.0.0.1@localhost:9990 /] shutdown --restart=true
Tip
Two things to know!
The first one is that if you don't provide any parameter to the connect command, it will use the defaults contained in the
jboss-cli.xml
that will attempt to connect to localhost on port9990
.Next, if you are connecting to a remote host controller, a username/password challenge will be prompted. See the next section (Basic server administration) to learn how to create a management user.