Skip Navigation Links | |
Exit Print View | |
Oracle GlassFish Server 3.1-3.1.1 High Availability Administration Guide |
1. High Availability in GlassFish Server
2. Setting Up SSH for Centralized Administration
3. Administering GlassFish Server Nodes
4. Administering GlassFish Server Clusters
5. Administering GlassFish Server Instances
6. Administering Named Configurations
7. Configuring Web Servers for HTTP Load Balancing
8. Configuring HTTP Load Balancing
How the HTTP Load Balancer Works
Installing the Loadbalancer Plug-In
Features of the GlassFish Loadbalancer Plug-In
Setting Up HTTP Load Balancing
Prerequisites for Setting Up HTTP Load Balancing
Procedure for Setting Up HTTP Load Balancing
To Set Up Load Balancing Using the asadmin Tool
HTTP Load Balancer Deployments
Using Clustered Server Instances
Using Multiple Standalone Instances
Configuring the HTTP Load Balancer
Configuring an HTTP Load Balancer on the DAS
Creating an HTTP Load Balancer Reference
Enabling Server Instances for HTTP Load Balancing
Enabling Applications for HTTP Load Balancing
Creating the HTTP Health Checker
Additional Health Check Properties for Healthy Instances
Changing the HTTP Load Balancer Configuration
Exporting the HTTP Load Balancer Configuration File
Enabling Dynamic Reconfiguration
Disabling (Quiescing) a Server Instance or Cluster
To Quiesce a Server Instance or Cluster
Disabling (Quiescing) an Application
Configuring HTTP and HTTPS Failover
Using Redirects with the HTTP Load Balancer
The auth-pass-through-enabled Attribute
Monitoring the GlassFish Loadbalancer Plug-In
Load Balancer Configurator Log Messages
Request Dispatch and Runtime Log Messages
Enabling HTTP Load Balancer Logging
9. Upgrading Applications Without Loss of Availability
10. Configuring High Availability Session Persistence and Failover
11. Configuring Java Message Service High Availability
The Loadbalancer Plug-In uses the web server’s logging mechanism to write log messages. The default log level is set to the default logging level on Sun Java System Web Server (INFO), Apache Web Server (WARN) and Microsoft IIS (INFO). The log levels, FINE, FINER, and FINEST, map to the DEBUG level on the web server.
These log messages are written to the web server log files, and are in the form of raw data that can be parsed using scripts, or imported into spreadsheets to calculate required metrics.
The Loadbalancer Plug-In generates the following types of log messages:
These messages will be logged when you are using idempotent URLs and error page settings.
An output for idempotent URL pattern configuration contains the following information:
When the log level is set to FINE:
CONFxxxx: IdempotentUrlPattern configured <url-pattern> <no-of-retries> for web-module : <web-module>
When the log level is set to SEVERE:
CONFxxxx: Duplicate entry of Idempotent URL element <url-pattern> for webModule <web-module> in loadbalancer.xml."
When the log level is set to WARN:
CONFxxxx: Invalid IdempotentUrlPatternData <url-pattern> for web-module <web-module>
An output for error page URL configuration contains the following information (log level set to WARN):
CONFxxxx: Invalid error-url for web-module <web-module>
These log messages are generated while a request is being load balanced and dispatched.
An output for standard logging for each method start contains the following information (log level set to FINE):
ROUTxxxx: Executing Router method <method_name>
An output for router logs for each method start contains the following information (log level set to INFO):
ROUTxxxx: Successfully Selected another ServerInstance for idempotent request <Request-URL>
An output for runtime logs contains the following information (log level set to INFO):
RNTMxxxx: Retrying Idempotent <GET/POST/HEAD> Request <Request-URL>
These errors appear if there are configuration problems, for example, if the custom error page referenced is missing.
Log level set to INFO:
ROUTxxxx: Non Idempotent Request Request-URL cannot be retried
For example:
ROUTxxxx: Non Idempotent Request http://oracle.com/addToDB?x=11&abc=2 \ cannot be retried
Log level set to FINE:
RNTMxxxx: Invalid / Missing Custom error-url / page: error-url for web-module: web-module
For example:
RNTMxxxx: Invalid / Missing Custom error-url / page: myerror1xyz \ for web-module: test
The Loadbalancer Plug-In logs the following information:
Request start/stop information for every request.
Failed-over request information when the request fails over from an unhealthy instance to a healthy instance.
List of unhealthy instances at the end of every health check cycle.
Note - When load balancer logging is enabled, and if the web server logging level is set to DEBUG or to print verbose messages, the load balancer writes HTTP session IDs in the web server log files. Therefore, if the web server hosting the Loadbalancer Plug-In is in the DMZ, do not use the DEBUG or similar log level in production environments.
If you must use the DEBUG logging level, turn off load balancer logging by setting require-monitor-data property to false in loadbalancer.xml.
Use the asadmin create-http-lb-config subcommand to set monitoring to true when you initially create the load balancer configuration, or use the asadmin set command to set it to true later. Monitoring is disabled by default.
The format of the Loadbalancer Plug-In log messages is as follows.
The start of an HTTP request contains the following information:
RequestStart Sticky(New) <req-id> <time-stamp> <URL>
The timestamp value is the number of milliseconds from January 1, 1970. For example:
RequestStart New 123456 602983 \ http://austen.oracle.com/Webapps-simple/servlet/Example1
The end of an HTTP request contains the RequestExit message, as follows:
RequestExit Sticky(New) req-id time-stamp URL listener-id response-time Failure-reason for error(incase of a failure)
For example:
RequestExit New 123456 603001 \ http://austen.oracle.com/Webapps-simple/servlet/Example1 http://austen:2222 18
Note - In the RequestExit message, response-time indicates the total request turnaround time in milliseconds, from the perspective of the Loadbalancer Plug-In.
The list of unhealthy instances, as follows:
UnhealthyInstances cluster-id time-stamp listener-id, listener-id...
For example:
UnhealthyInstances cluster1 701923 http://austen:2210, http://austen:3010
A list of failed-over requests, as follows:
FailedoverRequest req-id time-stamp URL session-id failed-over-listener-id unhealthy-listener-id
For example:
FailedoverRequest 239496 705623 http://austen.oracle.com/Apps/servlet/SessionTest \ 16dfdac3c7e80a40 http://austen:4044 http://austen:4045