You are on page 1of 18

SDN Contribution

SAP NetWeaver J2EE Preview: Basic Administration


Tasks

Applies to:
SAP NetWeaver J2EE Preview

Summary
Find out how to use the administration tools available in the SAP NetWeaver J2EE Preview for basic
administration of the application server.

Author(s): SAP NetWeaver Product Management

Company: SAP AG

Created on: April 2006

2006 SAP AG 1
Basic Administration Tasks.............................................................................................................. 4

Starting and Stopping the J2EE Engine .......................................................................................... 4

Use ............................................................................................................................................... 4

Procedure..................................................................................................................................... 4

Result ........................................................................................................................................... 5

Adding Server Processes to the Java Instance............................................................................... 5

Use ............................................................................................................................................... 5

Procedure..................................................................................................................................... 6

Configuring the Java VM Parameters.............................................................................................. 6

Use ............................................................................................................................................... 6

Procedure..................................................................................................................................... 6

Changing the JVM To Be Used................................................................................................ 6

Configuring the JVM Settings................................................................................................... 6

Viewing and Configuring the Communication Ports ........................................................................ 7

Use ............................................................................................................................................... 7

Procedure..................................................................................................................................... 8

Viewing the Communication Ports ........................................................................................... 8

Changing the Communication Ports ............................................................................................ 8

Monitoring the J2EE Engine Using the MMC .................................................................................. 9

Use ............................................................................................................................................... 9

Procedure..................................................................................................................................... 9

Request/Response Monitoring ................................................................................................. 9

System Monitoring.................................................................................................................. 10

Monitoring the Log Files ................................................................................................................ 10

Use ............................................................................................................................................. 10

Types of Log and Trace Files................................................................................................. 10

Procedure................................................................................................................................... 10

Monitoring from the MMC ....................................................................................................... 10

Remote Administration Using Telnet ............................................................................................. 12

Use ............................................................................................................................................. 12

2006 SAP AG 2
Procedure................................................................................................................................... 12

Connecting Using Telnet ........................................................................................................ 12

Using the J2EE Engine Shell Commands .............................................................................. 13

Closing a Telnet Session........................................................................................................ 13

Launching Deployed Applications from the MMC ......................................................................... 13

Use ............................................................................................................................................. 13

Procedure................................................................................................................................... 13

Terminology ................................................................................................................................... 14

Appendix 1: Overview, Layout, and Context Menus of the SAP MMC ......................................... 15

Overview .................................................................................................................................... 15

Layout of the SAP MMC............................................................................................................. 15

Context Menus of the SAP MMC ............................................................................................... 17

Copyright........................................................................................................................................ 18

2006 SAP AG 3
Basic Administration Tasks
The following is a list of some of the basic administration, configuration, and monitoring tasks that you
might need to perform after installation or during the operation of the system:
Starting and Stopping the J2EE Engine
Adding Server Processes to the Java Instance
Configuring the Java VM Parameters
Viewing and Configuring the Communication Ports
Monitoring the J2EE Engine Using the MMC
Monitoring the Log Files
Remote Administration Using Telnet
Launching Deployed Applications from the MMC

Starting and Stopping the J2EE Engine


Use
To start and stop the J2EE Engine, you can use either of the following:

SAP MMC
Windows Start menu - dedicated options

Procedure
1. Start the SAP MMC by choosing Start -> Programs -> SAP -> Start SAP Management Console.
The following screen appears:

2. Open the tree structure in the left-hand pane and browse to the instance node that you want to start.

2006 SAP AG 4
3. Select the instance and choose Start or Stop from the context menu. (The system may prompt for
the OS user and password to complete the operation.)

Result
The MMC will start the database instance, the central services instance, and the Java instance.
If you want to start or stop individual instances, proceed as follows:

To start or stop the central services or the Java instance, select the relevant node and choose All
Tasks -> Start/Stop from the context menu.
To start or stop the database instance, select the database instance and use the Online and Offline
options in the Web view that is displayed in the right-hand screen in the MMC.

Alternatively, you can start and stop the J2EE Engine, using the Windows Start menu by choosing SAP
NetWeaver JEE 5 Preview Beta Application Server -> Engine <instance name> -> Start Engine or Stop
Engine. This will start/stop all processes.

Adding Server Processes to the Java Instance


Use
You can scale the Java instance by adding more server processes to it. The system is thus able to serve
more client requests simultaneously provided there are spare system resources for this.

When adding server processes to the Java instance, you should take your system resources into
account (in particular, your CPU and memory resources).

2006 SAP AG 5
Procedure
1. Start the Config Tool by choosing Start -> Programs -> SAP NetWeaver JEE 5 Preview Beta
Application Server -> Engine <instance name> -> Start Configuration Tool.
2. From the tree structure in the left-hand pane, select the Java instance.
3. In the right-hand pane, choose the Servers tab.
4. In the field Custom number of server nodes, enter the number of server processes that you want to
have in the Java instance.

5. Choose Set.
6. Choose Apply changes ( ).
7. Restart the Java instance.

Configuring the Java VM Parameters


Use
Use this procedure to change the type of VM to be used, to view and reconfigure the JVM memory settings
(such as, HeapSize and PermSize), and so on.

Procedure

Changing the JVM To Be Used


1. Open the Java instance profile located in the <Drive>:\SAP\<instance name>\SYS\profile directory,
with a text editor. The Java instance profile is named as follows: <SID>_<instance name>_<host>
(for example, J1S_JC00_j1s-2).
2. Change the value of the jstartup/vm/home property as explained in the comments in the instance
profile.
3. Save your changes and restart the Java instance.
4. If necessary, follow the steps below to change the JVM settings.

Configuring the JVM Settings


1. Start the Config Tool by choosing Start -> Programs -> SAP NetWeaver JEE 5 Preview Beta
Application Server -> Engine <instance name> -> Start Configuration Tool.
2. From the tree structure in the left-hand pane, select the Java instance.
3. In the right-hand pane, choose the VM Parameters tab.
4. Switch between the Memory, System, and Additional tabs to edit the relevant properties:
o Memory - JVM memory settings for the major memory areas.

2006 SAP AG 6
o System - All system parameters usually specified with -Dxx=yy (for example, -
DmyKey=myValue).
o Additional - Any additional parameters, supported by the VM (for example, -verbose:gc).
5. Edit the property values as follows (by default, all properties are enabled and have fixed values):
o If you want to disable a property, select it and choose Set.
The property is added to Custom parameters. Choose Disable.
o To edit the value of a property, select it, enter the required value in the Custom value field,
and choose Set.
The property is added to the Custom parameters list with its new value.

You cannot change the template values of the parameters, you can only view them.

6. Choose Apply changes ( ).


7. Restart the J2EE Engine.

Viewing and Configuring the Communication Ports


Use
The installed J2EE Engine has a preconfigured set of communication ports that are used both for internal
and external communication. If some of these ports are already in use by other processes running on your
machine, you may need to change the J2EE Engine ports.

2006 SAP AG 7
Procedure

Viewing the Communication Ports


In the SAP MMC, browse the tree structure in the left-hand pane to locate the Access Points node. The
result in the right-hand pane differs according to the type of the chosen instance. For each port, you can
view the process that uses that port, the communication protocol, the host to which it is bound, and
whether the port is currently open.

When you run the examples from the tutorials, you need to specify the ICM HTTP port in the URL
of the applications. You can view this port in the Access Points section of the Java instance:

Changing the Communication Ports

We recommend that you do not change any of the default communication ports unless there are
other processes on your machine that use the same communication ports.
To change the Java instance ports, proceed as follows:
1. Open the Java instance profile, located in the directory <Drive>:\SAP\<instance name>\SYS\profile,
with a text editor. The Java instance profile is named as follows: <SID>_<instance name>_<host>
(for example, J1S_JC00_j1s-2).
2. You can edit the values of the following ports:

2006 SAP AG 8
o HTTP port - the HTTP port open on the ICM. To edit it, change the following section in the
profile:
# http port configuration
icm/server_port_0 = PROT=HTTP, PORT=5$(SAPSYSTEM)00, TIMEOUT=600
For example, changing the above configuration to
icm/server_port_0 = PROT=HTTP, PORT=60000, TIMEOUT=600
changes the HTTP port to 60000.

o P4 port - the port open on the ICM for establishing connections via the P4 protocol. To edit it,
change the following section in the profile:
# p4 port configuration
icm/server_port_1 = PROT=P4, PORT=5$(SAPSYSTEM)04
For example, changing the above configuration to
icm/server_port_1 = PROT=P4, PORT=60004
changes the P4 port to 60004.

o IIOP port - the port open on the ICM for establishing connections via the IIOP protocol. To
edit it, change the following section in the profile:
# IIOP port configuration
icm/server_port_2 = PROT=IIOP, PORT=5$(SAPSYSTEM)07
For example, changing the above configuration to
icm/server_port_2 = PROT=IIOP, PORT=60007
changes the IIOP port to 60007.

o Telnet port - the port open on the ICM for establishing connections via the Telnet protocol.
To edit it, change the following section in the profile:
# TELNET port configuration
icm/server_port_3 = PROT=TELNET, PORT=5$(SAPSYSTEM)08
For example, changing the above configuration to
icm/server_port_3 = PROT=TELNET, PORT=60008
changes the Telnet port to 60008.

3. Save your changes and restart the Java instance.

Monitoring the J2EE Engine Using the MMC


Use
With the monitoring options provided by the MMC, several main monitoring scenarios are available.

Procedure

Request/Response Monitoring
You can use this scenario to monitor the requests executed by your applications and to check the status of
the J2EE Engine application threads that are processing these particular requests.
1. Locate your application by selecting the J2EE Aliases node from the the tree structure in the left-
hand pane. The result pane on the right-hand side displays the started applications, their aliases,
and other details.
Launch the application, if necessary. (see Launching Deployed Applications from the MMC)
2. To monitor the Web, EJB, and remote-object requests to your application via HTTP and RMI, select
the node J2EE Web Sessions, J2EE EJB Sessions, or J2EE Remote Objects respectively. The
right-hand pane displays details about the incoming requests.
3. To monitor the threads that process these requests, select the J2EE Threads node and locate the
threads that serve the incoming requests. (If necessary, use the column filter options.) Details about

2006 SAP AG 9
the threads - such as the task executed by the thread, start time, the user triggering the request,
status, and so on - are displayed in the right-hand pane.

System Monitoring
Use this scenario to monitor system performance and operation.
1. To monitor the status of the Java processes, use the J2EE Process Table node.
2. To view the overall cache and thread system information, use the nodes J2EE Caches and J2EE
Threads.
3. To view the overall VM performance, use the nodes J2EE GC History and J2EE Heap Memory.
See also:
Appendix 1: Overview, Layout, and Context Menus of the SAP MMC

Monitoring the Log Files


Use
The trace and log messages contain important information about the system operation. In case of errors or
undesired behavior, it is helpful to check and analyze them.

Types of Log and Trace Files

Process startup and control framework logs - Contain information about the startup process. You can
check these files in case of errors or undesired behavior during the startup process. By default, the
data from the last three restarts is kept.
o The developer trace files of the Java instance are located in the directory
<drive>:\\sap\<SID>\<instance name>\work, where <SID> is the system ID (for example,
J1S) and <instance name> is the instance name of the Java instance (for example, JC00).
o The developer trace files of the central services instance are located in the directories
<drive>:\\sap\<SID>\<instance name>\work and <drive>:\\sap\<SID>\<instance name>\log,
where <SID> is the system ID (for example, J1S) and <instance name> is the instance name
of the central services instance (for example, SCS01).
Java server logs - The log and trace files generated by the Java server process(es) and the
applications running on top of the J2EE Engine are stored in the <drive>:\\sap\<SID>\<instance
name>\j2ee\cluster\server<n>\log directory.

Procedure

Monitoring from the MMC


From the MMC, you can view developer trace files, create stack traces for the processes, and so on.

To view the developer trace file of a process, select the relevant process and choose Developer
Trace from the context menu. If the information in the developer trace is insufficient or too detailed,
you can use the context menu options All Tasks -> Decrease/Increase trace level to adjust the

2006 SAP AG 10
launcher trace level to the desired level.

To dump the server processes Java stack trace, select the relevant server process and choose
Dump Stack Trace from the context menu.
To view the dump stack trace, choose Developer Trace (see above).
The resulting Java server stack trace is stored in the directory dev_server<n> file in the
<drive>:\sap\<SID>\<instance name>\work.

For more information about the available context menu options, see Appendix 1: Overview, Layout, and
Context Menus of the SAP MMC.

2006 SAP AG 11
Remote Administration Using Telnet
Use
By using a Telnet client via the Telnet protocol, you can connect to the J2EE Engine remotely and
administer it using a predefined set of shell commands.

Procedure

Connecting Using Telnet


1. Check the Telnet port on which you can connect to the J2EE Engine (see Viewing and Configuring
the Communication Ports).
2. Run a Telnet client and connect to the target system by specifying the host and the Telnet port. Once
a connection is established, the J2EE Engine Telnet Administration Console is opened.

Alternatively, you can open a Telnet client from the SAP MMC:
1. Select the J2EE system on which you want to start Telnet.
2. Browse to the J2EE Process Table node.
3. In the right-hand pane, select the ICM and choose J2EE Telnet from the context menu.

The J2EE Engine Telnet Administration Console is opened.


3. Enter valid login info (user name and password) to authenticate yourself.
If the input information is incorrect, the link is disconnected and the console disappears. You must
then complete the above steps again to open a new Telnet console.
If your connection is successful, the console remains open, you are logged on to one of the server

2006 SAP AG 12
processes in the instance, and you can start your administration.

4. Use the LSC command to display all server processes with their ID, name, host, port, state, and so
on. The first component displayed is the one you are currently administering.

Using the J2EE Engine Shell Commands


The J2EE Engine has a predefined set of shell commands grouped according to the functions they provide.
To use the shell commands from a group, you first have to activate that group by adding it to the shell
environment. By default, only the ADMIN, SYSTEM, DEPLOY, and TELNET groups are activated due to
their vital importance.
1. To view the names of all available groups of shell commands (both added and not added to the shell
environment), execute the ADD command.
2. To add a group of shell commands to the shell environment, enter ADD [groupName] in the
command line. The groupName parameter is the name of the group of shell commands to be added.
3. To view all groups added to the shell environment and their shell commands, execute the MAN
command.
4. To view the help messages for a shell command, execute MAN and the command name in the
command line. For example MAN ADD displays the help message of the ADD command.

Closing a Telnet Session


Execute the EXIT command in the command line.

Launching Deployed Applications from the MMC


Use
Using the MMC you can view the defined aliases for the started applications and launch these applications
in a Web browser.

Procedure
In the SAP MMC, browse the tree structure in the left-hand pane to locate the J2EE Aliases node. The
result pane on the right-hand side displays the deployed applications, their aliases, and further details:

2006 SAP AG 13
To launch the application from the MMC, either double-click the alias or select it and from the context menu
choose Launch Application. The application is launched in a new Web browser.

Terminology
central services instance - Contains the message and enqueue servers that perform central functions in the
SAP system.
database instance - Separate unit consisting of the database.
enqueue server - Server that administers the lock table in a distributed SAP system.
The enqueue server runs on the central services instance. When an application requests a lock, the lock
request is sent to the enqueue work process, which then looks in the lock table to determine whether this
request conflicts with a lock that has already been set. If so, the request is denied, otherwise the lock is set.
instance - Administrative unit that groups components of an SAP system, which provide one or more
services.
All components belonging to an instance are provided with parameters using a common instance profile.
An instance runs on a physical host. However, there can be multiple instances on a host.
An instance is identified by means of the system ID (SID) and the instance number.
instance name - Consists of a prefix (JC for the Java instance or SCS for the central services instance) and
a two-digit instance number.
Internet Communication Manager (ICM) - Dispatches client requests to the server processes.
Java instance - Consists of the ICM and one or more server processes.
message server - Server that manages the communication in the J2EE Engine. Each system contains only
one message server. The message server carries out the following tasks: it decides which server a user
logs on to and handles communication between the server processes - for example, transport of update
requests and lock requests.
P4 - Extended protocol for RMI communication.
profile/instance profile - Profile that contains application-server-specific configuration parameters to
complete the set values of the default profile.
server process - J2EE Engine component that executes the application requests. Each server process is
multi-threaded, and can therefore process a large number of requests simultaneously. The ICM dispatches
the requests to the server processes.

2006 SAP AG 14
Appendix 1: Overview, Layout, and Context Menus of the SAP MMC
Overview
The SAP Microsoft Management Console (MMC) provides a common framework for centralized system
management. It allows you to monitor and perform basic administration tasks on the SAP system centrally,
thus simplifying system administration.
Using the SAP MMC you can:

Monitor and control (start, stop, or restart) the SAP system and its instances with a single tool.
Display SAP trace files, start profiles, instance parameters, the system environment, SAP
environment, ICM queue statistics, and so on.
Display and control Java processes.
Save the current console configuration in a file to reuse it later or to forward it to other users.
Start third-party tools (such as Telnet), if available, to manage an application server.

Layout of the SAP MMC


The MMC presents information on two panes of a window. The pane on the left is the scope pane, which
displays available information in a tree structure that can be expanded and collapsed. The pane on the
right is the result pane, which shows detailed information about any item selected in the scope pane.

The system icons and the nodes for instances, processes, and alerts are displayed in different colors,
depending on their state. The colors mean the following:

2006 SAP AG 15
Gray: Unknown state, only outdated values, system is offline
Green: Running
Yellow: Starting or critical
Red: Error

To access detailed information about your SAP system, you have to fully expand the Java or central
services instance and then select an item. Once an item has been selected, the corresponding information
is displayed in the result pane. The following table summarizes the available options:

Tree Node Description

Node for an SAP system. The colors indicate states that


SAP system ( ) - are derived from the SAP instance subnodes and are
for example, JP1 automatically refreshed.

Database ( ) Node for the database of the SAP system.

SAP Instance Node for the SAP instance. The color indicates the state
that is automatically refreshed and inherited from the
( or ) Process List subnode.

Displays the processes started by the start service and


Process List their status. The color is automatically refreshed and
reflects the worst state of all started processes.

Displays the system log, even if the SAP system is not


Syslog functioning properly or is offline. You have to refresh the
information manually.

Displays the status of the ICM queues. You have to


Queue Statistic
refresh the information manually.

Displays the communication ports used by the system.


Access Points
See Viewing and Configuring the Communication Ports.

Displays information about the J2EE Engine processes.


The J2EE Engine has to be started, but does not have to
J2EE Process Table be functioning properly as shared memory of the J2EE
Engine is accessed. You have to refresh the information
manually.

Displays monitoring information about the performance


J2EE Caches
and contents of the caches in the Java instance.

Displays details and statistics for the threads managed by


J2EE Threads
the J2EE Engine.

Displays details and statistics for the J2EE Engine Web


J2EE Web Sessions
sessions.

Displays details and statistics for the J2EE Engine EJB


J2EE EJB Sessions
sessions.

Displays statistics for the remote objects to which external


J2EE Remote Objects
users are connected at the time of monitoring.

2006 SAP AG 16
Displays a list of the aliases of the currently started
J2EE Aliases applications. See Launching Deployed Applications from
the MMC.

Displays statistics and details for the last few garbage


J2EE GC History
collection events.

Displays details about the current size of the J2EE Engine


J2EE Heap Memory
heap memory.

ICM Provides Web access to the ICM administration.

With the context menu option View, you can display the information you require in different ways. For lists
that normally have many rows, there is an additional filter function in the table header ( ). If you enter
data in the filter fields, only matching table rows are displayed. You can use wildcards * and ? in the filter
setting.
You can update the information displayed at any time by choosing Refresh ( ) from the context menu.

Context Menus of the SAP MMC


The context menus differ depending on the item that is selected in the scope pane. To access the context
menu of an item, select that item and click the right mouse button. Some of the main context menu options
are:

Start - Starts the instance(s) related to the selected items.


Stop - Stops the instance(s) related to the selected items.
Shutdown - Sends shutdown request to the instance(s) related to the selected item. The instances
will reject new requests and stop when all open requests are finished.
Restart - Restarts the selected instance.
All Tasks -> View Developer Traces - Displays a list of the developer trace files, provided the user
has sufficient authorization.
J2EE Telnet - Opens a Telnet session to the J2EE Engine. See Remote Administration Using
Telnet.
Properties - Displays technical data about the selected item and allows you to change the start/stop
permissions for the selected instance.
Enable/Disable/Restart Process - Enables/disables/restarts a J2EE Engine Process.
Dump Stack Trace - Dumps Java stack trace for the selected server process. See Monitoring the
Log Files.
All Tasks -> Enable/Disable Debugging - Enables/disables Java VM debugging for the server
processes.
Developer Trace - Displays the developer trace file of the selected process.
All Tasks -> Decrease/Increase trace level - Decreases/increases the launcher trace level of the
selected process.

2006 SAP AG 17
Copyright
Copyright 2006 SAP AG. All rights reserved.

No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG.
The information contained herein may be changed without prior notice.

Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors.

Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation.

IBM, DB2, DB2 Universal Database, OS/2, Parallel Sysplex, MVS/ESA, AIX, S/390, AS/400, OS/390, OS/400, iSeries, pSeries, xSeries,
zSeries, z/OS, AFP, Intelligent Miner, WebSphere, Netfinity, Tivoli, Informix, i5/OS, POWER, POWER5, OpenPower and PowerPC are
trademarks or registered trademarks of IBM Corporation.

Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either trademarks or registered trademarks of Adobe Systems
Incorporated in the United States and/or other countries.

Oracle is a registered trademark of Oracle Corporation.

UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group.

Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of
Citrix Systems, Inc.

HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C, World Wide Web Consortium, Massachusetts
Institute of Technology.

Java is a registered trademark of Sun Microsystems, Inc.

JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by
Netscape.

MaxDB is a trademark of MySQL AB, Sweden.

SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their
respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All
other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves
informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP
Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or
omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the
express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an
additional warranty.

These materials are provided as is without a warranty of any kind, either express or implied, including but not limited to, the implied
warranties of merchantability, fitness for a particular purpose, or non-infringement.

SAP shall not be liable for damages of any kind including without limitation direct, special, indirect, or consequential damages that may
result from the use of these materials.

SAP does not warrant the accuracy or completeness of the information, text, graphics, links or other items contained within these
materials. SAP has no control over the information that you may access through the use of hot links contained in these materials and
does not endorse your use of third party web pages nor provide any warranty whatsoever relating to third party web pages.

Any software coding and/or code lines/strings (Code) included in this documentation are only examples and are not intended to be
used in a productive system environment. The Code is only intended better explain and visualize the syntax and phrasing rules of
certain coding. SAP does not warrant the correctness and completeness of the Code given herein, and SAP shall not be liable for errors
or damages caused by the usage of the Code, except if such damages were caused by SAP intentionally or grossly negligent.

2006 SAP AG 18