Search: For:
Browsing Single Category
www.dbatoolz.com ORACLE DBA Forums Solutions › Topic Id: 2794 | Permalink

WebCache/Portal Invalidation don't work for multiple virtual hosts

Topic ID: 2794
Created By: 2007-DEC-04 18:17:56 [Vitaliy]
Updated By: 2007-DEC-04 19:09:13 [Vitaliy]
Status: Open
Severity: Normal
Read Only: No
8590
2007-DEC-04 18:17:56
Moderator
 
 
Registered On: Mar 2006
Total Posts: 267
Synopsis
After successfully running Oracle Portal / WebCache you decided to setup 
additional virtual hosts to be able to serve them using the same instance of 
Portal / WebCache.  Your configuration before setting a VH was as follows:


 [web] -> [WebCache] -> [OAS/Apache] -> | domain1.com | -> [PORTAL ENGINE]

After adding additional virtual hosts (VH) your configuration is as follows:

                                        | domain1.com | 
                                        | domain2.com | 
 [web] -> [WebCache] -> [OAS/Apache] -> | domain3.com | -> [PORTAL ENGINE]
                                        | domain4.com |
                                        | domain5.com |

Everything is working fine with exception of WebCache invalidations requests - 
they are not processed properly for any domain but the first one [domain1.com]. 
Stale content can be seen on domain[2-5].com while the same content appears to 
be up to date on domain1.com.  If you restart WebCache stale content is 
refreshed.
Solution
You must add PPE loopback alias for domain[2-5].com to the site definition of 
the original domain1.com in webcacheadmin:

   http://webcache.top-domain.com:9400/webcacheadmin

Navigate -> Origin Servers, Sites, and Load Balancing -> Site Definitions
Select the radio button for the domain1.com, click "Add Alias" then add the 
following aliases for domain[2-5]:

   Host Name      Port
   -------------  --------
   domain2.com    7777
   domain3.com    7777
   domain4.com    7777
   domain5.com    7777

Where Port number should be set to the HTTP Listen port of the Portal middle 
tier (either 7778 or 7777).
Explanation
Apparently while you can have 1-to-many Webcache->Portal configurations a 
single portal instance (installed on the same host) can only have ONE WebCache 
configured for it.  This configuration is defined by navigating to:

Farm > Application Server: portal.hostname.domain.com >
   Portal:portal > Portal Web Cache Settings

and it consists of the following fields:

Specify the Oracle Web Cache settings that Portal should use.
            
        Published Host                  domain1.com
        Listening Port                  443 (in this case we have SSL enabled)
        Listening Port SSL Enabled      Yes
        Invalidation Host               webcache.top-domain.com
        Invalidation Port               9401
        Invalidation Username           invalidator
        Invalidation User Password      **********
        Confirm Password                **********

Since you cannot have multiple Published Hosts you must add PPE loop back 
aliases to the original site definition (domain1.com) in the WebCache 
configuration.  This way when an invalidation request comes in for the 
domain1.com - cached content for all existing aliases that are defined for this 
address are also invalidated.
Additional Information
PPE Loop back PORT definition can be found in web.xml:

   $ORACLE_HOME/j2ee/OC4J_Portal/applications/portal/portal/WEB-INF/web.xml

example:

          <init-param>
             <param-name>useScheme</param-name>
             <param-value>http</param-value>
          </init-param>
          <init-param>
             <param-name>usePort</param-name>
             <param-value>7777</param-value>
          </init-param>
          <init-param>
             <param-name>httpsports</param-name>
             <param-value>443</param-value>
          </init-param>

WebCache configuration on Portal host can be found in iasconfig.xml:

   $ORACLE_HOME/portal/conf/iasconfig.xml

example (formatted for readability):

   <IASInstance Name="iAS-1.domain1.com" Host="domain1.com">
      <WebCacheComponent ListenPort="443" InvalidationPort="9401" 
          InvalidationUsername="invalidator" 
          InvalidationPassword="@xxxxxxK48/y8HW/xxxxxxxxxxOyuvbUudA=="
          SSLEnabled="true"/>
   </IASInstance>
   ...
   ...
   <WebCacheDependency 
         ContainerType="IASInstance" 
         Name="iAS-1.domain1.com" 
         InvalidationHost="webcache.top-domain.com"/>
[edited by: Vitaliy at 19:09 (CST) on Dec. 04, 2007]