Table of Contents
This chapter describes how to start and close a server and check the server lifecycle.
Complete the following tasks to prepare for server startup.
JEUS must be installed and domains and servers must be created. A user name and password for starting and stopping the server must also be created in advance.
If this task is not complete, set up the environment by following the steps in "Installing and starting JEUS".
Node configuration is required to start a server via DAS by using WebAdmin or jeusadmin.
Refer to JEUS Node Manager Guide for detailed information on node configuration.
Node configuration is not required when a user starts the server manually by executing a script on the machine where each MS will be installed. But in such case, since the Node Manager cannot manage the MS it is recommended to configure the node.
Check that the JVM configuration for the server is configured in the xml file.
Changing JVM settings requires a server restart. If it is not configured when the domain is created, start DAS to change the settings and then apply them by restarting DAS.
If JVM settings are missing for an MS, start the server after adding JVM settings through WebAdmin or jeusadmin. Refer to "3.6.2. Changing a Server's JVM Settings" for the modification method.
This section describes how to start the Domain Administration Server (DAS) and Managed Servers (MSs).
The startDomainAdminServer script is used to start DAS. It requires the domain name of DAS as well as a user name and password with the authority to start JEUS.
All three options are required if it is run from 'JEUS_HOME/bin'. The domain name can be omitted if it is run from the DOMAIN_HOME path on DAS. The command differs depending on the execution path.
JEUS_HOME/bin
JEUS_HOME/bin$ startDomainAdminServer -domain <domain_name> -u <user_name> -p <password>
DOMAIN_HOME/bin
DOMAIN_HOME/bin$ startDomainAdminServer -u <user_name> -p <password>
SERVER_HOME/bin
SERVER_HOME/bin$ startDomainAdminServer -u <user_name> -p <password>
After DAS starts, it creates a server log in SERVER_HOME/logs/JeusServer.log, which can be monitored by using the console tool with the -verbose option. The server process and the launcher process both run on DAS. The launcher process runs the server process and outputs logs to the console tool.
Use the jps command to check LauncherBootStrapper and DomainAdminServerBootstrapper.
jps -l 399092 jeus.server.LauncherBootstrapper 409880 sun.tools.jps.Jps 398868 jeus.server.NodemanagerBootstrapper 399352 jeus.server.admin.DomainAdminServerBootstrapper
If the server fails to start, check the cause in the 'SERVER_HOME/logs/JeusLauncher.log'.
1. Jps is a tool, which is in the 'JAVA_HOME/bin' folder, that lists the Java processes.
2. Refer to JEUS Server Guide. "1.6. Launcher" for detailed information about the Launcher.
An MS can be started using either DAS or a script.
DAS can be used to start an MS if DAS is running and the SSH information of the MS is configured.
An MS can be started using DAS with WebAdmin or the console tool.
Using WebAdmin
Click [Servers] from the left menu to go to the list of servers. Click [Start] on a server to start it. A message is displayed to notify that the server has started successfully.
Using the console tool
The start-server command can be used in jeusadmin to start an MS as in the following example.
[DAS]domain1.adminServer>start-server server1
The server [server1] was successfully started.
Refer to JEUS Reference Book. "4.2.3.47. start-server" for detailed information about the start-server command.
A Managed Server can be started using a script instead of DAS.
If multiple servers are distributed on multiple machines in the domain, run the script on each machine that hosts the MS. The name of the script is startManagerServer, and dasurl setting must be configured in order to synchronize the settings with DAS.
If dasurl is not configured, MS will start in the INDEPENDENT mode. After DAS finds the MS, it is managed by DAS. If DAS has not started, dasurl can be omitted so that the MS can start in the INDEPENDENT mode. Otherwise, it is recommended to configure dasurl. Refer to "6.1.3. Managed Servers (MSs) in INDEPENDENT Mode" for detailed information about INDEPENDENT mode.
The following shows how to execute the startManagedServer command from different locations.
JEUS_HOME/bin
JEUS_HOME/bin$ startManagedServer -dasurl <das_ip:das_baseport> -domain <domain_name> -server <server_name> -u <user_name> -p <password>
DOMAIN_HOME/bin
DOMAIN_HOME/bin$ startManagedServer -dasurl <das_ip:das_baseport> -server <server_name> -u <user_name> -p <password>
SERVER_HOME/bin
SERVER_HOME/bin$ startManagedServer -dasurl <das_ip:das_baseport> -u <user_name> -p <password>
This section describes how to shut down DAS and managed server.
An MS can be shut down using either DAS or a script.
An MS can be shut down using DAS with WebAdmin or the console tool.
Using WebAdmin
Click [Servers] from the left menu to go to the list of servers. Click [Stop] next to a server to stop it.
JEUS supports graceful server shutdown, which handles pending requests before shutting down. Enter the amount of time to wait for incomplete requests in the 'Timeout' field and click [OK].
A message is displayed that the server has been shut down successfully.
Refer to JEUS Server Guide. "3.1.3. Shutting Down a Managed Server" for detailed information about graceful server shutdown.
Using the console tool
Managed servers can be shut down by DAS using the stop-server command in jeusadmin, as shown in the following example. Refer to JEUS Reference Book. "4.2.3.50. stop-server" for detailed information about the stop-server command.
[DAS]domain1.adminServer>stop-server <server_list>
A Managed Server can be shut down using a script which is installed on the server. If multiple servers are distributed on multiple machines in the domain, run the script on each machine that hosts the MS.
The following shows how to execute the stopServer command from different locations.
JEUS_HOME/bin
JEUS_HOME/bin$ stopServer -host <server_ip:server_baseport> -u <user_name> -p <password>
DOMAIN_HOME/bin
DOMAIN_HOME/bin$ stopServer -host <server_ip:server_baseport> -u <user_name> -p <password>
SERVER_HOME/bin
SERVER_HOME/bin$ stopServer -host <server_ip:server_baseport> -u <user_name> -p <password>
DAS can be shut down using either jeusadmin or a script.
DAS can be shut down after stopping all managed servers. Run the following local-shutdown command.
[DAS]domain1.adminServer>local-shutdown
DAS can be shut down using a script.
Run the following stopServer command depending on the location.
JEUS_HOME/bin
JEUS_HOME/bin$ stopServer -host <server_ip:server_baseport> -u <user_name> -p <password>
DOMAIN_HOME/bin
DOMAIN_HOME/bin$ stopServer -host <server_ip:server_baseport> -u <user_name> -p <password>
SERVER_HOME/bin
SERVER_HOME/bin$ stopServer -host <server_ip:server_baseport> -u <user_name> -p <password>
DAS determines the lifecycle of the managed servers.
The following describes each state.
The following are the three ways to check for the server state.
Using an MBean
Server states can be monitored using J2EEDomain#getServerState (String serverName).
Refer to "JEUS JMX manual" for detailed information about MBeans.
Using WebAdmin
Click [Monitoring] > [Servers] from the left menu to go to the screen with the list of servers and domain information. The server state is displayed in the 'Status' column.
Using the console tool
Server statuses can be checked using the following serverinfo command in the console tool. Refer to JEUS Reference Book. "4.2.3.43. server-info" for detailed information about the serverinfo command.
[DAS]domain1.adminServer>serverinfo Information about Domain (domain1) =============================================================================================== +--------+---------+-----+-------+-----+----------------+---------+-------------+-------------+ | Server | Status | Node| PID | Clus| Latest Start | Need to | Listen Ports| Running | | | |Name | | ter |Time / Shutdown | Restart | | Engines | | | | | | | Time | | | | +--------+---------+-----+-------+-----+----------------+---------+-------------+-------------+ | adminSe| RUNNING |node1|399352 | N/A | 2016-08-23 | false | base-0.0. | jms, | |rver(*) |(01:40:40| | | |(Tue) PM | |0.0:9736 | ejb, web | | |) | | | |03:53:28 KST | | http-server-| | | | | | | | | |0.0.0.0:8088 | | | | | | | | | |jms-0.0.0 | | | | | | | | | |.0:9741 | | +--------+---------+-----+-------+-----+----------------+---------+-------------+-------------+ | server1| RUNNING |node1| N/A | clus| 2016-08-23 | N/A | base-192.168| jms, | | |(01:31:03| | |ter1 |(Tue) PM | |.34.1:9836 | ejb, web | | |) | | | |04:03:05 KST | | | | +--------+---------+-----+-------+-----+----------------+---------+-------------+-------------+ | server2| SHUTDOWN|node1| N/A | clus| 2016-08-23 | N/A | N/A | N/A | | |(01:31:03| | |ter1 |(Tue) PM | | | | | |) | | | |04:03:05 KST | | | | +--------+---------+-----+-------+-----+----------------+---------+-------------+-------------+ ===============================================================================================
Refer to JEUS Reference Book. "4.2.3.43. server-info" for more information about the serverinfo command.