Configuring a JEUS System
This chapter describes how to set up and start JEUS and WebAdmin.
2. Configuring Basic Environment Variables
JEUS’s jeusadmin can be used to easily manage all JEUS components, configure the environment, perform monitoring, and manage applications.
Use the following steps to run jeusadmin.
-
Run
startMasterServer
from the command prompt to start JEUS Master Server.The following is an example of executing JEUS MASTER.
[was@localhost bin]$ startMasterServer -u administrator -p <password> ************************************************************** - JEUS Home : /home/jeus - Added Java Option : -Djeus.io.buffer.size-per-pool=81920 -Djeus.cdi.enabled=false -Djeus.jms.server.manager.produce-wait-strategy-type=blocking -Djeus.servlet.sortWebinfLibraries=name_asc *************************************************************** =============== JEUS LICENSE INFORMATION ================ == VERSION : JEUS 9 Fix#0 (9.0.0.0-b15) == EDITION: Enterprise (Trial License) == NOTICE: This license restricts the number of allowed clients. == Max. Number of Clients: 5 ========================================================== [2024.09.25 17:54:09][1] [launcher-1] [Config-0153] DomainConfigServiceProvider is jeus.service.descriptor.JEUSDomainDescriptorFile. This license is not appropriate for product runtime mode. Replace the license with an appropriate one. [2024.09.25 17:54:10][1] [launcher-1] [Config-0157] SecurityDomainsConfigServiceProvider is jeus.service.descriptor.SecurityDomainsDescriptorFile. [2024.09.25 17:54:10][2] [launcher-1] [Launcher-0012] Starting the server [server1] with the command /home/jdk-17.0.2/bin/java -Dserver1 -Xms1024m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m -Djeus.io.buffer.size-per-pool=81920 -Djeus.cdi.enabled=false -Djeus.jms.server.manager.produce-wait-strategy-type=blocking -Djeus.servlet.sortWebinfLibraries=name_asc -server -Xbootclasspath/p:/home/jeus/lib/system/extension.jar -classpath /home/jeus/lib/system/bootstrap.jar -Djava.security.policy=/home/jeus/domains/jeus_domain/config/security/policy -Djava.library.path=/home/jeus/lib/system:/home/webtob5004_B231_0_38//lib:/home/webtob5004_B231_0_38//lib:/home/webtob5004_B231_0_38//lib: -Djava.endorsed.dirs=/home/jeus/lib/endorsed -Djeus.properties.replicate=jeus,sun.rmi,java.util,java.net -Djava.util.logging.config.file=/home/jeus/bin/logging.properties -Dsun.rmi.dgc.server.gcInterval=3600000 -Djava.util.logging.manager=jeus.util.logging.JeusLogManager -Djeus.home=/home/jeus -Djava.net.preferIPv4Stack=true -Djeus.tm.checkReg=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Djeus.domain.name=jeus_domain -Djava.naming.factory.initial=jeus.jndi.JNSContextFactory -Djava.naming.factory.url.pkgs=jeus.jndi.jns.url -Djeus.server.protectmode=false -Dis.jeus.master=true -Dsun.net.http.errorstream.enableBuffering=true -XX:+UnlockDiagnosticVMOptions -XX:+LogVMOutput -XX:LogFile=/home/jeus/domains/jeus_domain/servers/server1/logs/jvm.log jeus.server.admin.MasterServerBootstrapper -domain jeus_domain -u administrator -verbose -server server1 . [2024.09.25 17:54:10][2] [launcher-1] [Launcher-0014] The server[server1] is being started ... [2024.09.25 17:54:10][1] [server1-1] [Config-0153] DomainConfigServiceProvider is jeus.service.descriptor.JEUSDomainDescriptorFile. [2024.09.25 17:54:10][1] [server1-1] [Config-0157] SecurityDomainsConfigServiceProvider is jeus.service.descriptor.SecurityDomainsDescriptorFile. [2024.09.25 17:54:12][2] [server1-1] [SERVER-0248] The JEUS server is STARTING. [2024.09.25 17:54:12][0] [server1-1] [SERVER-0000] Version information - JEUS 9 Fix#0 (9.0.0.0-b15). ... Omitted [2024.09.25 17:54:29][2] [launcher-13] [Launcher-0034] The server[server1] initialization completed successfully[pid : 473]. [2024.09.25 17:54:29][0] [launcher-1] [Launcher-0040] Successfully started the server[server1]. The server state is now RUNNING..
The startMasterServer script is in the 'JEUS_HOME/bin/' directory and must be set in the system path. |
3. Adding and Configuring Managed Servers (MS)
The server instances that manage the actual application service engines and services are called Managed Servers (MSs). Multiple MSs can exist in a single domain. Applications are deployed to MSs, and the MSs provide the resources and services that the applications need.
Adding Managed Servers
Add new MSs and then add listeners to the MSs.
-
After connecting to jeusadmin, run add-server to add an MS.
[MASTER]jeus_domain.server1>add-server server2 Successfully performed the ADD operation for server (server2). NOTICE : base-addr [0.0.0.0] base-port [9736] http-port [8088] Check the results using "list-servers or add-server".
The BASE listener is used to start the MSs. The BASE listener uses port 9736 by default. Because MASTER uses the same port, change the BASE listener to use another port.
-
When the server has been added, you can run server-info to check that the MS has been dynamically created.
Information about Domain (jeus_domain) ================================================================================ +--------+---------+-----+-----+-----+-----------+--------+-----------+--------+ | Server | Status |Node | PID | Clu | Latest | Need | Listen |Running | | | |Name | |ster |Start Time | to | Ports |Engines | | | | | | | / |Restart | | | | | | | | | Shutdown | | | | | | | | | | Time | | | | +--------+---------+-----+-----+-----+-----------+--------+-----------+--------+ | adminS | RUNNING | N/A | 291 | N/A |2024-09-24 | false | base-0.0. | jms, | |erver |(00:38:2 | |34 | |(Tue) PM | |0.0:9736 |web, ejb| |(*) |7) | | | |03:06:43 | | http-serv | | | | | | | |KST | |er-0.0.0.0 | | | | | | | | | |:8808 | | +--------+---------+-----+-----+-----+-----------+--------+-----------+--------+ | server2| SHUTDOWN| N/A | N/A | N/A |2024-09-24 | N/A | N/A | N/A | | | | | | |(Tue) PM | | | | | | | | | |03:06:43 | | | | | | | | | |KST | | | | +--------+---------+-----+-----+-----+-----------+--------+-----------+--------+ ================================================================================
-
You can check the listener set through the list-server-listener command.
[MASTER]jeus_domain.server1>list-server-listeners -server server2 ========================================================= +--------------------------------------+---------+------+ | listener-name | address | port | +--------------------------------------+---------+------+ | base | 0.0.0.0 | 9736 | | http-server | 0.0.0.0 | 8088 | +--------------------------------------+---------+------+ =========================================================
-
You can update listener settings using the modify-listener command.
[MASTER]jeus_domain.server1>modify-listener -server server2 -name base -port 9512 Executed successfully, but some configurations were not applied dynamically. It might be necessary to restart the server. Check the result using 'list-server-listeners -server server2 -name base. [MASTER]jeus_domain.server1>list-server-listeners -server server2 ========================================================= +--------------------------------------+---------+------+ | listener-name | address | port | +--------------------------------------+---------+------+ | base | 0.0.0.0 | 9512 | | http-server | 0.0.0.0 | 8088 | +--------------------------------------+---------+------+ =========================================================
Configuring HTTP Listeners and Connectors
Only the [Basic] section needs to be configured to start an MS. However, additional HTTP Listener property settings are required to use the Web services.
-
After connecting to jeusadmin, run add-listener to add a listener.
[MASTER]jeus_domain.server1>help add-listener NAMES add-listener Adds a new server listener with the given properties. ALIAS addlistener, createlistener USAGE add-listener -server <server-name> -name <listener-name> [-addr <address>] -port <port> [-selectors <selectors>] [-dual] [-backlog <backlog>] [-timeout <read-timeout>] [-keepaliveTimeout <keepalive-timeout>] [-rt,--reservedthreads <reserved-threads>] [-f,--forceLock] ...(Omitted) [MASTER]jeus_domain.server1>add-listener -server server2 -name testListener -port 8777 Executed successfully, but some configurations were not applied dynamically. It might be necessary to restart the server. Check the result using 'list-server-listeners -server server2 -name testListener.
The specified port must not be already in use by another listener.
-
Add a web connection using the add-http-listener command.
[MASTER]jeus_domain.server1>help add-http-listener NAMES add-http-listener Add HTTP listener. ALIAS addhttpl USAGE add-http-listener [-cluster <cluster-name> | -server <server-name>] [-f,--forceLock] -name <web-connection-name> -tmin <minimum-thread-num> [-tmax <maximum-thread-num>] [-tidle <max-idle-time>] [-qs <max-queue-size>] -slref <server-listener-ref-name> [-http2] ...(Omitted) [MASTER]jeus_domain.server1>add-http-listener -server server2 -name testHttpListener -tmin 10 -tmax 20 -slref testListener Successfully changed only the XML. Restart the server to apply the changes. For detailed web connection information, use the 'show-web-engine-configuration -cn' command.
-
Check the registered information using the show-web-engine-configuration command.
4. Adding Data Sources
JEUS can be used to configure the database connectivity by configuring data sources.
The following example uses the Apache Derby database that is included with JEUS. Apache Derby is located in the 'JEUS_HOME/derby' directory.
Execute the following command to start Derby.
JEUS_HOME\bin> startderby
Execute the following command to stop Derby.
JEUS_HOME\bin> stopderby
Derbyclient.jar, the Derby JDBC driver file, must be located in the 'JEUS_HOME/lib/datasource' directory to be able use Derby in JEUS. This file is included in JEUS by default. For detailed information about Derby, refer to http://db.apache.org/derby/. |
The following example registers a data source named 'jdbc/sample' to use a database called 'sample'.
The following shows how to add a data source using the console tool.
-
Log in to JEUS as jeusadmin.
jeusadmin –u jeus –p <password>
-
Add a data source to MASTER.
[MASTER]jeus9.server1>add-data-source -id datasource1 -en jdbc/sample -dscn org.apache.derby.jdbc.ClientConnectionPoolDataSource -dst ConnectionPoolDataSource -vendor others -sn localhost -pn 1527 -dn sample -user app -pw app -prop "ConnectionAttributes:java.lang.String=;create=true" Successfully performed the ADD operation for data source [datasource1] to domain. Check the results using "add-data-source".
-
Add the data source to an MS (server2).
[MASTER]jeus9.server1>add-data-sources-to-server -server server2 -ids datasource1 Successfully performed the ADD operation for data sources to the server [server2]. Check the results using "add-data-sources-to-server -server server2".
5. Starting and Stopping Servers
In JEUS, MS can be started with the startManagedServer script located in JEUS_HOME/bin, and can be terminated with the stopServer script.
-
Start the added MS using the startManagedServer script.
[was@localhost bin]$ startManagedServer -u administrator -p <password> -server server2 +++************************************************************** - JEUS Home : /home/jeus - Added Java Option : -Djeus.io.buffer.size-per-pool=81920 -Djeus.cdi.enabled=false -Djeus.jms.server.manager.produce-wait-strategy-type=blocking -Djeus.servlet.sortWebinfLibraries=name_asc ***************************************************************+++ =============== JEUS LICENSE INFORMATION ================ == VERSION : JEUS 9 Fix#0 (9.0.0.0-b15) == EDITION: Enterprise (Trial License) == NOTICE: This license restricts the number of allowed clients. == Max. Number of Clients: 5 ========================================================== [2023.04.25 18:00:05][2] [launcher-1] [SERVER-0201] Successfully connected to the JEUS Master Server(localhost:9736). ... Omitted [2024.09.25 18:00:10][0] [launcher-1] [Launcher-0040] Successfully started the server[server2]. The server state is now RUNNING.
-
Shut down the MS using the stopServer script.
[was@localhost bin]$ stopServer -u administrator -p <password> -server server2 Attempting to connect to 127.0.0.1:9736. The connection has been established to JEUS Master Server [server1] in the domain [jeus_domain]. Stop server message to server [server2] was successfully sent.