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 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 jeus.server.admin.DomainAdminServerBootstrapper and jeus.launcher.Launcher.
jps -l 26514 jeus.launcher.Launcher 26515 jeus.server.admin.DomainAdminServerBootstrapper 27582 sun.tools.jps.Jps 26517 jeus.tool.console.ConsoleBootstrapper
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.
MSs 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 the 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 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 (jeusadmin)
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 | N/A | 5360 | N/A | Fri Mar 22 | false | base-192.168| jms, | |rver(*) |(320 sec) | | | |10:41:25 KST | |.34.3:9736 | ejb, web | | | | | | |2013 | | http-server-| | | | | | | | | |0.0.0.0:8088 | | | | | | | | | |jms-internal-| | | | | | | | | |0.0.0.0:9761 | | +--------+----------+-----+-------+-----+---------------+---------+-------------+-------------+ | server1| RUNNING |node1| 6424 | clus| Fri Mar 22 | false | base-192.168| jms, | | |(232 sec) | | |ter1 |10:42:17 KST | |.34.1:9836 | ejb, web | | | | | | |2013 | | | | +--------+----------+-----+-------+-----+---------------+---------+-------------+-------------+ | server2| SHUTDOWN |node2| N/A | N/A | N/A | N/A | N/A | N/A | | |(4 sec) | | | |10:46:05 KST | | | | | | | | | |2013 | | | | +--------+----------+-----+-------+-----+---------------+---------+-------------+-------------+ ===============================================================================================
Refer to JEUS Reference Book. "4.2.3.43. server-info" for more information about the serverinfo command.