November 13, 2008

WCI 10gR3 Installer Available... But Watch your Virtual Memory!

Today Oracle released  WebCenter Interaction 10gR3, the first Oracle-branded incarnation of the BEA's Aqualogic User Interaction product. I was eager to get started on upgrading a customer's ALUI 6.5 MP1 system to 10gR3. I encountered an "unexpected consideration" in the installer that you might call a bug. In my experience, on Windows the installer fails unless you explicitly allocate virtual memory.

I installed on five lab servers that had been running ALUI 6.5 MP1. The first succeeded, but on the second two servers, the installers failed.

10gr3-setup-fails.jpg



 
 
 
 
 
 
 
 
 
 
 
 

Hmm. I dug into the logs (and you have to wait a bit after this message before they are all fully written), and I found the following in \installlogs\versionpolicy_deployment.log:

[trycatch] Caught exception: The config file I:\apps\plumtree\uninstall\ptportal\10.3.0\register\ERROR: Registry key does not exist\ContentsXML\inventory.xml must exist.

And later:

BUILD FAILED
I:\apps\plumtree\uninstall\ptportal\10.3.0\register\register.xml:4979: The following error occurred while executing this line:
I:\apps\plumtree\uninstall\ptportal\10.3.0\register\macrodefs\versionpolicy.xml:690: The following error occurred while executing this line:
I:\apps\plumtree\uninstall\ptportal\10.3.0\register\macrodefs\orainventory.xml:172: Oracle Universal Installer failed to properly register your ORACLE_HOME,
I:\apps\plumtree, under name OraWCIntgHome1.  Make sure (1) that you have proper permissions (on unix you would have needed to run orainstRoot.sh as root user, on windows you need write access to registry and ability to install to %ProgramFiles% directory), (2) that, on unix, you did not run installer as root user.  You can attempt to run OUI yourself with command line "I:\apps\plumtree\uninstall\ptportal\10.3.0\register/../../../oui/cd/Disk1/install/setup.exe" -ignoreSysprereqs -attachHome "ORACLE_HOME=I:\apps\plumtree" ORACLE_HOME_NAME=OraWCIntgHome1.   If that succeeds, then you can run the installer again.


Okay, so I ran the command it suggested in the command line, and it again failed, but this time it left open the Oracle Universal Installer console with this message in it:

Starting Oracle Univeral Installer...
Checking swap space: 0MB available, 500 MB required.


Ahh, so I dug into the virtual memory settings, and I found on one machine that the C:\ drive had no virtual memory assigned, and then a secondary drive had virtual memory set to "system managed size." On the other machine, the C:\ drive had vritual memory assigned, but it used "system managed size."

On my fourth server, I tried setting specific memory settings on the C:\ drive, and that worked. On my fifth server, I tried leaving "system managed size" on the C:\ drive but specific virtual memory size on a secondary drive.  Both of those worked fine.

So the trick seems to be simply, set virtual memory specifically. To do so:

  • WindowsKey-Break to open the System Properties Window
  • Go to the Advanced tab
  • Open the Performance settings
  • Go to the Advanced tab
  • In the Virtual Memory area, select Change
  • Specify "Custom Size" and enter intitial of 2046 and max of 4092
  • Click Set, then OK, then acknowledge you need to restart, then close apps, restart, and run the installer.
Properly set memory could look something like this:

10gr3-virtual-memory.jpg









 
 
 
 
 
 
 
 
 
 
 
 
 



Good luck with your 10gR3 installs!
 
Originally posted on http://blog.billbenac.com.

November 10, 2008

Spreadsheet to Generate Web Center Interaction (ALUI) URLMapping Entries

The URLMapping section of portalconfig.xml isn't the most elegant part of the ALUI portal configuration. You are required, for each URL you intend to support, to repeat a block of settings but with incremented index values. I'm working with a customer using dozens of URLMappings, and we realized there had to be a better way than updating these individually. Enter Excel.

I created two spreadsheets, and the one you use depends on your environment and preferences. The simpler

urlmapping-generator.xls
  creates a single mapping for each single URL you want to use, and this is what you would expect is required. However, as I wrote last year, there's a bug in how URLMappings are handled when a proxy or load balancer is involved, and the way to fix it is with an extra URLMapping. I have an advanced spreadsheet,
urlmapping-generator-proxybugfix.xls
for this situation, and it creates both the first mapping you would expect as well as the second mapping to handle the bug.

I hope this is helpful.

Originally posted on http://blog.billbenac.com.

August 27, 2008

Firefox Plugin Shows ALUI Portal Host Info

ALUIportalhost.jpg
Are you familiar with the routine of opening the HTML source of an ALUI portal page, scrolling to the bottom, and checking for the name of the host server? This is something I've done countless times in load balanced environments when trying to test or debug a server.

I decided to make a Firefox plugin that will extract that portal host information then display it at the bottom of the browser so that I can immediately see the portal host.

I've had several other people try this plugin, and they found it useful. I hope you'll find it helpful too. To install it, download the plugin, then drag it onto your Firefox browser. It's been tested on FF versions 1.5 through 3.1.

Enjoy!

Originally posted on http://blog.billbenac.com.

August 21, 2008

Configuring Proxies in ALUI Core Products

To access the public Internet from many enterprise environments, one needs to configure the browser on his or her laptop to go through a proxy server. Sometimes, this requirement applies as well to the servers that run ALUI as well. With a browser, it's a fairly straight forward point-and-clickety-clickety-click to enter the proxy information, but with ALUI products, it's more involved. It seems like I always need to check my old emails to find configuration instructions, so I'll post here to make it easier for me, and hopefully easier for you too.

Of the several core ALUI products, only a few need proxy information. Products like the Search or Document Repository server of course do not need to make requests to resources outside of the ALUI servers. The portal is the most obvious component for doing so. You might have a some portlets provide by Google for example that users should be able to access. The portal's proxy is configured by updating %ALUI_HOME%\settings\common\serverconfig.xml to use the following settings:

<component name="openhttp" type="http://www.plumtree.com/config/component/types/openhttp">
        <!-- Leave the following ProxyServer value blank if you have no HTTP Proxy Server. -->
        <setting name="openhttp:ProxyURL">
            <value xsi:type="xsd:string">http://www-proxy.myco.com:31060</value>
        </setting>
        <setting name="openhttp:ProxyUsername">
            <value xsi:type="xsd:string">
        </value>
        <setting name="openhttp:ProxyPassword">
            <value xsi:type="xsd:string">
        </value>
        <setting name="openhttp:ProxyBypassLocal">
            <value xsi:type="xsd:boolean">true</value>
        </setting>
        <!-- Use semicolon-separated list for local addresses, -->
        <!-- e.g., www.example.com;*.plumtree.com -->
        <setting name="openhttp:ProxyBypass">
    <value xsi:type="xsd:string">localhost;*.myco.com</value>
        </setting>
</setting></setting></component>

A less obvious component that should be configured for proxy access is the automation server.  In some cases, portal administrators and content managers may choose to create a job that runs a portlet web service as its operation. One reason to do this is to generate the HTML that comes from a slow-running dynamic portlet. Antoer reason to do this could be if the code behind an URL ran some job. The automation server uses the same proxy setting configuration that the portal does in %ALUI_HOME%\settings\common\serverconfig.xml.

Finally, the new Remote Portlet Service's RSS Reader needs a proxy configured in order to get feeds outside the enterprise. The settings are to be put in %ALUI_HOME%\remoteps\1.0\settings\config\wrapper.conf. In myco's case, the proper settings were:

wrapper.java.additional.22=-Dhttp.proxyHost=www-proxy.myco.com
wrapper.java.additional.23=-Dhttp.proxyPort=31060
wrapper.java.additional.24=-Dhttp.nonProxyHosts="localhost|*.myco.com"

It is important to follow the example settings in the file correctly. The nonProxyHosts setting needs to be in quotation marks, but the proxyHost and proxyPort should not be.

It is also important to not follow the example settings with regard to the setting number. The file suggests:

#wrapper.java.additional.19=-Dhttp.proxyHost=
#wrapper.java.additional.20=-Dhttp.proxyPort=
#wrapper.java.additional.21=-Dhttp.nonProxyHosts=

However, 19, 20, and 21 are used by previous settings, so the proper wrapper.java.additional numbers will be increased as shown in the myco example.

Enjoy!

Originally posted on http://blog.billbenac.com.

August 14, 2008

Why You Don't Need to Fuss with Portal Server Cache Settings

A colleague, Jeff, called today to ask about various performance-related items including ALUI portal caching.  Many people know that portlet developers and administrators can coordinate to control caching of portlet content. This lets the company news portlet content, for example, be fetched once in an hour into memory and then be shared between all users, while the paycheck content is fetched for each individual user. Less well known though is that the system administrator can tune how the portal server handles the cache. How many of those paychecks for example should be stored in memory before being replaced?

So Jeff and I chatted a bit about the options and effects of tuning portal server caching today. I was reminded of analysis I did at one customer which was interested in whether performance (on version 5.0.4) could be improved by using more of its spare portal server memory for caching. We found that it isn't worth the trouble to tune away from the default settings because the system works great out of the box. I believe the analysis applies to current versions as well.

I'm not writing this as a blind fanboy who sees nothing but the brilliance of the ALUI product. Rather, after a careful analysis, I realized the tunings really are fine. You'll probably agree with me when you consider how the portal caching works. Basically, the portal stores content in its cache based on how recently used it is. So the more frequently used content is, the more likely it is to regain its place on the top of the list of items to cache. When an item is infrequently used, it will be pushed down the cache list by other items and ultimately get pushed out. But this means that the most important content, the most frequently used, is always on the top of the list. All that content toward the bottom of the list doesn't get used frequently anyway, so who cares if it gets pushed out of cache? And if you triple the cache size, then you just store several times more unimportant content in cache.

If you never knew the portal cache settings could be tuned, then forget you read this post because it doesn't matter. But if you were casting about on the Internet looking for information about this topic, stop while you're ahead! Don't bother fixing what isn't broken. It would be better for you to tinker with your image server's content expiration headers for something that will really have impact.

caching-analysis-results.jpg
Want data? Feel free to
read the presentation 
I did on the results of my analysis. You'll see that when we tripled the cache size, we gained only insignificant reduction in requests to remote servers.

Originally posted on http://blog.billbenac.com.



July 29, 2008

Two ways to connect to the API Service through the EDK

I've seen a couple questions lately about ways to connect to the ALUI API Service. There are two ways to use the EDK to connect to the API server. Which way you connect depends on the intend of the specific application.

One way to connect is with a specific username and password. That works well if you need the API server to access information or do actions not necessarily available to the browsing user. Let's take the example where you want to report the number of portlets in the system.

If you want all users to see the total number of portlets including portlets they do not have access too, then you would specify a privileged user for the API connection so that it could query everything. This would be hardcoded or set in admin preferences.

If you want users to see only the number of portlets to which they have access, then you would make the API connection using the credential of the current user. This uses something called the login token, and it is obtained programmatically.

I'll give example code for both, but let me first say that in either case, a variable should be set in the web.config file. The API call will want to know where the PTHOME directory is, and that's is best set in web.config rather than hardcoded. So with either solution, this should be in web.config:

  <appSettings>
    <add key="pthome" value="i:\\apps\\plumtree"/>
  </appSettings>

Then either case, you'll grab that variable from your code.

So if you want to connect using a specific user (usually one with elevated permissions), then you would do it like this:

  // create a session to portal and connect
  string sAdminName = ConfigurationSettings.AppSettings["admin-name"];
  string sAdminPass = ConfigurationSettings.AppSettings["admin-pass"];
  string sPTHome = ConfigurationSettings.AppSettings["pthome"] + "";
  com.plumtree.openkernel.config.IOKContext context = com.plumtree.openkernel.factory.OKConfigFactory.createInstance( sPTHome + "\\settings", "portal");
  PortalObjectsFactory.Init(context);
  IPTSession session = PortalObjectsFactory.CreateSession();
  try
  {
           session.Connect(sAdminName,sAdminPass,null);
  }

The admin-name and admin-pass for a production application should be set with an administrative preference and retrieved through the EDK so that they are not visible in the source file.

And if you want to connect with the individual user's context, then do this:

  // connect a session
  string sPTHome = ConfigurationSettings.AppSettings["pthome"] + "";
  com.plumtree.openkernel.config.IOKContext context = com.plumtree.openkernel.factory.OKConfigFactory.createInstance( sPTHome + "\\settings", "portal");
  PortalObjectsFactory.Init(context);
  session = PortalObjectsFactory.CreateSession();
  // we'll use the context of the logged in user
  try
  {
            session.Reconnect(edk.GetRequest().GetLoginToken());
  }

I have a sample portlet application attached that uses the user's individual context to connect to the API service and gather some information. Its zip file is here. It has a folder called install-resources with some install instructions.

I hope that helps,

Bill