Archive for June, 2012

Validate WCI Search Server performance

Wednesday, June 27th, 2012

WCI Search is a fickle beast. In my opinion, it started as one of the most stable pieces of the Plumtree stack and has been losing steam since the AquaLogic days with Clustered Search. Nowadays, it seems even a slight breeze will bring the damn thing down and either needs to be restarted or rebuilt.

But, if you’re getting reports that “search is slow”, how do you quantify that? Sure, something like Splunk would be useful for event correlation here, but we can build a pretty clear picture with what we’ve already got. And, I’m not talking about WebCenter Analytics – although that is possible too by querying the ASFACT_SEARCH tables.

Instead, let’s try to get the information from the log files. First, if you look at an entry for an actual search query in the search log files at \ptsearchserver\10.3.0\\logs\logfile-trace-*, you’ll see lines like this:

See it? There’s a line there that looks like this:

<request client="" duration="0.015" type="query">

So although there is no timestamp on that line, if we can isolate that line over a period of time and parse out the “duration” value, we can get a sense of whether the search server is slowing down or if we need to look elsewhere.

I did this using my old friend UnixUtils, and ran a simple command to spin through all the search log files and just find those lines with the phrase type=”query” in it:

cat * | grep "type=\"query\"" > ..\queryresults.txt

The “duration” value can then be parsed out of those lines, and we can produce a nice purdy chart for the client that says “indeed, it seems searches that used to be taking 100ms are now running around 1s, so we should dig into this”:

IPv6: The Internet’s bottomless pit of IP addresses

Saturday, June 23rd, 2012

Doing a lot of government contract work, the question of whether WebCenter Interaction supports IPv6 or not comes up quite a bit. In the coming weeks I’ll write more on this topic, but I thought I’d just get this party started with a bit of a fact check in simple bullet form. It turns out that the question isn’t really whether WebCenter Interaction supports it, but whether your NETWORK supports it. Here are some facts to get us started, and stay tuned to our IPv6 updates for more information on the topic in the coming weeks.

  1. IPv4 – the nnn.nnn.nnn.nnn addressing scheme we’ve all come to know and love is running out of space – there are only so many combinations of numbers, and we’re pretty much out of them.
  2. IPv6 is the new version of the addressing scheme that contains a virtually unlimited supply of addresses.
  3. The world is adopting this new scheme VERY slowly – the country with the HIGHEST adoption rate – Norway – has only 50% penetration.

  4. The US Government has mandated that the federal government must transition to IPv6 by the end of FY 2012 (that’s September!).
  5. Even if we were able to convert all sites to supporting IPv6, the vast majority of clients still won’t work with this new addressing scheme. Browser compatibility and operating system support are very strong – you most likely have a supported browser and OS. The problem is that the NETWORK just isn’t there: most likely your ISP doesn’t support it yet, and it’s possible that your network hosting provider doesn’t either!

In other words, as a systems administrator the job is mostly out of your hands – you need the network guys to catch up on this one. That means DNS entries, hardware upgrades, and routing changes – all of which take time. The coming posts will mostly focus on the SYSTEMS side of the equation – how do you make your portal work with IPv6? – and you’ll be surprised how easy your job is compared to the NETWORK side.

Telnet to a port to see if a service is running

Wednesday, June 20th, 2012

We’ve talked about telnetting to a port before, so I’ll make this a quick one: Telnet can be a useful tool for making sure that a service is running and can be accessed from a particular server.

TCP communications – whether they’re web requests, mail transport, or WebCenter Interaction Services such as search – use the same transport layer that requires two IP addresses and two ports. You probably already know the necessary IP address of your servers, and don’t need to worry about your own IP and port (which is chosen automatically by the operating system), but once you identify the remote port of the service you want to check, it’s pretty easy to confirm that a service is at least responding.

Recent versions of Windows don’t install the telnet client by default, but if you go to the Control Panel and find “Turn Windows Features On and Off”, you can turn on the telnet client in Windows 7 (it’s under “Add/Remove Programs” in previous versions:

Once the Telnet client is installed, just open a command prompt and type:

telnet <server> <port>

For example, you can check that this site is responding on port 80 (the default HTTP port) by running:

telnet 80

Once you do, you’ll get a blank screen, and you can start typing commands the conform to the HTTP protocol, such as:

GET /site/integryst.i

The details of confirming the behavior are beyond the scope of this post, but the key thing you should take away is that if the screen goes blank when you type the telnet command, the server is responding. If you get a “Connect Failed” message, that means your machine couldn’t connect – and it’s likely that other services in your infrastructure can’t either.

And, if you do get that blank screen, you can exit out of the telnet session by hitting CTRL-] to get to the telnet prompt, then type “quit”.

Running WebCenter Interaction on 64-bit Windows

Monday, June 18th, 2012

Technically, WCI 10gR3 and previous versions aren’t supported on 64-bit Windows. WebCenter Interaction 10gR4 does support 64-bit, but not every item in the stack got a refresh (ahem, Publisher).

But, aside from this blog, which is running WordPress, the rest of this site has been running 10gR3 on Windows 64-bit without a problem. Everything pretty much installs normally, with the exception of the portal itself on IIS. In order to get that running, you’ll need to run a tweak or two. Specifically, you’re going to want to configure IIS to run 32-bit applications.

There’s a Microsoft Knowledge Base article on how this is done. Basically you just need to:

1) Enable 32-bit applications

cscript \inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 1

2) Install and register 32-bit .NET 2.0

\Microsoft.NET\Framework64\v2.0.50727\aspnet_regiis.exe -lk

3) Enable 32-bit .NET 2.0 in IIS Configuration manager

Don’t send portlet settings you’re not using

Friday, June 15th, 2012

A question came up recently about WCI Portlet Caching, and I thought I’d share with you a little side effect of the caching strategy for portlets.

As you can see in the documentation, portlet caching is pretty intelligent, and has been since the Plumtree days of the MPPE (Massively Parallel Portal Engine) through the Aqualogic User Interaction days of the PPE/LB (Parallel Portal Engine/Load Balancer). The docs basically say that the cache key is created based on the preferences that you send to a portlet.

Which, if you think about it, is really smart: If you’re not sending the user name to the portlet, then it’s likely that the portlet isn’t returning different content based on the user that’s logged in – and therefore you can have one cache entry for that portlet and all users. On the flip side, if you do have a particular preference or user information being sent, then that portlet is likely going to be returning user-specific content based on who’s viewing the portlet, so separate caches have to be maintained for each user.

In other words: to maximize the effectiveness of your cache by preventing cache-thrashing, don’t just blindly check all the boxes in the Web Service configuration. That way, the cache will be able to maintain as few versions as possible for as many users as possible.

There’s an App For That 10: LogAnalyzer

Monday, June 11th, 2012

A while back I suggested that you turn on response time monitoring in your IIS or Apache instances. But what good are log files if you can’t make sense of them?

If you’ve got the budget, I totally recommend Splunk for your data processing needs, but today’s App For That is a home-brew log parsing system that simply processes server logs and breaks down the response times by a time interval (such as 1 hour) and type (such as portal gateway requests or imageserver requests), calculating the number of hits and response time during that interval.

It’s a pretty simple .NET application that can process a large number of log files:

It also allows you to export that data for any particular filter to a .tsv so you can produce charts like this and really tease out some significant information:

We’ll be open-sourcing it soon, so stay tuned – or drop us a line and we’ll share it with you now.

Use Adaptive Tags to alternate row colors

Friday, June 8th, 2012

The ability to alternate row colors exists in the WCI portal style sheets, but it’s not completely obvious how to get nice alternating background colors where you’re rendering a list like search results.

There’s some documentation on how to create an adaptive layout Knowledge Base page that’s unusually comprehensive, and it sheds some light on a little trick: Adaptive Tags can do basic math with pt:logic.intexpr.

So for example, you could work your way through a $result list variable and run a mod operator on the index, which basically allows you to compute the remainder of a division operation. Which means, if you divide by 2 for every integer, the remainder will be zero half of the time and 1 the other half.

Using this nugget of knowledge, we can write code like this to alternately apply a background style color to each row of a table:

<pt:logic.intops pt:expr="($result.rank) % 2" pt:key="remainder" />
<pt:logic.intexpr pt:expr="($remainder) > 0" pt:key="isOdd" />
<pt:logic.if pt:expr="$isOdd">
		<tr height="25" class="listText listItemOneBG">
		<tr height="25" class="listText listItemTwoBG">

Credit to Rick Ptasnik for sharing this code a couple of years ago!

Disconnect Terminal Service Sessions Remotely

Wednesday, June 6th, 2012

No doubt you’ve spent some time managing your servers remotely via Windows Terminal Services, and have run into this error:

“The terminal server has exceeded the maximum number of allowed connections”

In all likelihood, someone probably just forgot to disconnect their session, but now that you can’t get in there, how do you log them out? One option is to log into a different system, then open Control Panel: Administrative Tools: Terminal Services Manager. Next, open Actions: Connect to Another Computer, and you’ll see the active connections for that system. You can then bump off the disconnected sessions by right-clicking them.

Two other options:

  1. Use the command-line
  2. Log in as the console user with a command like this, which will open a session that’s very similar to what you’d see as if you were standing in front of the machine. Anyone else logged in as console will be booted out.
  3. mstsc /v:serverName /console

Cool Tools 23: Splunk

Monday, June 4th, 2012

Chances are you’re drowning in log data, and aren’t really getting the most out of the information you’ve already got readily stored away on your portal servers. There really is a treasure trove of log information already there, but unless you’ve detected a problem with your infrastructure, you likely don’t even look at that data.

Splunk is touted as “the Engine for Machine Data” and is an incredibly powerful tool for analyzing logs and other activity within your infrastructure in real-time. It has a powerful search capability, the ability to display dashboards, and reporting capabilities that can alert you to problems before they become outages.

It works by indexing data from virtually any source that you have – files, event logs, email, etc. – and allowing you to query or produce all kinds of amazing information.

But don’t take my word for it – check out their site excellent YouTube channel for all kinds of great videos explaining just how powerful a tool this is.

Rest APIs in Oracle WebCenter Interaction

Friday, June 1st, 2012

Here’s something I hadn’t really stumbled across before: Oracle added REST APIs to WebCenter Interaction 10gR3. You can use these APIs to do basic Knowledge Directory manipulation, User management, and Activity Stream updates.

Unfortunately, the documentation is weak, the interfaces aren’t comprehensive, and you’ll get a lot more bang for your development buck by just sticking to the Server APIs, or even the IDK. If you want to hazard a look, though, it seems there’s some Javascript included with the portal in the imageserver that you can check out:

Too little, too late for this I’m afraid. As WCI fades away, it’s clear this mechanism for interacting with portal objects will never reach widespread adoption.