2 Configuring the Plug-In for Oracle HTTP Server

Configure the Oracle WebLogic Server Proxy Plug-In, which is the plug-in for proxying requests from Oracle HTTP Server to Oracle WebLogic Server. The Oracle WebLogic Server Proxy Plug-In is included in the Oracle HTTP Server 12c (12.2.1.4.0) installation. You do not have to download and install it separately.

Note:

The Oracle WebLogic Server Proxy Plug-In provides features that are identical to those of the plug-in for Apache HTTP Server.

You can configure the Oracle WebLogic Server Proxy Plug-In either by using Fusion Middleware Control or by editing the mod_wl_ohs.conf configuration file manually.

WebLogic Server Proxy Plug-in 12.2.1.0 and later version builds are moved from Intel compiler to MSVC Compiler. When Apache HTTP Server is used as a front end with WebLogic Server Proxy Plug-in, the plug-in library depends on the two dlls — msvcp110.dll and msvcr110.dll, provided by Microsoft. These dlls are available with Microsoft Visual C ++ Redistributable Package for x64.

This chapter includes the following topics:

Oracle HTTP Server Support Note

The Oracle WebLogic Server Proxy Plug-In for Oracle HTTP Server is now able to front-end WebSocket applications.

Preparing for Configuring the Oracle WebLogic Server Proxy Plug-In

You must complete some installation and verification tasks before configuring the Oracle WebLogic Server Proxy Plug-In.

  • Ensure that Oracle WebLogic Server has been installed, a domain has been created, and you can access the Oracle WebLogic Server administration console. Oracle HTTP Server and WebLogic Server can be installed either in same domain or in separate domains.

  • Verify that Fusion Middleware Control has been installed and you can access the Enterprise Manager Console. This is required to configure the Oracle WebLogic Server Proxy Plug-In by using the graphical interface provided by Fusion Middleware Control. The Fusion Middleware Control is available only for WebLogic managed domains.

  • To be able to test the configuration, ensure that the required Java applications are deployed to Oracle WebLogic Server—either to a single managed server or to a cluster—and are accessible.

Setting the WebLogic Plug-In Enabled Parameter

You must set the WebLogic Plug-In Enabled parameter if the version of the Oracle WebLogic Server instances in the back end is 10.3.4 (or later) release.

  1. Log in to the Oracle WebLogic Server administration console.
  2. In the Domain Structure pane, expand the Environment node.
    • If the server instances to which you want to proxy requests from Oracle HTTP Server are in a cluster, select Clusters.

    • Otherwise, select Servers.

  3. Select the server or cluster to which you want to proxy requests from Oracle HTTP Server.
  4. Select WebLogic Server drop down menu, then Administration, then General Settings.

    The Configuration: General tab is displayed.

  5. Scroll down to the Advanced section, expand it, and select Yes from the WebLogic Plug-In Enabled drop-down list.

    Yes must be selected if the WebLogic Plug-ins are used with the WebLogic Server. See Understanding the WebLogic Plug-In Enabled Parameter.

  6. If you selected Servers in step 2, repeat steps 3 and 4 for the other servers to which you want to proxy requests from Oracle HTTP Servers.
  7. Click Save.

For the change to take effect, you must restart the server instances.

Understanding the WebLogic Plug-In Enabled Parameter

The WebLogic Plug-In Enabled drop-down list contains these values:

  • YesYes must be selected if the WebLogic Plug-ins are used with the WebLogic Server. When set to Yes on the server, it specifies that this server uses the proprietary WL-Proxy-Client-IP header, which is recommended if the server instance will receive requests from a proxy plug-in.

    When set to Yes on the cluster, it specifies that the cluster will receive requests from a proxy plug-in or HttpClusterServlet. A call to getRemoteAddr will return the address of the browser client from the proprietary WL-Proxy-Client-IP header, instead of the Web server.

  • No—Selecting No for the server or cluster disables the weblogic-plugin-enabled parameter (weblogic-plugin-enabled=false) in the config.xml file.

  • Default—When Default is selected for WebLogic Plug-In Enabled in the servers page, then the servers will inherit the value selected for WebLogic Plug-In Enabled for the cluster. When Default is selected for WebLogic Plug-In Enabled in the clusters page, then the clusters will inherit the value selected for WebLogic Plug-In Enabled for the domain.

Configuring the Oracle WebLogic Server Proxy Plug-In Using Fusion Middleware Control

Use Fusion Middleware Control to configure the mod_wl_ohs module. To configure the mod_wl_ohs module, complete the following tasks:

Task 1: Navigate to the mod_wl_ohs Configuration Page

The mod_wl_ohs configuration page contains the parameters for configuring the Oracle WebLogic Server Proxy Plug-In.

  1. Ensure that you have fulfilled the prerequisites listed in Preparing for Configuring the Oracle WebLogic Server Proxy Plug-In.
  2. Select Administration from the Oracle HTTP Server menu.
  3. Select mod_wl_ohs Configuration from the Administration menu. The mod_wl_ohs Configuration page appears.

    The following table describes the fields in the mod_wl_ohs page.

    Field Description

    Provide WebLogic Cluster Details

    List of Oracle WebLogic clusters that can be used for load balancing. The server or cluster list is a list of host:port entries. If a mixed set of clusters and single servers is specified, the dynamic list returned for this parameter will return only the clustered servers.

    If you are not sure of the correct cluster, you can click the search icon to see a list of all associated clusters. See Using the Search Function.

    The module does a simple round-robin between all available servers. The server list specified in this property is a starting point for the dynamic server list that the server and module maintain. Oracle WebLogic Server and the module work together to update the server list automatically with new, failed, and recovered cluster members.

    You can disable the use of the dynamic cluster list by disabling the Dynamic Server List ON field. The module directs HTTP requests containing a cookie, URL-encoded session, or a session stored in the POST data to the server in the cluster that originally created the cookie.

    Provide WebLogic Server Host and Port Details

    • WebLogic Host

      Oracle WebLogic Server host (or virtual host name as defined in Oracle WebLogic Server) to which HTTP requests should be forwarded. If you are using a WebLogic cluster, use the WebLogic Cluster parameter instead of WebLogic Host.

      If you are not sure of the correct server, you can click the search icon to see a list of all associated clusters. See Using the Search Function.

    • WebLogic Port

      Port at which the Oracle WebLogic Server host is listening for connection requests from the module (or from other servers). (If you are using SSL between the module and Oracle WebLogic Server, set this parameter to the SSL listen port.)

    Dynamic Server List ON | OFF

    When set to OFF, the module ignores the dynamic cluster list used for load balancing requests proxied from the module and only uses the static list specified with the WebLogic Cluster parameter. Normally this parameter should be set to ON.

    There are some implications for setting this parameter to OFF:

    • If one or more servers in the static list fails, the module could waste time trying to connect to a terminated server, resulting in decreased performance.

    • If you add a new server to the cluster, the module cannot proxy requests to the new server unless you redefine this parameter. Oracle WebLogic Server automatically adds new servers to the dynamic server list when they become part of the cluster.

    Error Page

    You can create your own error page to appear when your Web server cannot forward requests to Oracle WebLogic Server.

    WebLogic Temp Directory

    Specifies the location of the _wl_proxy directory for post data files.

    Exclude Path or MIME Type

    This parameter allows you exclude certain requests from proxying.

    This parameter can be defined locally at the Location tag level and globally. When the property is defined locally, it does not override the global property but defines a union of the two parameters.

    Match Expressions

    Use this region to specify any Expression overrides. For example, if you were proxying by MIME type, you might enter:

    *.jsp WebLogicHost=myHost|paramName=value

    You can define a new parameter for Match Expression by using the following syntax:

    *.jsp PathPrepend=/test|PathTrim=/foo 

    (parameters are separated by a |)

    Location

    Use this table to specify any location overrides. See Task 3: Configure Expression Overrides or Location Overrides (Optional).

    Add Cross Component Wiring

    This button appears only if you have installed Oracle HTTP Server in full JRF mode (collocated) and there is a backing database.

    Selecting this button opens the Service Tables page. A service table provides a way for service providers to publish endpoint information about their services, and clients of these services to query and bind to these services. A service table is a single table in a database schema. There is one row for every endpoint that is published to it. The service table schema is initially created by the Repository Creation Utility.

    See Wiring Components to Work Together in Administering Oracle Fusion Middleware

Task 2: Specify the Configuration Settings

Specify the configuration settings for the Oracle WebLogic Server Proxy Plug-In. In the General section, you can configure mod_wl_ohs for a WebLogic cluster or for WebLogic servers.

  • If you select the Provide WebLogic Cluster Details radio button, then provide values for the WebLogic Cluster, Dynamic Server List ON, Error Page, WebLogic Temp Directory, and Exclude Path or MIME Type fields.

  • If you select the Provide WebLogic Server Host and Port Details radio button, then provide values for the WebLogic Host, WebLogic Port, Dynamic Server List ON, Error Page, WebLogic Temp Directory, and Exclude Path or MIME Type fields.

Task 3: Configure Expression Overrides or Location Overrides (Optional)

If necessary, you can add expression or location overrides to your configuration.

  1. Add any expression overrides in the Match Expression field.

  2. Add any location overrides in the Location table.

    1. Click Add Row to create a new row.

    2. Enter the base URI for which the associated directives become effective.

    3. Complete the WebLogic Cluster, WebLogic Host, and WebLogic Port fields. You can automatically complete these fields by clicking AutoFill (see Using the AutoFill Function).

    4. Complete the Path Trim field.

      According to the RFC specification, generic syntax for URL is:

      [PROTOCOL]://[HOSTNAME]:{PORT}/{PATH}/{FILENAME};{PATH_PARAMS}/{QUERY_STRING}...
      

      Path Trim specifies the string trimmed by the module from the {PATH}/{FILENAME} portion of the original URL, before the request is forwarded to WebLogic Server. For example, if the URL:

      http://myWeb.server.com/weblogic/foo
      

      is passed to the module for parsing and if Path Trim has been set to strip off /weblogic before handing the URL to WebLogic Server, the URL forwarded to WebLogic Server is:

      http://myWeb.server.com:7002/foo

      Note:

      If you are converting an existing third-party server to proxy requests to WebLogic Server using the module for the first time, you must change application paths to /foo to include weblogic/foo. You can use Path Trim and Path Prepend in combination to change this path

    5. Complete the Path Prepend field.

      According to the RFC specification, generic syntax for URL is:

      [PROTOCOL]://[HOSTNAME]:{PORT}/{PATH}/{FILENAME};{PATH_PARAMS}/{QUERY_STRING}...
      

      Path Prepend specifies the path that the module prepends to the {PATH} portion of the original URL, after Path Trim is trimmed and before the request is forwarded to WebLogic Server.

      Note:

      If you need to append File Name, use the DefaultFileName module parameter instead of Path Prepend.

    6. Click Add Row again to save the new row.

Task 4: Apply Your Changes

Apply your changes to the mod_wl_ohs Configuration Page and restart Oracle HTTP Server.

  1. If the settings are correct, click Apply to apply the changes. If the settings are incorrect or you decide to not apply the changes, click Revert to return to the original settings.
  2. Restart Oracle HTTP Server by selecting Control from the Oracle HTTP Server menu, and then selecting Start Up.

The mod_wl_ohs module configuration is saved and displayed on the mod_wl_ohs Configuration page.

Using the Search Function

The search function allows you to search for a particular WebLogic Cluster or WebLogic Host that is available to the selected Oracle HTTP Server instance. By clicking the search icon Magnifying glass, you can see a list of clusters or servers available to the selected Oracle HTTP Server instance. To use the search function, do the following:

  1. Click the search icon for either WebLogic Cluster or WebLogic Host. The Select WebLogic Cluster/Server dialog box appears.
  2. Select the cluster or server you want to use and click OK.

The selected cluster or server name appears in the appropriate field.

Using the AutoFill Function

Note:

The AutoFill function is available only if you are using Oracle WebLogic Server in full-JRF mode. It is not available if you are using Restricted-JRF.

You can easily add valid WebLogic Server and endpoint locations for a specified Base URL to the Locations table on the Oracle WebLogic Server Proxy Plug-In Configuration screen by using the AutoFill button. To do so:

  1. Click Add to add a new location,
  2. Enter a location name in the Location field.
  3. Click AutoFill.

Data for any location of the same name will be updated and any new locations will be added to the table.

Configuring the Oracle WebLogic Server Proxy Plug-In Manually

Specify directives in the mod_wl_ohs.conf file to manually configure the Oracle WebLogic Server Proxy Plug-In.

  1. Ensure that you have fulfilled the prerequisites listed in Preparing for Configuring the Oracle WebLogic Server Proxy Plug-In.
  2. Open the mod_wl_ohs.conf file in a text editor.

    The mod_wl_ohs.conf file is located in the following directory:

    DOMAIN_HOME/config/fmwconfig/components/OHS/componentHome

  3. Add directives within the <IfModule weblogic_module> element in the configuration file.

    For examples, see Examples of <IfModule weblogic_module> Element Configurations.

    For information about the other directives that you can specify in the mod_wl_ohs.conf file, see Parameters for Web Server Plug-Ins.

  4. Restart Oracle HTTP Server by using one of the techniques described in Starting Oracle HTTP Serverin Administering Oracle HTTP Server.

Examples of <IfModule weblogic_module> Element Configurations

The configuration of the predefined <IfModule weblogic_module> element determines how requests are sent to Oracle WebLogic Server. These examples demonstrates the different ways in which you can configure this element.

Note:

Oracle recommends that you specify directives within the predefined <IfModule weblogic_module> element.

If you specify directives outside the predefined <IfModule weblogic_module> element, or in additional <IfModule weblogic_module> elements, or in configuration files other than mod_wl_ohs.conf, the Oracle WebLogic Server Proxy Plug-In might work, but the configuration state of the module, as displayed in Fusion Middleware Control, could be inconsistent with the directives specified in the mod_wl_ohs.conf configuration file.

To Forward Requests to a Single Oracle WebLogic Server Instance

To forward requests to an application running on a single Oracle WebLogic Server instance, specify the details of that destination server within a <location> element.

Syntax:

<IfModule weblogic_module>
<Location path>
WLSRequest On
WebLogicHost host
WeblogicPort port
</Location>
</IfModule>

Example:

With the following configuration, requests for the /myapp1 URI received at the Oracle HTTP Server listen port will be forwarded to /myapp1 on the Oracle WebLogic Server with the listen port localhost:7001

<IfModule weblogic_module>
<Location /myapp1>
WLSRequest On
WebLogicHost localhost
WeblogicPort 7001
</Location>
</IfModule>

To Forward Requests to a Cluster of Oracle WebLogic Server Instances

To forward requests to an application running on a cluster of Oracle WebLogic Server instances, specify the details of that destination cluster within a new <location> element.

Syntax:

<IfModule weblogic_module>
<Location path>
WLSRequest On
WebLogicCluster host:port,host:port,...
</Location>
</IfModule>

Example:

With the following configuration, requests for the /myapp2 URI received at the Oracle HTTP Server listen port will be forwarded to /myapp2 on the Oracle WebLogic Server cluster containing the managed servers with the listen ports localhost:8002 and localhost:8003.

<IfModule weblogic_module>
<Location /myapp2>
WLSRequest On
WebLogicCluster localhost:8002,localhost:8003
</Location>
</IfModule>

To Configure Multiple Destinations

To configure multiple destinations—say, an application running on a single Oracle WebLogic Server instance and another application running on a cluster—you must specify each destination in a distinct <location> child element. All the <location> child elements should be at the same level within the <IfModule weblogic_module> element, as shown in the following syntax:

<IfModule weblogic_module>
#For an application running on a single server instance
<Location path1>
WLSRequest On
WebLogicHost host
WeblogicPort port
</Location>

#For an application running on a cluster
<Location path2>
WLSRequest On
WebLogicCluster host:port,host:port,...
</Location>

</IfModule>

To Link to Managed Servers

To configure the Oracle WebLogic Server Proxy Plug-In so that it can link to managed servers, for example to enable a high availability deployment of Oracle HTTP Server, edit the mod_wl_ohs.conf file as follows:

<IfModule mod_weblogic.c>
      WebLogicCluster apphost1.mycompany.com:7050,apphost2.mycompany.com:7050
      MatchExpression *.jsp
 </IfModule>
  
<Location /weblogic>
  WLSRequest On
  WebLogicCluster apphost1.mycompany.com:7050,apphost2.com:7050
  DefaultFileName index.jsp
</Location>

Note:

If you are using SSL termination and routing requests to WebLogic, the following additional configuration is required.

In the WebLogic console, WebLogic Plugin Enabled must be set to true, either at the domain, cluster or Managed Server level.

In the Location block which directs requests to the WebLogic managed servers, one of the following lines also must be added.

WLProxySSL ON
WLProxySSLPassThrough ON

(To help determine which parameter to use, see SSL Parameters for Web Server Plug-Ins.)

For example:

<Location /weblogic>
  WLSRequest On
  WebLogicCluster apphost1.mycompany.com:7050,apphost2.com:7050
  WLProxySSL On
  WLProxySSLPassThrough ON
  DefaultFileName index.jsp
</Location>

After enabling the WebLogic plugin, restart the Administration Server. See Terminating SSL Requests in Administering Oracle HTTP Server.

These examples show two different ways of routing requests to Oracle WebLogic managed servers:

  • The <IfModule> block sends any requests ending in *.jsp to the WebLogic Managed Server cluster located on Apphost1 and Apphost2.

  • The <Location> block sends any requests with URLs prefixed by /weblogic to the WebLogic Managed Server cluster located on Apphost1 and Apphost2.

To Configure One-way and Two-way SSL

For information about configuring the Oracle WebLogic Server Proxy Plug-In to support one-way and two-way SSL between Oracle HTTP Server and Oracle WebLogic Server, see Using SSL with Plug-Ins.

Understanding Oracle WebLogic Server Proxy Plug-In Performance Metrics

Oracle HTTP Server provides performance metrics specific to the Oracle WebLogic Server Proxy Plug-In (mod_wl_ohs) module, where a request is proxied to the backend WebLogic server.

These metrics are provided through the Oracle Dynamic Monitoring Service (DMS) which enables Oracle Fusion Middleware components to provide administration tools, such as Fusion Middleware Control, with data regarding the component's performance, state and on-going behavior. For the Oracle WebLogic Server Proxy Plug-In module, for example, it could return the number of requests proxied, the number of failed requests, and other specific metrics. For more information on DMS, see Using the Oracle Dynamic Monitoring Service in Tuning Performance Guide.

Note:

The Oracle WebLogic Server Proxy Plug-In module metrics are available only for Oracle HTTP Server and Apache server plug-ins. They are not available for Microsoft IIS plug-ins.

This section contains the following information on DMS metrics.

Configuring DMS Metrics for Oracle HTTP Server Proxy Plug-in

The DMS metrics for Oracle WebLogic Server Proxy Plug-In are enabled by default in the admin.conf file. They are included as part of the regular DMS metrics collection.

Viewing Performance Metrics for Oracle HTTP Server Proxy Plug-in

You can view the performance metrics by using either the administration port, WLST commands or Fusion Middleware Control. For details of each of the performance metrics, see DMS State Metrics, DMS Event Metrics, and DMS PhaseEvent Metrics.

Using the Administration Port:

If administration port is configured, for example, at 127.0.0.1:9999, then you can view the raw DMS metrics at the URL http://127.0.0.1/dms/.

The metrics under the section /WebLogicProxy [type=OHSWebLogic] are the metrics coming from Oracle WebLogic Server plug-in.

Using WLST (Collocated Mode Only)

Use the WLST command displayMetricTables to view performance metrics, for example:

displayMetricTables(servertype="OHS", servers=<instancename>)

The metrics under the section /WebLogicProxy [type=OHSWebLogic] are the metrics coming from Oracle WebLogic Server Proxy Plug-in.

Using Fusion Middleware Control (Collocated Mode Only)

To view performance metrics in Fusion Middleware Control, select Oracle HTTP Server, then Monitoring, then Performance Summary. The metrics towards the bottom of this page will have Oracle WebLogic Server Proxy Plug-in specific metrics. See Viewing Performance Metrics in Administering Oracle HTTP Server.

DMS State Metrics

A state metric tracks system status information or to track a metric that is not associated with an event. Table 2-1 describes the State metrics available for the Oracle WebLogic Server Proxy Plug-In module.

These metrics can be returned for Oracle WebLogic Server and Apache HTTP Server Plug-ins.

Table 2-1 State Metrics for the Oracle WebLogic Server Proxy Plug-In Module

Metric Name Description

totalDeclines

The total number of requests declined (not processed by mod_wl_ohs). This number indicates the requests that are not configured, and/or rejected by the plug-in (for example, custom HTTP methods are always rejected by the plug-in)

totalErrors

Number of requests that could not be processed successfully. See Event Metrics for errors.

totalHandled

The total number of requests serviced by the mod_wl_ohs plug-in.

totalRequests

The total number of requests received by mod_wl_ohs. The number includes all the requests that are targeted to the plug-in, plus the requests that are not targeted to any module (not configured).

totalRetries

Number of times a request was retried. Requests are generally retried on failure (depending on configuration). If a request is ever retried, this metric will increment (once per request, irrespective of how many times the request was retried).

totalSuccess

The number of requests successfully processed. If the requests are processed successfully (proxied to Oracle WebLogic Server, and sent the response back to client), then this metric will be incremented.

websocketActive

Number of WebSocket upgrade requests currently active.

websocketClose

Number of WebSocket upgrade requests closed. If the WebSocket session is terminated (for any reason), then this metric is updated.

websocketMax

Maximum number of simultaneous WebSocket requests that can be active.

If the WLMaxWebSocketClients parameter is configured, the value will be the lower of these:

  • The configured value, OR

  • 0.75 of the value of MaxRequestWorkers (Oracle HTTP Server and Apache 2.4), OR

  • 0.75 of the value of MaxClients (Apache 2.2), OR

  • 0.75 of the value of ThreadsPerChild (Oracle HTTP Server and Apache 2.2/2.4, Windows only)

If WLMaxWebSocketClients parameter is not configured, the value will be:

  • 0.5 of the value of MaxRequestWorkers (Oracle HTTP Server and Apache 2.4), OR

  • 0.5 of the value of MaxClients (Apache 2.2), OR

  • 0.5 of the value of ThreadsPerChild (Oracle HTTP Server and Apache 2.2/2.4, Windows only)

For more information on the WLMaxWebSocketClients parameter, see Tuning Oracle HTTP Server and Apache HTTP Server for High Throughput for WebSocket Upgrade Requests.

websocketPercent

This value is defined by the number of active WebSockets (websocketActive) divided by the maximum number of simultaneous WebSocket requests (websocketMax) multiplied by 100:

(websocketActive/webocketMax)*100.

websocketRequests

The number of WebSocket upgrade requests made. If the request URI is an WebSocket upgrade request, this metric will be incremented.

websocketSuccess

Number of WebSocket upgrade requests completed successfully. If Oracle WebLogic Server responds to a WebSocket upgrade request with 101 Switching Protocols, then this metric is updated.

DMS Event Metrics

A DMS event metric counts system events. A DMS event tracks system events that have a short duration, or where the duration of the event is not of interest but the occurrence of the event is of interest. Table 2-2 describes the Event metrics available for the Oracle WebLogic Server Proxy Plug-In module.

These metrics can be returned for Oracle WebLogic Server and Apache HTTP Server Proxy Plug-ins.

Table 2-2 Event Metrics for the Oracle WebLogic Server Proxy Plug-In Module.

Metric Name Description

errConnRefused

The number of CONNECTION_REFUSED errors. Indicates the number of times the configured WebLogicHost and/or WebLogicPort is either not reachable or not listening.

errNoResources

The number of NO_RESOURCES errors. One scenario where this exception can occur is when SSL is configured in the plug-in, but the corresponding SSL configuration is not defined in the managed server.

errOthers

The number of any other errors. For example, POST data size is greater than the value of MaxPostSize.

errReadClient

The number of READ_ERROR_FROM_CLIENT errors. Indicates the number of times that the plug-in could not read from the client (browser).

errReadServer

The number of READ_ERROR_FROM_SERVER errors. Indicates the number of times a read operation could not be successfully performed on Oracle WebLogic Server.

errReadTimeout

The number of READ_TIMEOUT errors. An example is Oracle WebLogic Server not responding within WLIOTimeoutSecs.

errWriteClient

The number of WRITE_ERROR_TO_CLIENT errors. Indicates the number of times that the plug-in could not write to client. This can be seen when the client sends a request but closes the connection before receiving the response.

errWriteWLS

The number of WRITE_ERROR_TO_SERVER errors. Indicates the number of times that the plug-in could not write to Oracle WebLogic Server.

wsClientClose

Number of WebSocket upgrade requests closed by client. If the client sends a WebSocket upgrade request, and client closes the connection, then this metric is updated.

wsErrorClose

Number of WebSocket sessions terminated due to error. If there is any error which causes the WebSocket connection to close, then this metric is updated.

wsNoUpgrade

The number of times the WebSocket upgrade request was rejected. The response to WebSocket upgrade request is not "101 Switching Protocols". This can happen when the upgrade request is sent to Oracle WebLogic Server that does not support WebSockets (Oracle WebLogic Server version 12.1.2 or earlier).

wsServerClose

Number of WebSocket upgrade requests closed by server. If Oracle WebLogic Server initiates a close of WebSocket communication, then this metric is updated. For example, timeout or no communication (by default, 5 minutes) after upgrading the request.

DMS PhaseEvent Metrics

A DMS PhaseEvent metric measures the time spent in a specific section of code that has a beginning and an end. A PhaseEvent tracks time in a method or in a block of code. For each phase event, an "active count", "completed count", "total time", "min time", "max time", and "average time" value is included. Table 2-3 describes the PhaseEvent metrics available for the Oracle WebLogic Server Proxy Plug-In module.

These metrics can be returned for Oracle WebLogic Server and Apache HTTP Server Proxy Plug-ins.

Table 2-3 PhaseEvent Metrics for the Oracle WebLogic Server Proxy Plug-In Module

Metric Name Description

websocketPhase

WebSocket communication in progress. The phase (time) between "WebSocket upgrade succeeded" and "WebSocket connection closed"

wlsWait

The phase (time) between "the request sent to Oracle WebLogic Server" and "Waiting for response".

Deprecated Directives for Oracle HTTP Server

The WebLogic Server plug-in logs for Oracle WebLogic Server Proxy Plug-In are now part of the Web Server error log mechanism. References can be identified with module name as weblogic. For example:

[2015-05-14T00:43:27.8355-06:00] [OHS] [TRACE:16] [OH99999] [weblogic] [client_id: ::1] [host_id: XXXXXXXX] [host_addr: XX.XXX.XXX.XXX] [pid: 1240] [tid: 2424] [user: sramavan] [ecid: 00iT9hK4DrhFw0zobn063z0BvEE3zsYyk0000JO00000H] [rid: 0] [VirtualHost: main] ================New Request: [GET /favicon.ico HTTP/1.1] =================

The WLLogFile and Debug directives are deprecated. If the configuration uses these directives, the following note appears in the node manager plug-in log file (ohs_nm.log):

<2015-05-14 00:36:25> <INFO> <OHS-0> <[Thu May 14 00:36:25.723286 2015] [weblogic:warn] [pid 5084:tid 668] The Debug directive is ignored. The web server log level is used instead.>

<2015-05-14 00:36:25> <INFO> <OHS-0> <[Thu May 14 00:36:25.724263 2015] [weblogic:warn] [pid 5084:tid 668] The WLLogFile directive is ignored. The web server log file is used instead.>

To enable plug-in logs:

  • If OraLogMode is set to ODL-text, set OraLogSeverity to TRACE:16. The logs appear in the directory OraLogDir (instance-name.log). This is the default.

  • If OraLogMode is set to apache, set LogLevel to debug. The directive ErrorLog points to the file where the errors are logged.

See Managing Oracle HTTP Server Logs in Administering Oracle HTTP Server guide.

Troubleshooting Oracle WebLogic Server Proxy Plug-In Implementations

You might encounter some of the following problems when using the Oracle WebLogic Server Proxy Plug-In. Descriptions of how to solve these problems are provided.

WLS Session Issues

The Oracle WebLogic Server Proxy Plug-In routes the requests to backend Oracle WebLogic Server or cluster. Oracle WebLogic Server maintains sessions so that subsequent requests from the same client are routed to the same server. However, due to various reasons, if the Oracle WebLogic Server Proxy Plug-In cannot communicate with the Oracle WebLogic Server server, the request is handled in the following ways:

  • If the request is routed to a single WebLogic Server instance, the Oracle WebLogic Server Proxy Plug-In continues trying to connect to that same WebLogic Server instance for the maximum number of retries as specified by the ratio of ConnectTimeoutSecs and ConnectRetrySecs. If all attempts fail, an HTTP 503 error message is returned back to the client.

  • If the request is routed to WebLogic Cluster, then the current WLS server is marked as bad, and the request is routed to the next available WLS server. If all attempts fail, an HTTP 503 error message is returned back to the client.

In addition to sending a HTTP 503 error message, the following is displayed as a response in the HTTP client:

Failure of Web Server bridge:
No backend server available for connection: timed out after xx seconds or idempotent set to OFF or method not idempotent.

CONNECTION_REFUSED Errors

Occasionally, under stress conditions, a few requests might fail with the following error logged in the error log file.

weblogic: Trying GET /uri at backend host 'xx.xx.xx.xx/port; got exception 'CONNECTION_REFUSED [os error=xxx, line xxxx of URL.cpp]: apr_socket_connect call failed with error=xxx, host=xx.xx.xx.xx, port=xxxx'

As mentioned in Tips for Reducing CONNECTION_REFUSED Errors, Oracle WebLogic Server might have reached the maximum allowed backlog connections.

To resolve, follow the steps mentioned in Tips for Reducing CONNECTION_REFUSED Errors.

NO_RESOURCES Errors

Occasionally, under stress conditions, a few requests might fail with the following error logged in the error log file.

weblogic: *******Exception type [NO_RESOURCES] (apr_socket_connect call failed with error=70007, host=xx.xx.xx.xx, port=xxxx) raised at line xxxx of URL.cpp

This usually occurs if Oracle WebLogic Server is too busy to respond to the connect request from the Oracle WebLogic Server Proxy Plug-In. This can be resolved by setting WLSocketTimeoutSecs to a higher value. This allows the Oracle WebLogic Server Proxy Plug-In to wait longer for the connect request to be responded to by the Oracle WebLogic Server.

Changing the Oracle WebLogic Server Keystore Causes Unexpected Behavior

If the Oracle WebLogic Server keystore is changed (for example, by setting up backend one-way SSL between Oracle HTTP Server and Oracle WebLogic Server) it is possible to break communication between Oracle WebLogic Server and the NodeManager. If this happens, this will also affect all provisioning and process management commands issued through WLST. The error messaging in this situation is poor and the situation can be confusing. For example, some errors indicate NodeManager is down, when the user can see that it is clearly up.

Here are a few examples of the unexpected behavior that can occur. Note that in these examples, the NodeManager is up and running.

  • All state() commands run against Oracle HTTP Server instances return UNKNOWN.

    wls:/OHSDomain/serverConfig/> state('ohs1')
    Current state of "ohs1" : UNKNOWN
    
  • Oracle HTTP Server process management commands return an SSLEngine failure:

    wls:/OHSDomain/serverConfig/> start('ohs1')
    Starting system component "ohs1" ...
     
    General SSLEngine problem
    Traceback (innermost last):
      File "<console>", line 1, in ?
      File "<iostream>", line 1384, in start
      File "<iostream>", line 553, in raiseWLSTException
    WLSTException: Error occurred while performing start : System component with
    name "ohs1" failed to start : General SSLEngine problem
    ....
    
  • The Oracle HTTP Server custom command ohs_createInstance returns a message that NodeManager is down and the command will be completed when it is back up, for example:

    ohs_createInstance(instanceName='ohs1',machine='myMachine.myCompany.com')
    ....
    The node manager for "ohs1" is not reachable. Changes will be completed when the node manager is available.
    The node manager error is: Node Manager is not available on machine myMachine.myCompany.com
    Activation completed. 

Workaround:

To workaround this issue, add the NodeManager demo trust certificate to the Java standard trust. Note that this workaround applies only when the user is setting up one-way backend SSL. Other steps may be needed for other scenarios.

  1. Use keytool command to export the NodeManager demo trust certificate to the Java keystore.

    keytool -exportcert -rfc -alias wlscertgenca -storepass DemoTrustKeyStorePassPhrase -file /<path to location of nmCert.crt> -keystore $ORACLE_HOME/wlserver/server/lib/DemoTrust.jks
    
  2. Use keytool command to import the NodeManager demo trust certificate to the Java standard trust.

    keytool -importcert -alias wlscertgenca -file /<path to location of nmCert.crt> -keystore $JAVA_HOME/jre/lib/security/cacerts -trustcacerts -storepass changeit -noprompt
    
  3. Oracle WebLogic Server may need to be bounced (shutdown and restarted) after applying the keytool commands.