Administrator's Guide
CHAPTER 5
This chapter describes how to run the Novell exteNd Application Server. It contains sections on:
This section provides platform-specific information for manually starting the application server.
NOTE: You can also run the application server in the background as a service in Windows or as a daemon in UNIX. For more information, see Installing Novell exteNd.
This section contains the following topics:
To start the application server in Windows:
For more information, see Using startup options below and Specifying the JVM to use.
To start the application server on UNIX or Linux:
From the command line, change to the server's \bin directory.
Type ./SilverServer and any startup options. To print a list of available options, enter:
./SilverServer -?
For more information, see Using startup options below and Specifying the JVM to use.
To start the application server on NetWare:
From the system console, type silverserver and any startup options. To print a list of available options, enter:
silverserver -?
silverserver -help
Press Ctrl+Esc. The application server appears in the menu as exteNd Application Server.
For more information, see Using startup options below and Specifying the JVM to use.
There are two kinds of startup options you can provide on the command line:
When passing the options that were specified with the plus (+) sign to the JVM, the application server changes the plusses to minuses for processing by the JVM. For example, if you specify the following command line:
SilverServer +verbose -dbcheck
The equivalent command line is:
java -verbose ServerStartupClass -dbcheck
To see a list of possible options for the JVM, type the following commands:
Command |
Description |
---|---|
java -? |
Lists standard options. |
java -X |
Lists nonstandard options. Note that these options are subject to change without notice. |
NOTE: The application server automatically adds the following option with the appropriate value to the command line: -Djava.class.path. This option will override any corresponding option you specify on the command line.
These are the server startup options:
Server startup option |
Description |
---|---|
Supported Java options: +<x> (These options are passed to the JVM. For more information about the Java + options, see your Java documentation.) |
|
+client |
(Windows only) Application serverspecific option. Use the client HotSpot JVM.
|
+cp:a path |
Appends specified path to the class path. This option makes additional Java classes available to applications by appending the specified path to the class path. NOTE: Use the AGCLASSPATH environment variable to extend Java classes. For more information, see Setting the AGCLASSPATH variable. |
+cp:p path |
Prepends specified path to the class path. Don't use this debugging option without first contacting Novell exteNd Technical Support. Instead, use AGCLASSPATH to make additional Java classes available to applications. For more information, see Setting the AGCLASSPATH variable. |
+debug |
Application serverspecific option. You must set this option to debug server-side objects. |
+Djava.compiler=none |
Application serverspecific option. You must set this option to profile server-side applications. |
+profile |
Application serverspecific option. You must set this option to profile server-side applications. |
+server |
(Windows only) Application serverspecific option. Use the server HotSpot JVM.
|
+verbose[:class | gc | jni | vmopts] |
Run the JVM verbosely. There is an application server-specific option for +verbose: +verbose:vmopts Specifying this option tells the server to output the startup options to the console without all the other output generated in verbose mode. |
+Xms size |
Initial Java heap size within the JVM. Default value is 16 MB. NOTE: See the override information in the next row. |
+Xmx size |
Maximum Java heap size within the JVM. Default value is 256 MB. You can override +Xms and +Xmx. For example, if you are running a development server that services only one user, you might want to run the server with a lighter memory footprint using the following command line: SilverServer +Xms2m +Xmx16m This sets the initial Java heap size to 2 MB and the maximum heap size to 16 MB. |
Application server options: -<x> (These options are passed to the application server.) |
|
-? or -help |
Print usage for SilverServer.exe. |
--a |
Print the server startup properties, then exit without starting the server. This debugging option is useful if the server fails to start. You can see what the startup properties are. |
-host hostname |
The full name of the host running the server. Not required unless there are problems with hostname resolution. |
-jvmversion |
Print information about the JVM. |
-minspan number |
Use with -retry number (see below). The duration in minutes within which the retries must be made. SilverMonitor ceases to operate after the number of minutes specified by minspan, even if not all retry attempts have been made. The default value is 10.
|
-dbcheck |
Checks database integrity at server startup. |
-noexitondbcheck |
Don't exit if the database integrity check fails. Use this option to check integrity and allow access to the SMC if the database check fails. |
-nomonitor |
Run without the SilverMonitor background program. This option is useful for debugging the server when it fails to start. If the option is not used, the server will keep trying to start.
NOTE: If you start the server with -nomonitor, you will not be able to restart the server from the SMC (or using the API). You will have to shut down the server and then restart it again manually. |
-p file |
Read startup properties from a specified file. Defaults to the server's \Resources\httpd.props file. |
-retry number |
The number of times SilverMonitor should attempt to restart the server or process before ceasing to operate. The default value is 3. See -minspan number (above).
|
-trace |
Turn tracing on. Dump tracing information to the default or specified log output. |
The HotSpot JVM shipped with the application server comes (on most platforms) in two versions: a client version and a server version. This section describes how the server-side processes (the server, Cache Manager, Load Manager, and Dispatcher) and clients (such as SilverJ2EEClient and the SMC) use these JVMs.
On Windows, by default the server-side processes and clients all use the server version of the HotSpot JVM.
To override this behavior on Windows, you can use the following startup options with any of the application server's executables that start a JVM:
Executable |
JVM it uses |
---|---|
|
Server HotSpot JVM |
|
Client HotSpot JVM |
On UNIX and Linux, the JVM usage is different. These are the defaults:
To override this behavior for UNIX and Linux server-side processes, edit the server's .agprofile file. Look for the case statement and update the definition of the native search path for your platform (LD_LIBRARY_PATH, SHLIB_PATH, or LIBPATH) to point to the JVM you want.
On NetWare, by default the server-side processes and clients all use the client HotSpot JVM.
java -exit
load java.nlm
You can set the http-server.com.sssw.srv.host property in the httpd.props file (located in the server's \Resources directory) to direct the application server to start on a specific IP address or hostname. This feature is particularly helpful on machines with multiple network cards and multiple IP addresses (multihoming). This feature works identically on Windows and UNIX.
For example:
http-server.com.sssw.srv.host=192.101.1.10
Use the server Stop button on the SMC (see procedure below) to shut down the resident or selected server when you are taking the machine out of service or if you need to install a software patch.
NOTE: If you want to stop and restart the server in order to activate properties you have modified, use the Restart button, as described in Restarting the application server.
(Optional) Select Deactivate server first if you want the server deactivated before it is shut down or restarted (see table below for more information).
What happens next depends on whether or not you selected Deactivate server first:
Using the Restart button is the recommended way to stop and restart a server to update server property changes you have made using the SMC.
You can restart a server only if it was started with SilverMonitor (the default). For more information, see Using SilverMonitor.
To restart an application server:
(Optional) Select Deactivate server first if you want the server deactivated before it is restarted (see table below for more information).
What happens next depends on whether or not you selected Deactivate server first:
The application server restarts using the same startup parameters as when it was originally started and picks up any changes you have made to the server's properties.
Instead of manually starting the application server, you can run it as a service (or as a daemon in UNIX), so that it starts automatically when the server machine reboots. For information on installing the server to run as a service, see Installing Novell exteNd.
In addition to running the server as a service, you can also run the following server-side processes as services:
To help you manage processes running as Windows services, the server provides SilverServiceUtil, a Windows utility that allows you to:
Create, list, delete, and stop application server and nonapplication server services
Define additional Windows services for application server processes
Create new console log files each time an application server service is restarted
Define command-line arguments that will be automatically passed to an application server process when it starts as a Windows service
Reconfigure an existing application server process when it is running as a service
NOTE: To initially get the server set up to run as a service, you should use the installation program, as described in Installing Novell exteNd. After you have the server running as a service, you can use SilverServiceUtil to maintain your service environment, including creating additional services on the same machine.
SilverServiceUtil is a command-line utility in the server's \bin directory.
The utility has the following actions:
These actions are described next. For complete information about using each of the SilverServiceUtil actions, enter the following:
SilverServiceUtil -action -help
To make a service dependent on another service:
where:
Option |
Description |
---|---|
serviceName |
The name of the service that is dependent on prereqServiceName |
prereqServiceName |
The name of the service that serviceName is dependent on |
When this dependency has been defined, the Windows service manager will not start serviceName until prereqServiceName has been started.
You can use SilverServiceUtil to create an application server service or a nonapplication server service.
Creating an application server service You can use SilverServiceUtil to configure all installed application servers to run as a service.
To create an application server service:
SilverServiceUtil -create -service serviceName -display displayName
-program pathToExecutable
[-outputDir outputDirectory -maxOutputFiles numFiles -startupOptions options]
where:
Creating a generic service You can also use this option to create a generic Windows service.
SilverServiceUtil -create -service serviceName -display displayName -program pathToExecutable -generic
You can list all services defined on the current machine as well as delete any existing service.
If you specify -d, the display name will be listed along with the service name.
Specify the service name, not the display name. (You are not asked to confirm the deletion.)
SilverServiceUtil -stop -service serviceName [-retries numRetries -delay retryDelay]
where:
To reconfigure an existing application server service:
SilverServiceUtil -update -service serviceName [-outputDir outputDirectory -maxOutputFiles numFiles -startupOptions options]
where the -outputDir, -maxOutputFiles, and -startupOptions arguments are the same as used in the create action.
The update action modifies the Windows registry entry for the corresponding service. The changes won't take effect until the service is restarted. You can start and stop services through the Windows Services control panel (without rebooting the machine).
To restrict access to specific types of application server operations, you can define the following ports:
Each port type excludes URLs and operations that are not associated with it. For example, the administration port only passes administration URLs. The separate ports are designed to work in conjunction with your server permission settings. For example, if your administration and runtime ports are unique, any attempt to run an administration URL on the runtime port will fail. Once a user successfully accesses an administration port, the server checks the user's group permissions to further determine the level of access.
How you configure a public site would probably be different from the way you would configure an e-commerce site that uses credit card transactions. Particularly in an extranet environment, you don't want users attempting to perform administration operations that alter your application data. Configuring multiple server ports in conjunction with your corporate firewall lets you manage internal and external access to your applications.
There are several security advantages to defining separate application server ports for different types of users and operations:
Opening a single runtime port through your firewall for users outside your organization limits your security risk.
Separating administration and runtime port access helps prevent unauthorized users from attempting to administer the server. Users connecting to your applications may know the runtime port number, but only administrators need be aware of the administration port.
Defining an administration port that can only be accessed from inside the firewall helps restrict calls made to that port.
The server supports administrative and runtime ports for each of these protocols:
Protocol |
Default port |
---|---|
HTTP |
83 on NetWare |
8080 on UNIX |
|
80 on Windows |
|
HTTPS (RSA) |
443 |
HTTPS (DSA) |
443 |
By default, only the HTTP port is enabled. The DSA and RSA ports are set to the default values, but not enabled. The server is not listening on the DSA and RSA ports until you enable them.
When the application server starts, it binds a socket to each unique port value you have configured and enabled. The application server does not require unique port values for the different types of access; ports having the same value will share the same socket and allow multiple operations. For example, if you set your HTTP runtime and administration ports to 8080, the application server will use only one socket to accept requests for both.
TIP: When you install the application server, the HTTP runtime and administrative ports are configured to whatever port number you specify as the default. You will need to update your program shortcut used to launch the SMC if you configure a separate administration port after you install the application server.
For alternative ways to start the SMC, see Running the SMC.
Clients connecting to an administration port can perform only operations associated with that port. Because many objects involved with administration require runtime support, runtime operations can be performed on any port. However, runtime ports only allow runtime operations.
For how to enable HTTP ports, see Specifying general server properties. For more information about enabling HTTPS ports, see Enabling RSA/DSA ports.
The application server can be set to a maximum of six unique port numbers for HTTP/HTTPS communications. The type of operations a port allows and its associated security protocols can be configured independentlythat is, you can mix any of the three security protocols with any of the three port types:
All port property names (as defined in the https.props file) begin with http-server. For more information, see The httpd.props File.
General server properties include:
To specify general server properties:
Edit any of these fields as needed:
Field(s) |
What to specify |
---|---|
Enable HTTP runtime port and Port number Enable HTTP Admin port and Port number |
To enable HTTP listener ports, select any or all of the HTTP port options and then specify a corresponding port number. By default for all HTTP port types, the application server listens on port: The default port for HTTPS (RSA) and HTTPS (DSA) is 443.
|
Username for server (UNIX only) |
To specify the user under whose account the server is started on UNIX. The default is root. |
SilverMaster database name |
To change the SilverMaster database the server uses. For example, you might need to change the name of the SilverMaster database if you are setting up a load balancing cluster. All servers in a cluster must use the same SilverMaster database. You'd use this field to specify the SilverMaster database name. |
To activate the changes, click Restart.
For more information, see Restarting the application server.
The application server provides logging for things like server debugging, server monitoring, and security auditing. You can log the information to a file or a database, or you can specify your own custom class to perform the logging.
Select the logging option(s) you want to turn on or off as follows:
Field |
Description |
Usage |
---|---|---|
Database logging |
Logs messages to SilverMaster. Messages are stored in the AgLog, AgErrorLog, and AgTraceLog system tables. |
This is the default setting. |
File logging |
Logs messages to files that you specify. |
Specify the file name for each option you activate in the text field next to the option (which is enabled if either File logging or User Defined is selected). |
User Defined |
Uses a custom Java class to do the logging. |
By default, the application server uses its own internal class to do the logging. If you want to customize the log outputfor example, to specify an extended log file formatyou can write your own logging class and then specify it here.
|
Enable HTTP logging |
Writes a line in the AgLog table (or file you specify) for every client request to the server and every server response. |
Run in conjunction with error logging. Use standard HTTP logging when you want to see client requests to the server and also when you want to monitor server activity. Use in conjunction with the Statistics/Summary/Request time option in the SMC (see Summary statistics).
|
Enable Error logging |
Records errors and miscellaneous status information in the AgErrorLog table (or the file you specify). If you enable this type of logging, you get more detailed information about server errors and status. |
Turn this option on. |
Enable Trace logging |
Records server actions. Unlike HTTP logging and error logging, trace logging concentrates on tracking server events as well as error messages. When enabled, the AgTraceLog table (or the file you specify) contains additional tracing information that Technical Support uses to track down server issues. |
Turn this option on only if Technical Support requests it. |
The application server starts logging the specified information.
When you enable HTTP logging, by default the server logs HTTP messages in the standard W3C common log file format (see www.w3.org) to the database. You can redirect the log to a file as described above.
There is also a compound log file format, which is like the common log file format except that it also logs the Referrer (which allows click tracing) and User-Agent (which logs the browser type) fields from each HTTP request. The application server provides built-in support for the compound log file format.
In the Java class field, specify the following:
com.sssw.srv.http.CompoundLogger
Specify the file to log the HTTP requests to (and optionally, files for error and trace logging, also supported by the CompoundLogger class).
TIP: Instead of using the SMC, you can also specify compound logging by setting these values in httpd.props and restarting the server:
http-server.com.sssw.srv.logger=com.sssw.srv.http.CompoundLogger
http-server.com.sssw.srv.logger.logname=fileName
If you are using the built-in logging class, you can view the log in the SMC (see Displaying logs). You can also use the SilverCmd PrintLog to view the log in the SilverCmd console window or a file. PrintLog allows you to view the data regardless of whether you are using the built-in logging class or the database.
Log information can expand quickly. Clean out your log tables and log files to keep them manageable. You can use SilverCmd ClearLog to delete records. Use your native database utilities to maintain these tables, or use any editor to shorten or delete extraneous information from log files.
You can use the SMC to specify whether to use RMIand if so its name services port, whether to use SSL for the remote objects, and the ports to use for IIOP SSL.
To activate the changes, click Restart. For more information, see Restarting the application server.
You can run more than one application server on a host at one IP address. (The application server also supports multihoming, where you have multiple IP addresses through multiple network cards on one host. See Starting the server on a specific IP address or hostname).
Specifying unique ports Multiple servers running on one host must be configured to use unique ports. You can specify runtime and administration ports in the SMC:
Ports |
Default |
Information on setting |
---|---|---|
HTTP |
80 |
|
RSA |
443 |
|
DSA |
||
RMI name services |
54890 |
|
SSL IIOP port |
1 |
The application server uses the following server property when URL-encoding and -decoding form content:
com.sssw.srv.international.UrlEncoding
The encoding property is stored in the AgUserIni.props configuration file, which is located in the server's \Resources directory.
By default, the application server uses utf-8 (Universal Character Set Transfer Format) for URL encoding and decoding. Because utf-8 can encode ASCII characters without requiring modification, utf-8 works well for English and most other Western languages. Because languages using multibyte encodings are not a subset of utf-8, character encoding and decoding will not work properly with them.
You typically need to change the encoding scheme only when the majority of client browsers in your environment use character encodings that are not ISO 8859-1 (Latin 1). For example, a Japanese Web site that serves content to its employees using the ShiftJIS encoding may want to change the encoding property to SJIS.
To change from the default utf-8 to another encoding:
Add the following line to the AgUserIni.props file (located in the \Resources directory below the application server's root directory):
com.sssw.srv.international.UrlEncoding=NewEncoding
Enter the language mapping needed at your site in place of the NewEncoding variable. If you are unsure about the Java string mapping for your language, check the Sun Web site.
Restart the application server.
URL content will be encoded using the new encoding scheme after you restart the server.
The application server includes the Novell exteNd JMS server for its JMS (Java Message Service) implementation. That means the exteNd JMS server provides the JMS server that runs with the application server to support messaging in your J2EE applications.
This section describes some things you need to know about using the Novell exteNd JMS server with the application server:
To learn more about the JMS server, see the Novell exteNd Messaging Platform help.
You can start the JMS server in either of two ways:
Method |
How it works |
---|---|
Automatic |
When the application server starts, it can check for the JMS server and automatically start it if necessary. To use this approach, you need to make sure the application server's httpd.props file specifies this property setting: http-server.com.sssw.srv.jmsServerLaunch=true When you install the application server, the installation program asks if you want to configure JMS server and then sets this property according to your response. If you later change your mind, you can edit the httpd.props file yourself to specify By default, the installation program sets the jmsServerLaunch property to In the automatic approach, the application server launches the JMS server as a child process. As a result, the JMS server will terminate when the application server terminates. |
Manual |
You can start the JMS server yourself, as described in the Novell exteNd Messaging Platform help. If you start the JMS server manually before starting the application server, the application server won't try to start the JMS server (regardless of the jmsServerLaunch property setting). |
You can increase the reliability of JMS servers in your environment through the use of clusters. Here are some common configurations:
Configuration |
What you do |
---|---|
Clustered application servers with individual JMS servers |
Set up a cluster of application servers following the instructions in Administering a Cluster. By default, each application server in the cluster has its own local JMS server. |
Clustered application servers accessing clustered JMS servers |
|
You can troubleshoot JMS serverrelated problems at runtime by displaying debug messages to the application server console. To turn on basic JMS server debugging, edit the application server's httpd.props file to specify this property setting:
http-server.com.sssw.srv.jms.debug=1
For more detailed JMS server debugging, specify a number greater than 1 for this property. To disable JMS server debugging, specify 0 (the default).
Copyright © 2003 Novell, Inc. All rights reserved. Copyright © 1997, 1998, 1999, 2000, 2001, 2002, 2003 SilverStream Software, LLC. All rights reserved. more ...