• Get the Flash Player to see the slideshow.
  • Categories

  • Authors

  • Great Quotes

    Whatever you can do or dream you can, begin it. Boldness has genius, power and magic in it! — Goethe

Get in touch...

To have a chat about
your CMS needs...

Call us 0207 193 2014
or
Email us on

Author Archive

OpenDeploy Error – User name from csContextString is blank

Saturday, January 10th, 2009

Problem

Had a really tricky problem where workflow was not calling OpenDeploy and giving an error “User name from csContextString is blank”.

Potential Solution

Do the following

1. /usr/iw-home/bin/iwsessionkeygen and then check in /usr/iw-home/private/etc that the passphrase file has a recent time stamp

2. Run the new version of this /usr/iw-home/CSF/AccessService/bin/iwsharedkeyfilegen

3. Then re-start the iwaccess service in /etc/init.d/iwaccess stop and /etc/init.d/iwaccess start

4. /usr/iw-home/bin/iwreset -a

Errors

The below was in the workflow errors:

API: 2008-12-03 17:11:35 GMT+00:00 ***WARNING – User name from csContextString is blank or null,
request app: APP_WORKFLOW

OpenDeploy Status Unknown. FAILED. Locating OpenDeploy service. Got OpenDeploy service
***ERROR – Caught exception in runIt(). Details: REQUEST_DENIED message:
REQUEST_DENIED Request denied: NO_USER_NAME Item: ,
Details: Got blank or no user name from CSContextString at
com.interwoven.deployapi.deploy.IWODServerAction.
getODAPIServerVersion(IWODServerAction.java:1437)
at com.interwoven.deployapi.deploy.IWODServerRemoterImpl.
getODAPIServerVersion
(IWODServerRemoterImpl.java:363) at

etc…

com.interwoven.ui.teamsite.workflow.task.URLExternalTaskCommand.execute
(URLExternalTaskCommand.java:109) at com.interwoven.ui.base.impl.command.
CommandHandler.doExecuteCommand(CommandHandler.java:917) at
com.interwoven.ui.base.impl.command.CommandHandler.
tryRunCommandDescriptor
(CommandHandler.java:753) java.lang.Thread.run(Thread.java:595)

Please check that the OpenDeploy server is running. [wasadm: 12/3/08 5:59:20 PM ]

etc…

ilog Rules Preventing OpenDeploy Deployments

Saturday, January 10th, 2009

Problem

OpenDeploy deployments are failing with the following type of errors:

Error during task execution: Production Deployment, message:
java.lang.NullPointerException *** START STACK TRACE ***
com.interwoven.livesite.rules.ilog.RuleSession.
<init>(RuleSession.java:77)
com.interwoven.livesite.rules.ilog.RuleSession.getContentSession
(RuleSession.java:285)
com.interwoven.livesite.rules.ilog.RuleAppUtils.getContentRuleAppArchives
(RuleAppUtils.java:221)
com.interwoven.livesite.rules.ilog.RuleAppUtils.getContentRuleApps
(RuleAppUtils.java:196)
com.interwoven.livesite.opendeploy.impl.OpenDeploymentServiceAdapter.
buildDeployment
(OpenDeploymentServiceAdapter.java:154)
com.interwoven.livesite.opendeploy.impl.OpenDeploymentServiceAdapter.
buildDeployments
(OpenDeploymentServiceAdapter.java:222)
com.interwoven.livesite.opendeploy.impl.OpenDeploymentServiceAdapter.
buildDeployments
(OpenDeploymentServiceAdapter.java:55)
com.interwoven.livesite.deployment.impl.BaseDeploymentService.
buildDeploymentList
(BaseDeploymentService.java:213)
com.interwoven.livesite.deployment.impl.BaseDeploymentService.deployFiles
(BaseDeploymentService.java:85)
com.interwoven.livesite.workflow.task.DeploymentTask.deployFiles
(DeploymentTask.java:82) *** END STACK TRACE *** [user: 12/15/08 1:56:11 PM ]

Potential Solution

Re-start the TeamSite Services including the rules service, it might be hung due to a port conflict or other issue.

SitePublisher Sitemap not loading

Saturday, January 10th, 2009

Problem

The Site Publisher Sitemap is not loading in the user interface.

Potential Solution

Reset the user interface services via the iwreset -ui command (e.g) /usr/iw-home/bin/iwreset -ui

Errors seen

(Error in Action)
javax.servlet.ServletException: Java heap space
        at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:294)
        at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:187)
        at com.interwoven.livesite.common.web.action.BaseAction.execute(BaseAction.java:273)
        at com.interwoven.livesite.web.LivesiteAction.execute(LivesiteAction.java:78)
        at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
        at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
        at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
        at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at com.interwoven.livesite.spring.hibernate.web.filter.OpenSessionsInViewFilter.doFilterInternal(OpenSessionsInViewFilter.java:141)

 

OpenDeploy Deploy and Run Return Codes

Wednesday, October 8th, 2008

I really struggled to find these documented so had to refer back to the 6.0 OpenDeploy manuals to find the below information.

Return Code Name Description
-2 LOG_ELEMENT_ABORT The result of the action was to signal the deployment to do a hard abort in which the deployment stops immediately. If the deployment was transactional, the files on the production server will be returned to their original state
-1 LOG_ELEMENT_ERROR The action returned an error
0 LOG_ELEMENT_OK The action returned a satisfactory result and the item should be printed to STDOUT in all cases.
1 LOG_ELEMENT_OK1 The action returned a satisfactory result which should be printed out to STDOUT if the verbosity level is set to “normal”
5 LOG_ELEMENT_OK5 The action returned a satisfactory result which should be printed out to STDOUT if the verbosity level is set to “verbose”

Fixing the OpenDeploy “IWDirent::Mkdir failed” error

Wednesday, October 8th, 2008

Whilst running an OpenDeploy deployment that usually works no problem, I encountered the following below error.

"ERROR: IWDirent::Mkdir failed, err=30"
ERROR: /iwmnt/default/main/www/example/WORKAREA/Content 
could not be created. 
ERROR: Failed deploying local_directory[0] (/iwmnt/default/main
/test/WORKAREA/Content) to (/iwmnt/default/main/www/
example/WORKAREA/Content) 
ERROR: Failed 1 of 1 local_directories

SOLUTION

I created the target “Content” workarea in the above case and then this worked!

I think it is pretty obvious but someone / thing had deleted the “Content” workarea that OpenDeploy was configured to deploy too and so the “mkdir” was failing, presumably because of permissions.

If you try to create the directory that OpenDeploy is trying to deploy to this may resolve the above issue for you.

Fixing “An error occurred while getting the page”

Friday, October 3rd, 2008

If you get the below issue when trying to edit or view a page in LiveSite then check whether the server has run out of disk space:

“An error occurred while getting the page”

In the servlet_out.log file you may also see the following:

"Caused by: com.interwoven.livesite.common.business.BusinessException: Failed to get page //snt2k020/default/main/UK/WORKAREA/Content/sites/one/home.page
 
        at com.interwoven.livesite.business.BusinessPage.getTemplate(BusinessPage.java:771) 
        at com.interwoven.livesite.business.BusinessPage.getPage(BusinessPage.java:636) 
        at com.interwoven.livesite.business.BusinessPage.verifyChecksum(BusinessPage.java:188) 
        ... 40 more 
Caused by: java.io.EOFException 
        at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2228) 
        at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2694)

and in the /var/adm/eventsubd.log you may see the following

"Error: CRITICAL: page header magic for block 1 not OK 0"

The most likely cause is a problem with the /iw-home/eventsubsystem/openjms.db file.

Move this file to another area (it may be very large and have taken up 100% disk space under iw-home – you can check this by doing a ‘df -k’ command and looking at the results)

Also delete openjms.lock and openjms.lg in the same folder.

Re-start TeamSite and it should re-create this file (it may be the same size when you “ls -la” but on disk iw-home is no longer at 100%.

We think this is due to the service “reserving” the space that was previously used.)

If you want to reduce the amount of “claimed” disk space you should delete any “.0″ files under “/iw-home/loacl/logs/iwevents” folder and restart TeamSite (/etc/init.d/iw.server stop) and then (/etc/init.d/iw.server start).

Removing newlines in XSL

Friday, October 3rd, 2008

Thansk to Mark Stradling for this tip, the below little template is useful to remove new lines using XSL:

<xsl:template name="removelines"> 
  <xsl:param name="text" /> 
  <xsl:value-of select="translate($text,'&#x0A','')" /> 
</xsl:template>

Change a word in many files

Saturday, September 27th, 2008

The below one liner will open all files in its path and change the word ‘MOO’ in any of the files to the word ‘BOO’.

find . -type f | xargs /usr/iw-home/iw-perl/bin/iwperl -i -p -e 's/MOO/BOO/g;'

This script has only been lightly tested so please make a backup of your files before running this!

Find all Branches in TeamSite

Thursday, September 25th, 2008

The below script will look through all the branches in a TeamSite file system and simply list only the branches, not workareas or files and so on.

This script is by no means optimised and could run alot faster by doing checks in the “wanted” sub routine, but it does the job :)

This is useful when running ‘iwmigrate’ and other such tools recursively.

From the command line run the script passing the parameter of the top level branch to search from

Example Usage:

c:\temp\find_all_branches.ipl y:\default\main

#!C:\Perl\bin\perl.exe -w
 
use strict;
use File::Find;
 
my ($area) = @ARGV;
my(@branches, $branch, $directory, @allDirectories);
 
find(\&wanted, $area);
		foreach $directory(@allDirectories){
			if (-d $directory){
				next if ($directory =~ "WORKAREA" || $directory =~ "STAGING" || $directory =~ "EDITION");
					push @branches, $directory;
				}
			}
 
foreach $branch(@branches){
					print "Branch: $branch\n";
				}
 
sub wanted {
	push @allDirectories, $File::Find::name;
	return @allDirectories;
}

The output the script produces is a list of every branch it finds, such as:

Branch: c:\TEMP\branches
Branch: c:\TEMP\branches/default
Branch: c:\TEMP\branches/default/main
Branch: c:\TEMP\branches/default/main/test
Branch: c:\TEMP\branches/default/main/test/sub-branch

A simple log in Perl

Tuesday, September 23rd, 2008

I know this is really easy but I get asked it so often, I thought I would note it down.

The best way to create a log file from Perl is to use log4perl, but it has a bit of a learning curve so try the simple approach for now which is as follows:

open (LOG, ">C:\\Interwoven\\Teamsite\\local\\logs\\mystuff\\debug.log");
 
     print LOG "Starting Program...\n";
 
close LOG;

Anything you wish to write to the log, simply use the ‘print’ statement and you are away :)