Oracle® Application Server Web Cache Administrator's Guide
10g (9.0.4) Part No. B10401-02 |
|
![]() |
![]() |
This chapter describes common configuration problems and debugging techniques for resolving them.
This chapter contains these topics:
If OracleAS Web Cache does not start, it can be because of the following problems:
During configuration, you configure listening ports from which OracleAS Web Cache receives browser requests. By default, the port is 7777 for HTTP requests. You can configure a port for HTTPS requests.
You also configure listening ports for administration, invalidation, and statistics monitoring requests. By default, the HTTP ports are 4000, 4001, and 4002, respectively. You also configure the advertised port number from which an origin server can receive OracleAS Web Cache requests.
When you start OracleAS Web Cache, a port conflict check is performed. If there is a port conflict, OracleAS Web Cache will fail to start. Port conflicts are reported to the event log file, event_log
. The event_log
file is located in $ORACLE_HOME/webcache/logs
on UNIX and in ORACLE_HOME
\webcache\logs
on Windows. The following shows an excerpt of event_log
with port conflict event messages:
[25/Jun/2003:19:12:40 +0000] [notification 9612] [ecid: -] OracleAS Web Cache version number: 9.0.4 [25/Jun/2003:19:12:40 +0000] [notification 9403] [ecid: -] Maximum number of file/socket descriptors set to 950. [25/Jun/2003:19:12:40 +0000] [notification 13002] [ecid: -] Maximum allowed incoming connections are 700 [25/Jun/2003:19:12:40 +0000] [alert 13305] [ecid: -] failed to assign port 7777, bind() error = Address already in use [25/Jun/2003:19:12:40 +0000] [alert 9707] [ecid: -] Failed to start the server. [25/Jun/2003:19:12:40 +0000] [alert 9609] [ecid: -] The server process could not initialize. [25/Jun/2003:19:12:40 +0000] [notification 9610] [ecid: -] The server is exiting.
Note that the last message will only appear when the admin
server process is started for the first time.
To resolve port conflicts:
Use OracleAS Web Cache Manager to resolve the port conflicts.
Typically, OracleAS Web Cache and the origin server ports are in conflict. Verify the port assigned to OracleAS Web Cache in Listen Ports page (Ports > Listen Ports), and verify the host names and ports assigned to the origin servers in the Origin Servers page (Origin Servers, Sites, and Load Balancing > Origin Servers).
If multiple instances of OracleAS Web Cache are running on a multihomed host with multiple IP addresses, a port conflict can occur. The IP address for the default HTTP and HTTPS ports is set to ANY. Upon startup, OracleAS Web Cache attempts to bind the ports to all IP addresses. If a port conflict occurs, change ANY to a specific IP address in the Listen Ports page (Ports > Listen Ports).
Restart OracleAS Web Cache.
If the administration port is in conflict, the admin
server process will not start and OracleAS Web Cache Manager will not be accessible. The event log will contain messages that resemble the following output:
[25/Jun/2003:19:21:42 +0000] [alert 13305] [ecid: -] failed to assign port 4000, bind() error = Address already in use [25/Jun/2003:19:21:42 +0000] [alert 9707] [ecid: -] Failed to start the server. [25/Jun/2003:19:21:42 +0000] [alert 9609] [ecid: -] The server process could not initialize. [25/Jun/2003:19:21:42 +0000] [notification 9610] [ecid: -] The server is exiting.
To resolve this port conflict, modify the webcache.xml
file, an internal file that contains the configuration settings, and change the administration port number. The webcache.xml
file is located in $ORACLE_HOME/webcache
on UNIX and in ORACLE_HOME
\webcache
on Windows. The following shows an excerpt of the webcache.xml
file with the line for the administration port shown in boldface:
... <MULTIPORT> <LISTEN IPADDR="ANY" PORT="1100" PORTTYPE="NORM"/> <LISTEN IPADDR="ANY" PORT="4000" PORTTYPE="ADMINISTRATION"/> <LISTEN IPADDR="ANY" PORT="4003" PORTTYPE="INVALIDATION"/> <LISTEN IPADDR="ANY" PORT="4002" PORTTYPE="STATISTICS"/> </MULTIPORT> ...
OracleAS Web Cache Manager does not enforce stringent validation checking. This is especially a problem when the admin server process is shut down after applying invalid configuration changes. In that case, the admin server process will not be able to start up, and the OracleAS Web Cache Manager will become inaccessible. Check the event_log
file for startup errors or the Event Viewer on Windows.
To solve this problem:
If you want to retain the configuration changes you made, send the webcache.xml
file to Oracle Support Services to troubleshoot the invalid configuration entry.
If you want to restore configuration to a previous configuration, run the webcachectl reset
command to restore to the previous version of the configuration. The opmnctl
utility does not provide a reset command.
If the definition of Oracle home in the webcache.xml
configuration file is different than the definition of Oracle home in your environment, OracleAS Web Cache may fail to start.
On UNIX, you may see the following alert message in the event log:
No matching CACHE element found in webcache.xml for current host name (webcache-host) and ORACLE_HOME (Oracle_home).
On Windows, you may see the following message:
The description for Event ID ( 1 ) in Source ( Oracle-Web-Cache ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. The following information is part of the event: Cannot open log files because NULL socket indicates problem.
During installation, the Oracle home is written to the ORACLEHOME attribute of the CACHE NAME element. in the webcache.xml
file. The Oracle home is specified with the $ORACLE_HOME
environment variable on UNIX and the ORACLE_HOME
parameter located at HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE
in the Windows registry.
If there is a mismatch, modify either the ORACLEHOME attribute in the webcache.xml
file or the Oracle home environment setting. (In a cluster environment, there is more than one CACHE NAME element in the webcache.xml
file, one for each cluster member. Be sure to modify the correct element.)
Port numbers less than 1024 are reserved for use by privileged processes on UNIX. If you want to configure OracleAS Web Cache to listen on a port less than 1024, such as on port 80, then the webcached
executable must run as the root user.
See: "Running webcached with Root Privilege" for instructions on configuring thewebcached executable to run as root.
|
If webcached
is not run as root, the cache
server process fails to start and messages similar to the following output are written to the event log file:
[25/Jun/2003:19:27:04 +0000] [notification 9612] [ecid: -] OracleAS Web Cache version number: 9.0.4 [25/Jun/2003:19:27:04 +0000] [notification 9403] [ecid: -] Maximum number of file/socket descriptors set to 950. [25/Jun/2003:19:27:04 +0000] [notification 13002] [ecid: -] Maximum allowed incoming connections are 700 [25/Jun/2003:19:27:04 +0000] [alert 13305] [ecid: -] failed to assign port 80, bind() error = Permission denied [25/Jun/2003:19:27:04 +0000] [alert 9707] [ecid: -] Failed to start the server. [25/Jun/2003:19:27:04 +0000] [alert 9609] [ecid: -] The server process could not initialize. [25/Jun/2003:19:27:04 +0000] [notification 9610] [ecid: -] The server is exiting.
For OracleAS Web Cache to support more than 1,024 connections on UNIX, the webcached
executable must run with the root privilege.
If webcached
cannot run with the root privilege, the cache
server process fails to start and messages that resemble the following output are written to the event log file:
[25/Jun/2003:19:30:48 +0000] [notification 9612] [ecid: -] OracleAS Web Cache version number: 9.0.4 [25/Jun/2003:19:30:48 +0000] [alert 9604] [ecid: -] Could not increase the number of file/socket descriptors to 2250. [25/Jun/2003:19:30:48 +0000] [alert 9707] [ecid: -] Failed to start the server.
See Also:
|
When OracleAS Web Cache is unable to open a wallet, messages similar to the following output are written to the event log file:
[25/Jun/2003:19:35:00 +0000] [warning 11917] [ecid: -] SSL wallet Wallet file /etc/ORACLE/WALLETS/janedoe/ewallet.p12 does not exist [25/Jun/2003:19:35:00 +0000] [warning 11919] [ecid: -] SSL wallet Autologin file /etc/ORACLE/WALLETS/janedoe/cwallet.sso does not exist - Wallet does not appear to be autologin wallet. [25/Jun/2003:19:35:00 +0000] [warning 11922] [ecid: -] Wallet wallet fails to open at location /etc/ORACLE/WALLETS/janedoe, NZERROR 28759, as user janedoe [25/Jun/2003:19:35:00 +0000] [alert 9609] [ecid: -] The server process could not initialize. [25/Jun/2003:19:35:00 +0000] [notification 9610] [ecid: -] The server is exiting.
To resolve this error, perform the following procedure:
Ensure that the wallet directory exists:
/etc/ORACLE/WALLETS/
user_name
on UNIX
%USERPROFILE%\ORACLE\WALLETS
on Windows
Ensure that the auto-login file cwallet.sso
and wallet file ewallet.p12
exist.
If these files do not exist, then an auto-login wallet does not exist. In this case, create the wallet and enable auto-login.
Ensure that Oracle Wallet Manager can open the wallet.
If Oracle Wallet Manager cannot open the wallet, then the wallet is corrupt. In this case, re-create the wallet.
Restart OracleAS Web Cache with the following command:
opmnctl restartproc ias-component=WebCache
Then, recheck the event log for wallet errors.
To diagnose if caching rules are set up to serve wrong or outdated content:
Analyze the content of the event_log
file and the access_log
file in $ORACLE_HOME/webcache/logs
on UNIX and in ORACLE_HOME
\webcache\logs
on Windows.
Determine the contents of the cache by:
Listing the most popular requests, either cached or not cached requests, along with the caching rules associated with cached documents
Listing the contents of the cache
Previewing invalidation without invalidating actual content
See Also:
|
Compare the contents of the cache to the caching rules in the Caching, Personalization, and Compression Rules page (Rules for Caching, Personalization, and Compression > Caching, Personalization, and Compression Rules) to determine discrepancies.
Adjust caching rules by adding or removing rules, adjusting expression type syntax, or changing the precedence of rules.
The majority of ESI errors are the result of syntax errors in either the template or fragment pages. By analyzing the ESI output in the event log, you can easily diagnose most ESI syntax errors. To avoid unnecessary reporting in the event log, use a verbosity level of WARNING. In addition to the event log, it is useful to display the diagnostic information and event log information in the HTML response body.
The following topics describe using the event log and HTML response body to diagnose template and fragment syntax errors:
Consider a template named exlusion.html
that contains syntax for a nonexistent ESI tag named <esi:exclude>
:
<html><body> Simple inclusion test. <esi:exclude src="/cgi-bin/esi-headers.sh?/esi/fragment1.html"/ </body></html>
The response returned to the browser follows:
<HTML><HEAD><TITLE>Unsupported ESI feature</TITLE></HEAD> <BODY>Some ESI features on this page are not supported. </BODY></HTML>
The following shows an event log excerpt that indicates a problem with the <esi:exlude>
keyword:
[24/Mar/2003:16:02:12 -0500] [detail] [ecid: 25732665668,0] [client: 127.0.0.1] [host: www.company.com:80] [url: /cgi-bin/esi-headers.sh?/esi/exclusion.html] [24/Mar/2003:16:02:12 -0500] [error 12086] [ecid: 25732665668,0] ESI syntax error. Unrecognized keyword exclude is at line 2. [24/Mar/2003:16:02:12 -0500] [warning 11064] [ecid: 25732665668,0] ESI document www.company.com:80/cgi-bin/esi-headers.sh?/esi/exclusion.html parsing error
Consider a template named inclusion_exclusion.html
that contains the following syntax for including fragment exlusion1.html
. Notice that HTML does not contain any ESI exception handling tags or attributes.
<html><body> Simple inclusion test. <esi:include src="/cgi-bin/esi-headers.sh?/esi/frag_exclusion.html"/> </body></html>
Fragment frag_exclusion.html
contains syntax for a nonexistent ESI tag named <esi:exclude>
:
<esi:exclude src="/cgi-bin/esi-headers.sh?/esi/fragment1.html"/
The response returned to the browser follows:
<HTML><HEAD><TITLE>ESI Processing Exception</TITLE></HEAD> <BODY>The page caused an ESI processing exception. </BODY></HTML>
The following shows an event log excerpt that indicates a problem with the <esi:exlude>
keyword. As a result of this error and the fact that the ESI in the template does not specify any alternative fragment to serve, the browser is served an ESI exception.
[24/Mar/2003:16:10:40 -0500] [detail] [ecid: 25733186204,0] [client: 127.0.0.1] [host: www.company.com:80] [url: /cgi-bin/esi-headers.sh?/esi/inclusion_exclusion.html] [24/Mar/2003:16:10:40 -0500] [error 12086] [ecid: 25733186204,0] ESI syntax error. Unrecognized keyword exclude is at line 2. [24/Mar/2003:16:10:40 -0500] [warning 11064] [ecid: 25733186204,0] ESI document www.company.com:80/cgi-bin/esi-headers.sh?/esi/frag_exclusion.html parsing error [24/Mar/2003:16:10:40 -0500] [warning 12009] [ecid: 25733186204,0] Incorrect ESI fragment exception in ESI template www.company.com:80/cgi-bin/esi-headers.sh?/esi/inclusion_exclusion.html, fragment www.company.com:80/cgi-bin/esi-headers.sh?/esi/frag_exclusion.html [24/Mar/2003:16:10:40 -0500] [error 12012] [ecid: 25733186204,0] No exception handler is defined in template www.company.com:80/cgi-bin/esi-headers.sh?/esi/inclusion_exclusion.html:. [24/Mar/2003:16:10:40 -0500] [error 11368] [ecid: 25733186204,0] ESI exception error response is returned.
Consider the same inclusion_exclusion.html
template that contains the following syntax for including fragment frag_exclusion.html
or alternative fragment fragment1.html
. When the exlusion1.html
fragment specified cannot be fetched, the fragment1.html
fragment specified with the alt
attribute is served in its place.
<html><body> Simple inclusion test. <esi:include src="/cgi-bin/esi-headers.sh?/esi/frag_exclusion.html" alt="/esi/fragment1.html"/> </body></html>
Fragment frag_exclusion.html
contains syntax for a nonexistent ESI tag named <esi:exclude>
:
Simple inclusion succeeded. <esi:exclude src="/cgi-bin/esi-headers.sh?/esi/fragment1.html"/>
Therefore, fragment fragment1.html
is used instead of frag_exclusion.html
as the fragment:
Simple inclusion succeeded.
The response returned to the browser follows:
<html><body> Simple inclusion test. Simple inclusion succeeded. </body></html>
The following shows an event log excerpt that indicates a problem with the <esi:exlude>
keyword. Because of the exception handling, the browser is served the alternative fragment instead of an ESI exception.
[24/Mar/2003:16:14:41 -0500] [detail] [ecid: 25733432444,0] [client: 127.0.0.1] [host: www.company.com:80] [url: /cgi-bin/esi-headers.sh?/esi/inclusion_exclusion.html] [24/Mar/2003:16:14:41 -0500] [error 12086] [ecid: 25733432444,0] ESI syntax error. Unrecognized keyword exclude is at line 2. [24/Mar/2003:16:14:41 -0500] [warning 11064] [ecid: 25733432444,0] ESI document www.company.com:80/cgi-bin/esi-headers.sh?/esi/frag_exclusion.html parsing error [24/Mar/2003:16:14:41 -0500] [warning 12009] [ecid: 25733432444,0] Incorrect ESI fragment exception in ESI template www.company.com:80/cgi-bin/esi-headers.sh?/ esi/inclusion_exclusion.html, fragment www.company.com:80/cgi-bin/esi-headers.sh?/esi/frag_exclusion.html
In addition to analyzing the event log for the sequence of events, you can also view the diagnostic and event log results in the HTML response. The following shows the HTML response when the string +wcdebug
is appended is the URL. The template diagnostic information, TU;max-age=30+60;age=0
, means the following:
T
means this page is composed an ESI template.
U
means this request resulted in an update of stale document.
max-age=30+60
means that the document is to expire in 30 seconds from population and to be removed from the cache 60 seconds from the expiration. This provides a total of 90 seconds from population.
age=0
in age means that 0 seconds have passed since population of the cache, meaning there are 30 seconds to expiration and 60 seconds to removal.
The fragment diagnostic information, FM;max-age=30+0;age=0
, means the following:
F
means this page is an ESI fragment.
U
means this request resulted in a cache miss.
max-age=30+0
means that the document is to expire in 30 seconds from population and to be removed from the cache 0 seconds from the expiration. This provides a total of 30 seconds from population.
age=0
in age means that 0 seconds have passed since population of the cache, meaning there are 30 seconds to expiration and removal.
Web Cache Debug Info: Web Cache Debug Info: TU;max-age=30+60;age=0 Simple inclusion test: Web Cache Debug Info: Web Cache Debug Info: TU;max-age=30+60;age=0 Web Cache Debug Info: FM;max-age=30+0;age=0 [EVENTLOG] [24/Mar/2003:16:17:23 -0500] [detail] [ecid: 25733598670,0] [client: 127.0.0.1] [host: www.company.com:80] [url: /cgi-bin/esi-headers.sh?/esi/inclusion_exclusion.html] [24/Mar/2003:16:17:23 -0500] [error 12086] [ecid: 25733598670,0] ESI syntax error. Unrecognized keyword exclude is at line 2. [24/Mar/2003:16:17:23 -0500] [warning 11064] [ecid: 25733598670,0] ESI document www.company.com:80/cgi-bin/esi-headers.sh?/esi/frag_exclusion.html parsing error [24/Mar/2003:16:17:23 -0500] [warning 12009] [ecid: 25733598670,0] Incorrect ESI fragment exception in ESI template www.company.com:80/cgi-bin/esi-headers.sh?/ esi/inclusion_exclusion.html, fragment www.company.com:80/cgi-bin/esi-headers.sh?/esi/frag_exclusion.html Simple inclusion succeeded.
On UNIX operating systems, the top
and uptime
utilities report a higher than expected average load when the OracleAS Web Cache computer is idle. This occurs because OracleAS Web Cache performs light maintenance work, even when it is idle. During idle mode, the following effect occurs:
The uptime load—the average kernel scheduler queue length—is going to be longer. OracleAS Web Cache increases the average queue length (uptime output) by approximately one.
The CPU load is still low because the work OracleAS Web Cache performs is minimal.
The invalidation feature has a default timeout of 300 seconds for the propagation of invalidation requests in the cache hierarchy or cache cluster deployments.
When the timeout is exceeded in a cache hierarchy, a message similar to the following is written to the event_log
file of the remote cache or subscriber cache:
[28/Jan/2003:01:10:16 +0000] [debug 11739] [ecid: 25088352784,1] New subscriber OracleAS Web Cache with IP ’130.35.45.41’ port ’22000’ has been established. Total subscriber(s): ’1’. ... [28/Jan/2003:01:12:31 +0000] [notification 11734] [ecid: -] Invalidation sent to subscriber cache with IP ’130.35.45.41’ port ’22002’ has returned with response code: ’failed-no response code’
To resolve this error:
On the central or provider cache, use a text editor to open the webcache.xml
file.
Locate the CALYPSONETINFO
element:
<CALYPSONETINFO...INV_PEER_TIMEOUT="300" INV_GLOBAL_TIMEOUT="300".../>
Modify the value of the INV_GLOBAL_TIMEOUT
attribute to a larger value.
The higher the value, the more system resources that will be used. If the network is fast, only increase the value to what is needed.
Restart OracleAS Web Cache with the following command:
opmnctl restartproc ias-component=WebCache
When the timeout is exceeded in a cache cluster, a message similar to the following is displayed in the Cache Cleanup Results dialog box or in the response to the invalidation request:
Can’t connect to the web cache’s invalidation listening port.
To resolve this error:
On cache cluster members, use a text editor to open the webcache.xml
file.
Locate the CALYPSONETINFO
element:
<CALYPSONETINFO...INV_PEER_TIMEOUT="300" INV_GLOBAL_TIMEOUT="300".../>
Modify the value of INV_PEER_TIMEOUT
attribute.
In a cache cluster, it is likely that cache cluster members are running in a LAN environment. Therefore, decreasing the value of INV_PEER_TIMEOUT
will typically improve efficiency.
Restart OracleAS Web Cache with the following command:
opmnctl restartproc ias-component=WebCache
From OracleAS Web Cache Manager, propagate changes to all cache cluster members and restart the other cache cluster members.
If an application Web server has reached capacity, the following error message appears when accessing pages of a Web site:
The application Web server is busy. Possible reach capacity.
This error indicates that the application Web server has exceeded the maximum number of concurrent connections. To resolve this problem, you can either:
Increase capacity.
In the Origin Server page (Origin Server, Sites, and Load Balancing > Resource Limits) of OracleAS Web Cache Manager, check the value of the Capacity field. This field provides the currently configured capacity. If the capacity can be adjusted, increase it.
Evaluate the caching rules to determine if additional content can be cached.
If the actual length of a page is less than value of the Content-Length
response-header field set by the origin server and sent to a browser by OracleAS Web Cache, the browser expects more data to arrive and the connection will eventually time out. If the actual length of the page is greater than the Content-Length
, the browser will not receive the complete page. This problem does not occur for cache hits because OracleAS Web Cache correctly calculates the content length itself for pages stored in the cache. For cache misses, there are two workarounds for the improper content-length problem:
Fix your application to ensure that the value of the Content-Length
response-header field is correct.
Configure the browser or client emulator to send HTTP/1.0 requests without the Connection:
keep-alive
request-header field.
OracleAS Web Cache does not cache pages that generate HTTP 500 response status codes. However, if an application reports an exception and does not send the error code, the exception may be cached by OracleAS Web Cache.
When you are developing a servlet and JSP and want to cache the content of the servlet and JSP, ensure that you send an non-200 HTTP error code in the runtime exception handling code. Otherwise, if the document has a caching rule associated with it, OracleAS Web Cache caches the document with the exception until the document is invalidated.
If you are using the Oracle JSP container in a Jserv environment as your JSP engine and servlet engine, Oracle JSP will generate HTTP 200 status code exceptions when a JSP file is not found or there is a compilation error in a JSP file. This is mainly for ease of debugging of JSP development in a JServ environment.
To enable the Oracle JSP container to generate an HTTP 404
Not
Found
or 500
response status codes rather than HTTP 200 status codes, set send_error
to true
and unsafe_reload
to true
in zone.properties
in your JServ deployment environment. The file zone.properties
is located in $ORACLE_HOME/Apache/Jserv/etc
on UNIX or ORACLE_HOME
\Apache\Jserv\etc
on Windows.
When using the OC4J JSP container in OC4J environment, it is not necessary to establish these settings. OC4J always sends 500 status codes when it encounters a compilation error.
See Also:
|
Table 14-1 describes browser limitations and their impact on OracleAS Web Cache.
Table 14-1 Browser Issues