Starting and Ending JEUS Servers
This section describes commands used to start and end JEUS servers.
1. Overview
There are 2 commands for starting a JEUS server depending on the server type.
-
startMasterServer command for starting the JEUS Master Server
-
startManagedServer command for starting a Managed Server
The commands for starting a JEUS server execute a launcher of the corresponding server. The launcher performs preparation for starting the server and then starts the server JVM. JEUS Master Server manages running Managed Servers (MSs) and sends administrator’s commands to them as an agent.
There is only one command for ending a JEUS server regardless of server type.
-
stopServer command
Commands for starting and ending servers are located in the following directory.
JEUS_HOME/bin/
2. Usage
The following describes how to start JEUS Master Server and Managed Servers.
To manage Managed Servers using a JEUS management tool, such as jeusadmin, JEUS Master Server must be started first.
JEUS Master Server communicates with each MS that runs on a HOST machine. All servers in a domain share the following configuration file. Each server reads necessary configurations from the file and runs according to those configurations.
JEUS_HOME/domains/DOMAIN_NAME/config/domain.xml
Starting JEUS Master Server
The following describes how to execute the startMasterServer command to start JEUS Master Server.
-
Use the following command appropriate for your OS to start JEUS Master Server.
-
UNIX and Linux
startMasterServer
-
-
Use the following options along with the startMasterServer command at a command prompt.
The server can run in debug mode by changing the setting in the domain.xml file. For more information, refer to Executing JEUS Server in Debug Mode.
startMasterServer [-h] [-domain <domain-name> -server <server-name>] [-u <user-name> -p <password>] [-cachelogin] [-f <file-name>] [-force] [-standby] [-rolling] [-verbose] [-fg]
The following describes each command option.
Option Description [-h]
Displays help for the command.
[-domain <domain-name>]
Domain name of JEUS Master Server to start.
[-server <server-name>]
Name of JEUS Master Server to start.
[-u <user-name>]
[-p <password>]
Account that starts the server.
[-u] is the administrator ID and [-p] is its password, which are required to start the server.
[-cachelogin]
Caches the login information entered with the [-u] and [-p] options.
If cached login information exists, it can replace the [-p] option. This feature is not recommended. For more information, see JEUS Security Guide.
[-f <file-name>]
Path to the file that contains cached login information.
[-force]
Option to forcibly change the server state to RUNNING, even if all registered applications are not in the RUNNING state.
[-standby]
Option to start the server in the STANDBY state.
[-verbose]
Option to display server logs on the launcher screen without terminating the launcher.
[-fg]
Option to start the server in foreground mode instead of background mode. In this case, the launcher ends at the start of the server.
Most of the options required to start Managed Servers are similar to the options required to start JEUS Master Server. A Managed Servers additionally contains the masterurl option, which is used to get the configuration file from the JEUS Master Server.
Starting Managed Server
The following describes how to start a Managed Server.
-
Use the following command appropriate for your OS at a command prompt.
-
UNIX and Linux
startManagedServer
-
-
Use the following options along with the command.
startManagedServer [-h] [-domain <domain-name> -server <server-name>] [-u <user-name> -p <password>] [-cachelogin] [-f <file-name>] [-force] [-standby] [-rolling] [-verbose] [-masterurl <master-url>] [-fg]
The following describes each command option.
Option Description [-h]
Displays help for the command.
[-domain <domain-name>]
Domain name of the Managed Server to start.
[-server <server-name>]
Name of the Managed Server to start. Required.
[-u <user-name>]
[-p <password>]
Account that starts the server.
[-u] is the administrator ID and [-p] is its password, which are required to start the server.
[-cachelogin]
Caches the login information entered with the [-u] and [-p] options.
If cached login information exists, it can replace the [-p] option. This feature is not recommended. For more information, see JEUS Security Guide.
[-f <file-name>]
Path to the file that contains cached login information.
[-force]
Option to forcibly change the server state to RUNNING, even if all registered applications are not in the RUNNING state.
[-standby]
Option to start the server in the STANDBY state.
[-verbose]
Option to display server logs on the launcher screen without terminating the launcher.
[-masterurl <master-url>]
URL address of the JEUS Master Server that manages the domain that the the Managed Server belongs to. It is recommended to set this address to use it for getting a new configuration file from the JEUS Master Server.
[-fg]
Option to start the server in foreground mode instead of background mode. In this case, the launcher ends at the start of the server.
Ending Servers
The following describes how to end a JEUS server.
-
Use the following command appropriate for your OS at a command prompt.
-
UNIX and Linux
stopServer
-
-
Use the following options along with the stopServer command.
stopServer [-host <host:port>] [-server <server-name> -masterurl <address:port>] [-u <user-name> -p <password>] [-cachelogin -domain <domain-name> -f <cachelogin-file>] [-g -to <timeout>]
The following describes each command option.
Option Description [-host <host:port>]
Information about the host to end in the format of host:port.
[-server <server-name> -masterurl <address:port>]
Specifies the name of the Managed Server in the [-server] option, and JEUS Master Server address in the [-masterurl] option in the format of address:port.
This option cannot be used with the [-host] option.
[-u <user-name> -p <password>]
Account that ends the server.
[-u] is th administrator ID, and [-p] is its password.
[-cachelogin -domain <domain-name> -f <cachelogin-file>]
Caches the login information entered with the [-u] and [-p] options.
It is the key that specifies cache login information, and uses the domain name. Therefore, the domain name must be specified by using the [-domain] option.
[-f] specifies the file path that contains cached login information. If not specified, the default path is /.jeusadmin/.jeuspasswd.
If cached login information exists, it can replace the [-p] option. This feature is not recommended. For more information, see JEUS Security Guide.
[-g -to <timeout>]
Ends the server gracefully.
[-to] specifies the maximum period of time to wait until requests being processed are completed when the [-g] option is used. (Unit: seconds)
If the [-to] option is not specified, the server infinitely waits until the requests are completely processed.
3. Entering Master Password
When starting the server, the master password is required if the security.key file is encrypted with the master password through an encryption tool. The security.key file contains a symmetric encryption algorithm key. For more information about encryption tools, refer to encryption.
When starting the server, if the security.key file is encrypted, the following console screen appears, which prompts for the master password. The master password must match to start the server.
The encryption key file is encrypted. Enter the master password. Password>
4. Executing JEUS Server in Debug Mode
If a JEUS server runs in the DEBUG mode, servlets and EJB applications can be debugged using the JPDA support debugger. In order to run a JEUS server in the DEBUG mode, add the following debug option to the jvm-config file of each server.
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8888
Use the debug port, “8888”, to run a JEUS server in the DEBUG mode. The debug port is used when JPDA debugger accesses the JVM.
Start a JEUS server with the changed configurations. Next, use the IDE (Integrated Development Environment) that supports JPDA to debug EJB and servlet applications.
The system environment variables can be set by using the jvm-config file of each server. For more information about the system environment variables used in JEUS, refer to Overview in "Part I. System Properties", which describes the "-D" option used by the JVM.
The jvm-option only applies to the corresponding server. |