Monday, October 31, 2011

Archive Viewer Installation Error on IIS 7

A customer recently experienced an issue installing Instant Archive Viewer 4.0.82.  When clicking the button on the install launcher to install Archive Viewer, the installer will appear to hang for a few seconds, before reporting that the installer was interrupted.

To pinpoint the error, we had to enable logging in the MSI.  Since the installer msi requires administrator rights, we need to run cmd as an administrator.  The easiest way to do this is to enter cmd.exe into the start search box, and then press CTRL+SHIFT+ENTER.

This will bring you to the trusty command prompt.  You'll need to navigate to the directory to which you have downloaded the installer package for Instant Archive Viewer.  Once there, type:
cd "Instant Archive Viewer for OCS"
msiexec /i  InstantAV4.msi /lv log.txt
 The installer will once more fail to run, but this time it will generate a log of all the actions it undertook before failing.  Open log.txt in notepad or your text-editor of choice.  It will look something like this:

 The file should end in something similar to the following (There may be more or less detail).
Action start 13:14:57: WEBCA_SetTARGETSITE.
INFO   : [10/31/2011 13:14:57:873] [SetTARGETSITE                           ]: Custom Action is starting...
INFO   : [10/31/2011 13:14:57:874] [SetTARGETSITE                           ]: CoInitializeEx - COM initialization Apartment Threaded...
ERROR  : [10/31/2011 13:15:27:943] [SetTARGETSITE                           ]: FAILED: -2146959355
ERROR  : [10/31/2011 13:15:27:945] [SetTARGETSITE                           ]: Custom Action failed with code: '5'
INFO   : [10/31/2011 13:15:27:946] [SetTARGETSITE                           ]: Custom Action completed with return code: '5'
CustomAction WEBCA_SetTARGETSITE returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
Action ended 13:15:27: WEBCA_SetTARGETSITE. Return value 3.
Action 13:15:27: FatalErrorForm. 
Action start 13:15:27: FatalErrorForm.
 What Does This Mean?

This error message, cryptic though it may be, reveals that IIS compatibility services for IIS6 in IIS 7 are either not installed, or are not working correctly.  Instant Archive Viewer relies on these compatibility services to run.   Fortunately, it is simple enough to install these services.

Go to Control Panel -> Programs and Features and select Turn Windows features on and off.

On Server 2008, this will open Server Manager.  Expand Roles, then right-click on Web Server (IIS) and select Add Role Services.

Locate Management Tools, and check IIS 6 Management Compatibility.  Click install.  You may now proceed to installing Instant Archive Viewer.

Wait, That's Already Installed...

If these services are already installed, but you cannot install Archive viewer, then you'll need to check that all IIS services are running, particularly IIS Admin Service.

Open Control Panel -> Services, and locate IIS Admin Service.  Right-click and select Start.  If the service started correctly, you should now be able to install Archive Viewer.

Service Won't Start...

You're going to have to open Event Viewer.
Select Windows Logs -> System in the sidepane, and look for the last error caused by Service Control Manager.

If you see this error code, then it means that IIS has a corrupted metabase file.  It is unclear what could cause the metabase file to be corrupted, but, as it acts as a central store of configuration information in IIS 6, it is essential in order to run IIS Admin Service.  Fortunately, it is relatively easy to repair.

Open Windows Explorer.  Navigate to C:\Windows\System32\inetsrv

Locate MetaBase.xml and MBSchema.xml.  There may also be a file called MBSchema.bin.00000000h.

There should be a folder called History.  This folder contains backups of MetaBase.xml and MBSchema.  Select one of each, with matching revision numbers (For instance, MBSchema_0000000021_00000000.xml and MetaBase_0000000021_00000000.xml), and rename them to MetaBase.xml and MBSchema.xml.

Copy these two files to C:\Windows\System32\inetsrv, overwriting the existing files.  If the MBSchema.bin file exists, delete it.

Open cmd and enter the following to restart IIS:
You should see:
Attempting stop...
Internet services successfully stopped
Attempting start...
Internet services successfully restarted
 You should now be able to install Instant Archive Viewer.

Thursday, October 27, 2011

Locate License Key and Debug Info for Buddy List Administrator

Instant's Buddy List Administrator is managed using a Lotus Notes database.  The database provides the UI to manage typical Lotus Sametime buddy list management functions (renaming users, deleting users, pushing contacts to a user's buddy list, etc..)

View License:

In certain cases, you may need to review or update the license key.  The license key is available by
  1. Opening the database using a Lotus Notes client
  2. Clicking the 'Settings' option on the left navigator
  3. This will display a view of server configurations
  4. At the top of the view (in the actions bar) the 'Update License' button will display the current license information

View Debug Logs

In order to help troubleshoot certain types of issues, it may be useful to send Instant certain log files - typically if an activity does not process correctly.

The Activity Logs area will provide a list of all of the activities that have been processed by the system.

Click on Activity Logs
Select Activity Logs By Date
Select a log document
Open the log document
Click on the 2nd tab and either mail instant the debug document or copy the debug text and mail the debug text to Instant

Here is a debug page - showing status for the activity

Here is the debug page - after selecting the 2nd tab

Enable Server Console Output

In order to see all of the output from the console out, you can enable the console output in the server configuration settings document.

Thursday, October 20, 2011

Automatically Create Sametime Rename Request

Instant's Buddy List Administrator is a Lotus Domino based application that manages Sametime contact lists at a server level.  The Buddy List Administrator has the ability to perform a variety of functions against any contact list on the Sametime server.  For example, the application can:
  • Rename a user within Sametime and automatically update all contacts list that reference the user
  • Delete a user across all Sametime contact lists
  • Add a public or private group to a user's contact list
All of the configuration and activity records for the Buddy List Administrator (BLA) are maintained as unique Lotus Notes documents within the BLA activity database.

Some customer have created systems to automatically populate activity records in order to integrate the BLA with their internal environment.  For instance, to automatically create activity requests to pro-populate a Sametime buddy list whenever a new employee is provisioned with Sametime. 

Instant has also developed integration with AdminP in order to automatically create certain Sametime buddy list activities based on requests with AdminP (i.e. rename requests or user deletion requests)

It is possible to automatically create these BLA activity records (i.e. a Lotus Sametime user rename request) by creating a new document and populating document fields.

 ' The client UI agent will create a new activity document with a type ‘Rename a User’
 Set newDoc = g_db.CreateDocument
 Set item = newDoc.AppendItemValue("mapping_ActivityType", "6") ' 6 = "Rename a user
 newDoc.appendItemValue "Form", "ConversionMapping"

 ' let's give the document a name
 newdoc.AppendItemValue "mapping_DocumentName", "Rename a ST user  " + STUserName + " to LCS " + LCSUserURI

 newDoc.AppendItemValue "mapping_Comments", "Created by automated remapping facility"
 newDoc.AppendItemValue "Mapping_rename_OldName", STUserName
 newDoc.AppendItemValue  "Mapping_rename_NewName", LCSUserURI

 ' Make this newly renamed user as an external user
 newDoc.AppendItemValue "Mapping_Rename_IsMarkAsExternal", "1"

 ' Specify that we should search the buddy lists index database
 If Len(searchFieldString) <1 Then
  newDoc.AppendItemValue "Mapping_SearchFilter_Custom", STUserName
  newDoc.AppendItemValue "Mapping_SearchFilter_Custom", searchFieldString
 End If

 newDoc.AppendItemValue "mapping_userTypeSelection", "6"

 ' write out the activity as string value so we can tell from various views the type of activity
 newDoc.AppendItemValue "mapping_ActivityAsString", "Rename a user"

 Call newDoc.ComputeWithForm(False,False)