Chapter 2. Application Server Management

2.1. Start JBoss EAP 6

2.1.2. Start JBoss EAP 6 as a Standalone Server

Summary

This topic covers the steps to start JBoss EAP 6 as a Standalone Server.

Procedure 2.1. Start the Platform Service as a Standalone Server

  1. For Red Hat Enterprise Linux.

    Run the command: EAP_HOME/bin/standalone.sh
  2. For Microsoft Windows Server.

    Run the command: EAP_HOME\bin\standalone.bat
  3. Optional: Specify additional parameters.

    To print a list of additional parameters to pass to the start-up scripts, use the -h parameter.
Result

The JBoss EAP 6 Standalone Server instance starts.

2.1.3. Start JBoss EAP 6 as a Managed Domain

Order of Operations

The domain controller must be started before any slave servers in any server groups in the domain. Use this procedure first on the domain controller, and then on each associated host controller and each other host associated with the domain.

Procedure 2.2. Start the Platform Service as a Managed Domain

  1. For Red Hat Enterprise Linux.

    Run the command: EAP_HOME/bin/domain.sh
  2. For Microsoft Windows Server.

    Run the command: EAP_HOME\bin\domain.bat
  3. Optional: Pass additional parameters to the start-up script.

    For a list of parameters you can pass to the start-up script, use the -h parameter.
Result

The JBoss EAP 6 Managed Domain instance starts.

2.1.4. Start JBoss EAP 6 with an Alternative Configuration

If you do not specify a configuration file, the server starts with the default file. However, when you start the server, you can specify a configuration manually. The process varies slightly, depending on whether you are using a Managed Domain or Standalone Server, and depending on which operating system you are using.

Prerequisites

  • Before using an alternate configuration file, prepare it using the default configuration as a template. For a Managed Domain, the configuration file needs to be placed in the EAP_HOME/domain/configuration/ directory. For a Standalone Server, the configuration file should be placed in the EAP_HOME/standalone/configuration/ directory.

Note

Several example configurations are included in the EAP_HOME/docs/examples/configs/ directory. Use these examples to enable extra features such as clustering or the Transactions XTS API.

Procedure 2.3. Start the Instance with an Alternative Configuration

  1. Managed Domain

    For a Managed Domain, provide the file name of the configuration file as an option to the --domain-config parameter. The file must be present in the EAP_HOME/domain/configuration/ directory, and you need to specify the path relative to that directory.

    Example 2.1. Using an alternate configuration file for a Managed Domain in Red Hat Enterprise Linux

    [user@host bin]$ ./domain.sh --domain-config=domain-alternate.xml
    This example uses the EAP_HOME/domain/configuration/domain-alternate.xml configuration file.

    Example 2.2. Using an alternate configuration file for a Managed Domain in Microsoft Windows Server

    C:\EAP_HOME\bin> domain.bat --domain-config=domain-alternate.xml
    
    
    This example uses the EAP_HOME\domain\configuration\domain-alternate.xml configuration file.
  2. Standalone server

    For a Standalone Server, provide the filename of the configuration file as an option to the --server-config parameter. The configuration file must be located in the EAP_HOME/standalone/configuration/ directory, and you need to specify the file path relative to that directory.

    Example 2.3. Using an alternate configuration file for a Standalone Server in Red Hat Enterprise Linux

    [user@host bin]$ ./standalone.sh --server-config=standalone-alternate.xml
    This example uses the EAP_HOME/standalone/configuration/standalone-alternate.xml configuration file.

    Example 2.4. Using an alternate configuration file for a Standalone Server in Microsoft Windows Server

    C:\EAP_HOME\bin> standalone.bat --server-config=standalone-alternate.xml
    This example uses the EAP_HOME\standalone\configuration\standalone-alternative.xml configuration file.
Result

JBoss Enterprise Application Platform is now running, using your alternate configuration file.

2.1.5. Stop JBoss EAP 6

The way that you stop JBoss EAP 6 depends on how it was started. This task covers stopping an instance that was started interactively, stopping an instance that was started by a service, and stopping an instance that was forked into the background by a script.

Note

This task does not address stopping a server or server group in a Managed Domain. For those scenarios, see Section 2.2.3, “Stop a Server Using the Management Console”.

Procedure 2.4. Stop a standalone instance of JBoss EAP 6

  1. Stop an instance which was started interactively from a command prompt.

    Press Ctrl-C in the terminal where JBoss EAP 6 is running.
  2. Stop an instance which was started as an operating system service.

    Depending on your operating system, use one of the following procedures.
    • Red Hat Enterprise Linux

      For Red Hat Enterprise Linux, if you have written a service script, use its stop facility. This needs to be written into the script. Then you can use service scriptname stop, where scriptname is the name of your script.
    • Microsoft Windows Server

      In Microsoft Windows, use the net service command, or stop the service from the Services applet in the Control Panel.
  3. Stop an instance which is running in the background (Red Hat Enterprise Linux)

    1. Locate the instance from the process list. One option is to run the command ps aux |grep "[j]ava -server". This returns one result for each JBoss EAP 6 instance that is running on the local machine.
    2. Send the process the TERM signal, by running kill process_ID, where process_ID is the number in the second field of the ps aux command above.
Result

Each of these alternatives shuts JBoss EAP 6 down cleanly so that data is not lost.

2.1.6. Reference of Switches and Arguments to pass at Server Runtime

The application server startup script accepts the addition of arguments and switches at runtime. The use of these parameters allows for the server to be started under alternative configurations to those defined in the standalone.xml, domain.xml and host.xml configuration files. This might include starting the server with an alternative set of socket bindings or a secondary configuration. A list of these available parameters can be accessed by passing the help switch at startup.

Example 2.5. 

The following example is similar to the server startup explained in Section 2.1.2, “Start JBoss EAP 6 as a Standalone Server”, with the addition of the -h or --help switches. The results of the help switch are explained in the table below.
[localhost bin]$ standalone.sh -h

Table 2.1. Table of runtime switches and arguments

Argument or Switch Description
--admin-only Set the server's running type to ADMIN_ONLY. This will cause it to open administrative interfaces and accept management requests, but not start other runtime services or accept end user requests.
-b=<value> Set system property jboss.bind.address to the given value.
-b <value> Set system property jboss.bind.address to the given value.
-b<interface>=<value> Set system property jboss.bind.address.<interface> to the given value.
-c=<config> Name of the server configuration file to use. The default is standalone.xml.
-c <config> Name of the server configuration file to use. The default is standalone.xml.
--debug [<port>] Activate debug mode with an optional argument to specify the port. Only works if the launch script supports it.
-D<name>[=<value>] Set a system property.
-h Display the help message and exit.
--help Display the help message and exit.
-P=<url> Load system properties from the given URL.
-P <url> Load system properties from the given URL.
--properties=<url> Load system properties from the given URL.
-S<name>[=<value>] Set a security property.
--server-config=<config> Name of the server configuration file to use. The default is standalone.xml.
-u=<value> Set system property jboss.default.multicast.address to the given value.
-u <value> Set system property jboss.default.multicast.address to the given value.
-V Display the application server version and exit.
-v Display the application server version and exit.
--version Display the application server version and exit.