Introduction
In Documentum applications, the speed at which users can retrieve or add content to the system plays a big part in the overall end user experience. Network latency and bandwidth restrictions, physical architecture and client configuration all have an impact on the time it takes between initiating a content transfer, performing the upload or download, and returning control back to the user.
This document will discuss various tuning options available to achieve the best possible performance for UCF content transfer in your network environment.
Overview of UCF
UCF (Unified Client Facilities) is the EMC Documentum framework for performing content transfer between the client and content servers over HTTP. It provides many features that extend beyond simple file transfer protocol, such as:
Content compression to optimize transfers of larger files over the network
Support for complex documents, such as XML files
Support for compound document types, such as OLE objects inside a Microsoft Office document
Awareness of locally downloaded files, and the ability to avoid downloading the same content twice
Registry support, to allow checkout from one application and check in from another
Recoverability in the case of a brief network interruption
Location aware, to allow users to transfer content from the closest ACS or BOCS server
High-Level UCF Operations
When a content transfer is initiated, the UCF client running on the end user machine is initiated if it is not already running. The applet loads the UCF client jars and initiates contact with the UCF server, running on the application server.
The UCF client and server pass information back and forth about the environment and requested action before content is transferred between the two machines. Depending on the architecture and configuration, content may be transferred through the application server, directly to or from an ACS server on the content server, or a BOCS server located near the user.
After the content transfer is complete, there will be some additional communication from server to client to provide instructions on registry entries to be added or modified, directions on how to launch the appropriate application for view or edit operations, or instructions on how to delete the local file on check in.
Optimizing UCF for Best Performance
Tip #1 - Use ACS and BOCS for Content Transfer Whenever Possible
The introduction of ACS and BOCS servers in 5.3 SP1 have allowed content transfer to be performed directly from the content server, rather than requiring that the content always pass through the application server. This not only removes the double-hop that is required (which is very costly for small files) but also reduces the load on the application server.
In the 5.3 timeframe, ACS and BOCS could only be used for download operations such as checkout, export and view. All upload operations still passed through the application server.
From D6 onward, ACS and BOCS servers can also be used for upload operations.
Note that not all applications are network location aware and able to take advantage of remote ACS and BOCS servers.
Tip #2 - Optimize UCF Client Initialization
In 5.3 SP1 through SP5, D6 and D6SP1, the UCF client engine will time out after one minute of inactivity, and the javaw.exe process would be terminated. This means that if a user initiates another content transfer request after the timeout has occurred, the browser must re-initialize the UCF client and restart javaw.exe.
This value can be increased in the ucf.client.config.xml file as follows:
Edit the ucf.client.config.xml file (located at C:\Documents and Settings\
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true"
socketBuffer="64000"/>
If you are using 5.3 ACS and BOCS the application server is Tomcat 5.0.28. In versions 5.3 SP1 or SP2, you will need to add the socketBuffer parameter. In 5.3 SP3 through SP6, this parameter should already have been added by the installer.
In 6.5 and beyond, Jboss is the container for ACS and BOCS. In 6.5 SP1, enhancements were added to the embedded Jboss server to enable it to recognize and use the socketBuffer parameter.
BEA Weblogic
If you are using BEA Weblogic as your application server and you are not using ACS, be sure to add the -Dweblogic.ChunkSize parameter. By default, the ChunkSize is 4k which is much too small.
It can be set in the config.xml for the domain:
It can also be defined in the set_domain_env batch file with the other JAVA_PROPERTIES values:
set JAVA_PROPERTIES=-Dplatform.home=%WL_HOME% \
-Dwls.home=%WLS_HOME% -Dwli.home=%WLI_HOME% \
-Dweblogic.Chunksize=64000
In D6 and D6 SP1, the application server that hosts ACS and BOCS is BEA Weblogic, and the installer has automatically added those options to the script that starts the embedded Weblogic server (startMethodServer.cmd for example).
IBM Websphere
If you are not using ACS and content is being transferred through WAS, then you may see improvements in content download performance for large files by modifying the ResponseChunkSize configuration parameter in the plugin-cfg.xml.
where N equal the chunk size in kilobytes. The default value is 64 (kilobytes).
Tip #6 - Improve Upload Performance in D6 and Above
In D6, a parameter was added to the ucf.client.config.xml file that allowed the users to specify a chunk size to be used when uploading content.
Internal testing showed that a value of 49152 worked best with ACS on BEA when simulating various WAN conditions. However, in environments where customers are not using ACS write, or whose network conditions are different from that which was tested, this value may not be optimal. Increasing or decreasing the optimal.chunk.size parameter based on your specific network conditions can be beneficial.
Note that this setting is ignored if the client is using Sun Java version 1.6 due to a Java bug (http://bugs.sun.com/bugdatabase/view_bug.do"bug_id=6631048).
Tip #7 - Use Adaptive Parallel Content Transfer to Consume More Available Bandwidth
By default in most versions of UCF, content download operations will be done in a single thread. If sufficient network bandwidth is available, the download operations could perform significantly faster if the file was broken up into smaller pieces and transferred by multiple concurrent threads.
In 5.3 SP6 and D6.5 the UCF client can be configured to use multiple threads when downloading files. This is controlled in the ucf.client.config.xml file using the following parameters:
The "max.parallel.download.streams" parameter limits the number of threads that can be run concurrently when performing a parallel download. In this example, 5 separate streams could potentially be initialized. If one of the streams finishes their assigned task ahead of the others, it is then free to request a new range of bytes to be downloaded.
The "min.parallel.segment.size" parameter specifies that if the remaining portion of a document after a byte range is assigned is smaller than a specified value, it should not be assigned to a new thread. Rather the original thread's byte range should be extended to include those additional bytes. For example, if a thread is supposed to download 500Kb of a 600Kb file, as the remaining number of bytes is less than 128k, no new thread will be started and the original thread will assume ownership of those additional bytes.
The "Adaptive" part of parallel content transfer is controlled by the remaining two parameters. As tests have shown that disk I/O actually becomes a bottleneck and degrades performance if the content is transferred in parallel over LAN conditions, it is important to be able to control when the parallel content transfer is actually turned on. In this case, the UCF client will measure how many bytes were transferred initially by a single thread within a specified timeframe. If the number of bytes is less than what it expected, parallel content transfer will be turned on. If it is more than was expected, then it is assumed that bandwidth and latency are sufficient for a single thread to transfer the content most efficiently.
In the example above, the UCF client will measure the number of bytes that have been downloaded in the first 300ms of transfer (or as close to that time as possible). It will enable parallel content transfer if less than 131072 bytes (128k) have been downloaded, and disable it if more than 128k has been downloaded.
If your remote users have very high latency, it is likely that you will want to increase the "measurement.time.interval" to match the round trip time plus time to download a small portion of the file. For example, if you have 200ms round-trip latency, you might consider increasing the measurement.time.interval to 500ms to compensate for the time it takes for the request to reach the ACS server and start the content transfer.
In order to permanently disable parallel content transfer, all that must be done is changing the "max.parallel.download.streams" to 1, or decreasing the "single.thread.throughput" to a very small number, such as 1. In this case, regardless of the actual throughput, parallel content transfer will not be used. This is especially important in load testing scenarios, where many clients are being simulated from the same client machine.
Tip #8 - Tuning Content Download when Documentum User Directory is on a Network Drive
If the location of the Viewed and Checkout directories are on a network drive, or users regularly export content to a network drive, performance can be improved by setting the value of "ucf.file.buffer.size" to a larger number. The default value is 32768.
To set it for a single user, simply add the following to the ucf.client.config.xml on the client machine:
To set the default for all users, add the same option to the ucf.installer.config.xml file on the application server and force a new version of UCF on the server side using the steps in Appendix B.
Tip #9 - Use UCF Client Logging to Measure performance
UCF Client logs are extremely useful when diagnosing UCF performance.
UCF client logging is enabled on the end user's machine.
Edit the ucf.client.logging.properties file, located at:
C:\Documents and Settings\
For best results, set the log level to FINEST, as shown below:
handlers=java.util.logging.FileHandler, java.util.logging.ConsoleHandler
.level=FINEST
#-------------------
java.util.logging.FileHandler.pattern=C:/Documentum/logs/ucf.client%u.log
java.util.logging.FileHandler.limit=10485760
java.util.logging.FileHandler.count=10
java.util.logging.FileHandler.formatter=java.util.logging.SimpleFormatter
java.util.logging.FileHandler.encoding=UTF-8
#-------------------
java.util.logging.ConsoleHandler.level=OFF
java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter
In addition, to prevent the UCF client log from overwriting itself each time, change the value of java.util.logging.FileHandler.count to a number greater than 1. As each new client initializes, the old logs will be renamed and preserved for further analysis.
In the UCF client logs you will see entries such as "Logging request: getFile" and "Handled request: getFile" with timestamps. This can be used to better measure the time taken in the UCF pre-processing, content transfer and post-processing phases.
Appendix A:
Reduce the Effect of On-Access Scanning on UCF Initialization and Other Java Applets After Reboot
Right-click on the VirusScan icon in the system tray and choose "On Access Scan Properties.
Click on All Processes.
Click on Advanced.
Ensure "Scan inside archives" is NOT selected.
Click on the Detection tab.
Click on the Exclusions button.
Click on Add.
Add C:\Documents and Settings\s38737\Documentum\ucf , with "Also exclude subfolders", "On Read" and "On Write".
Click on OK to save.
Click Add to add another path.
Add C:\Program Files\Java with "Also exclude subfolders" and "On Read".
Click OK to save.
Appendix B:
Changing UCF Client Settings for All Users
1. Edit the
2. In this file, you will find the following line,
<"xml version="1.0" encoding="UTF-8"">
<"dctm fileVersion="5.3.0.1" compatibilityVersion="5.3.0.1"">
3. Change the highlighted text above from 5.3.0.XXX to 5.3.0.XXXa
4. Under the configurations tag, change or add the desired option.
The next time the UCF client engine is initialized on the client side, the new UCF settings will be downloaded and added to the ucf.client.config.xml file.
There may be cases where the "default" values in the ucf.installer.config.xml should not be applied to the client side. In this case, the "persistent" attribute can be added to the option on the client side. This will prevent any changes on the server side from being applied to that particular client.
If not specified, then persistent is set to false.
The persistent property can be specified on the ucf.installer.config.xml and in the ucf.client.config.xml. The following chart outlines the expected behavior:
Server Client Description
false false Server value will override client value.
true true Server value will override client value.
true true Server value will override client value.
false true Client value will not be overridden.
Commonly used DQLs for Documentum Admins. I update this blog whenever i get some good DQL to write , its for my personal reference as well as for other user if it helps anybody. Please use it at your own risk.
1- To see the audit trail for the particular user's login attempt to troubleshoot login related issues.
SELECT * FROM dm_audittrail
WHERE event_name='dm_connect'
AND user_name='user_name'
2- Group by clause by date to calcuate the number of documents create each day in the repository. Modify it accordingly as per your need.
select (DATEFLOOR(DAY, r_creation_date)) as r_MONTH , count(*)as cnt from amtrak_invoice where r_creation_date >= date('06/06/2011') GROUP BY (DATEFLOOR(DAY, r_creation_date))order by 1
Perl Script to automate starting and stopping applications for Documentum Suite on All Unix based platforms.
perl dmServices.pl
#!/usr/bin/perl
#########################WARNING-WARNING-WARNING#########################
# Use at your own RISK-please test it on your test environment before you
# jump onto the production .
#########################WARNING-WARNING-WARNING#########################
# Perl Modules required
# If you don't have these modules, this script will not run.
use strict;
use diagnostics;
use File::Basename;
use IPC::Open2;
use strict;
use diagnostics;
use Term::ANSIColor qw(:constants);
use vars qw (*INPUTP *PIPEOUT $CLIENTID $STOP $counter $path);
# Used to abort the script if set to 0;
$STOP = -1;
# Used for the data pipe
$CLIENTID = 0;
#$path = $ENV{'PWD'};
$path = "/tmp/docscript";
sub open_pipe
{
# Open the bi-directional data pipe which is very handy if
# we need to read the output from the command.
printf("Not working yet ... \n");
return;
my $cmd;
$cmd = $_[0];
$cmd='cd /opt;ls';
$CLIENTID = open2(\*PIPEOUT, \*INPUTP, $cmd);
if($CLIENTID == 0)
{ printf("CLIENTID = 0 ...\n");}
if((
{ printf("PIPE Connection Error - Must Abort\n"); exit(1);}
printf("PIPE OPEN\n");
}
sub close_pipe
{
# Close all connections
close INPUTP;
close PIPEOUT;
# Kill of the PIPEID process
if($CLIENTID != 0 && kill 0 => $CLIENTID)
{ kill 9 => $CLIENTID;}
waitpid($CLIENTID, 0);
printf("PIPE PID has been terminated\n");
}
sub pipecmd
{
# Commands run through the data pipe
# Takes the input string and pipes out to execute the command
my $str;
$str = $_[0];
# Signal handler in case the pipe is broken.
$SIG{PIPE} = sub {printf("PIPEN has been broken - must Abort\n");};
print INPUTP "$str\n";
}
sub create_path
{
if (! -d $path)
{
my $localcmd;
$localcmd = "mkdir -p $path";
system($localcmd);
}
if (! -d $path) {printf("$path could not be created.\n");exit(0);}
}
sub remove_path
{
if (-d $path)
{
my $localcmd;
my $dir;
$dir = basename $path;
$localcmd = "cd /tmp;rm -rf $dir";
system($localcmd);
}
}
sub promptUser
{
my ($promptString,$defaultValue);
($promptString,$defaultValue) = @_;
$promptString = "->" unless defined $promptString;
$defaultValue = "->" unless defined $defaultValue;
if ($defaultValue) {
print $promptString, "[", $defaultValue, "]: ";
} else {
print $promptString, ": ";
}
$| = 1; # force a flush after our print
# If no activity on the prompt for 2 mins then set the interrupt
# to alarm and we will exit.
eval
{
local $SIG{ALRM} = sub {printf("No activity for 2 mins - Doc Services aborts\n"); exit(0);};
alarm 120;
eval
{
$_ =
# Remove '\n'
chomp;
};
alarm 0;
};
alarm 0;
$_ = 'noentry' unless defined $_;
if($_ =~ /[a-z]/ || $_ =~ /[A-Z]/) {
# This is text;
return $_;
}
if($_ == 0) {return 0;}
if ("$defaultValue") {
return $_ ? $_ : $defaultValue; # return $_ if it has a value
} else {
return $_;
}
}
######################################################################
### Main
######################################################################
&input_handler();
exit(0);
######################################################################
### Subroutines
######################################################################
sub input_handler
{
my $done;
$done = 0;
my ($action, $indicator, $userid);
$userid = getpwuid($>);
while($done == 0)
{
system("clear");
&setupSigHdlrs();
$action =0;
printf("--------------------------------------------\n");
printf(" Welcome $userid to DOC SERVICES\n");
printf("--------------------------------------------\n");
if($userid ne "docinst")
{
printf("--> CURRENT USERID: $userid\n");
printf("---------------------------------------------------\n");
printf("WARNING: To perform maintenance activities on\n");
printf("DOCUMENTUM you MUST be logged in as userid: docinst\n");
printf("otherwise any processes you start or stop will not\n");
printf("operate properly.\n\n");
printf("**********YOUR SESSION IS BEING ABORTED.***********\n");
printf("---------------------------------------------------\n");
exit(0);
}
printf("Please choose one of the options:\n\n");
printf(" --> 1. START Documentum services.\n");
printf(" --> 2. STOP Documentum services.\n");
printf(" --> 3. QUERY Documentum processes.\n");
printf(" --> 4. START Application Server.\n");
printf(" --> 5. START Method Server.\n");
printf(" --> 6. STOP Application Server.\n");
printf(" --> 7. STOP Method Server.\n");
printf(" --> 8. QUERY JAVA Server Process.\n");
printf(" --> 9. START Oracle 10g Server.\n");
printf(" -->10. START Oracle DB Console.\n");
printf(" -->11. STOP DOCBROKER.\n");
printf(" -->12. START DOCBROKER.\n");
printf(" -->13. STOP FULLTEXT SERVER/AGENT.\n");
printf(" -->14. START FULLTEXT SERVER/AGENT.\n");
printf(" -->15. QUERY Index Node Controller.\n");
printf("--------------------------------------------\n");
printf(" --> QUIT: CTRL ^C\n");
printf("--------------------------------------------\n");
printf("--------------------------------------------\n");
$action = &promptUser("Enter numeric option: (1-14): \n");
&setenv_vars();
if($action == 1)
{
system("clear");
&startup_services();
}
elsif($action == 2)
{
system("clear");
&stop_services();
}
elsif($action == 3)
{
system("clear");
my $input = "query";
&terminate_processes($input);
}
elsif($action == 4)
{
system("clear");
my $input = 1;
&handle_apache_server($input);
}
elsif($action == 5)
{
system("clear");
my $input = 4;
&handle_apache_server($input);
}
elsif($action == 6)
{
system("clear");
my $input = 2;
&handle_apache_server($input);
}
elsif($action == 7)
{
system("clear");
my $input = 3;
&handle_apache_server($input);
}
elsif($action == 8)
{
system("clear");
my $input = "java";
&terminate_processes($input);
}
elsif($action == 9)
{
system("clear");
printf("Manually perform the following:\n");
printf(" --> su - oracle\n");
printf(" --> password: oracle1\n");
printf(" --> cd \$ORACLE_HOME\n");
printf(" --> bin/sqlplus /nolog\n");
printf(" --> connect SYS as SYSDBA\n");
printf(" --> oracle1\n");
printf(" --> startup\n");
printf(" --> quit\n");
}
elsif($action == 10)
{
system("clear");
printf("Manually perform the following:\n");
printf(" --> su - oracle\n");
printf(" --> password: oracle1\n");
printf(" --> cd \$ORACLE_HOME\n");
printf(" --> bin/emctl start dbconsole\n");
}
elsif($action == 11)
{
system("clear");
&stop_dmdocbroker();
}
elsif($action == 12)
{
system("clear");
&check_dmdocbroker();
}
elsif($action == 13)
{
system("clear");
&stop_fulltext();
}
elsif($action == 14)
{
system("clear");
&start_fulltext();
}
elsif($action == 15)
{
system("clear");
&get_nctrl();
}
$action = &promptUser("Would you like to exit
$action = lc($action);
if($action eq 'y')
{
printf("\n\n\n\n\nTHANK YOU FOR USING DOC SERVICES.\n");
$done = 1;
}
$action = 0;
}}
sub start_oracle
{
printf("Functionality not working yet ...\n");
# Will start the Oracle database or DBconsole
my $inputstr;
$inputstr = $_[0];
&open_pipe();
sleep(1);
&pipecmd("su - oracle;oracle1");
# Setup the environment variables
# $ENV{'ORACLE_HOME'} = '/opt/oracle/oracle/product/10.2.0/db_1';
if($inputstr eq "startup")
{
printf("Performing Oracle Startup ...\n");
# Send in the SQL commands to start up the database
&pipecmd("cd \$ORACLE_HOME;bin/sqlplus /nolog");
&pipecmd("");
while(
{
if(/SQL>/i)
{
# We are in
&pipecmd("connect SYS as SYSDBA");
# Need to sleep 2 secs or we will send in the password before the prompt
# is ready.
sleep(2);
&pipecmd("oracle1");
next;
}
if(/Connected./i)
{
&start_oracle_server();
last;
}
}
sleep(2);
}
if($inputstr eq "console")
{
printf("Performing DBCONSOLE Startup ...\n");
&start_oracle_dbconsole();
}
}
sub start_oracle_server
{
&pipecmd("startup");
while(
{
printf("STARTUP: $_");
}
&pipecmd("quit");
}
sub start_oracle_dbconsole
{
# Startup the oracle database console
&pipecmd("bin/emctl start dbconsole");
while(
{
printf("DBCONSOLE: $_");
}
}
sub terminate_processes
{
# User has the option of passing in parmeter 'query' or 'java' which will
# output processes instead of killing them.
&create_path();
my $pidout = "$path\/pidout.txt";
$counter = 0;
my $input;
$input = $_[0];
$input = 'null' unless defined $input;
my ($pidcnt, $asked, $localcmd, $printonce, $index);
$asked = 'q';
$printonce = 0;
$pidcnt = 0;
$index = 9;
$localcmd = "/bin/ps -fU docinst > $pidout";
system($localcmd);
open(PIDOUT, "< $pidout");
while(
{
if($input eq "java")
{
if($_ =~ /.\/java/i)
{
if ($printonce == 0)
{
printf("\n\n******* DOC Services QUERY JAVA Report *******\n");
$printonce = 1;
}
printf("JAVA: $_\n");
$pidcnt ++;
}
next;
}
if($_ =~ /.\/documentum/i ||
$_ =~ /.\/dmdocbroker/i)
{
$counter ++;
# Documentum processes are still alive.
my @psarray;
undef(@psarray);
@psarray = split(/ /, $_);
#$psarray[2] =~ s/\S+$//;
#$psarray[2] =~ s/^\S+//;
my $i;
for($i=0;$i<=5;$i++)
{
my $value;
$value = $psarray[$i];
if($value =~ s/\d+$//)
{ $index=$i;last;}
}
if ($index >= 5) {printf("Invalid PID ... skipping\n"); next;}
if ($input eq 'query')
{
if ($printonce == 0)
{
printf("\n\n******* DOC Services QUERY Report *******\n");
$printonce = 1;
}
printf("Owner: $psarray[1] PID: $psarray[$index]\n $_\n");
$pidcnt = $counter;
next;
}
if ($asked eq 'q' || $asked eq 'n')
{
$asked = &promptUser("One of more Documentum processes found\n Would you like to terminate ALL
$asked = lc($asked);
}
if ($asked eq 'y')
{
printf("Terminating process: $psarray[1] : $psarray[$index]\n");
$localcmd = "kill $psarray[$index]";
my $rc = system($localcmd);
if ($rc != 0)
{
printf("[FAILED] Could not terminate process: $psarray[$index]\n");
$STOP = 0;
}
else
{
$counter = $counter -1;
}
}
else
{
printf("[INFO] Process: $psarray[1] : $psarray[$index] lives\n");
$STOP = 0;
}
printf("[INFO] Documentum processes still alive: $counter.\n");
$pidcnt = $counter;
}
}
close(PIDOUT);
if($pidcnt == 0) {printf("\n\nNO PROCESSES FOUND\n");}
&remove_path();
}
sub setupSigHdlrs
{
# Re-define any signal handlers, as necessary.
# Catch Ctrl-C
$SIG{INT} = \&HandleCtrlC;
}
sub HandleCtrlC
{
# A cleanup routine called when the user types ctrl-C.
if($CLIENTID != 0)
{
#&close_pipe();
}
printf("\nControl ^C encountered - exiting.\n");
exit()
}
sub startup_services
{
# start the documentum services
my $localcmd;
printf("INITIATE STARTUP ...\n\n");
# Check for documentum processes
&terminate_processes();
printf(" CHECKING safety indicator ...\n");
# Check if safe to proceed.
&check_safety();
&setenv_vars();
# Added this here as it seems to work instead of letting the
# dm_start_dbdoc_sh19necm1_r01 script try to bring it up.
printf(" STARTING DM_DOCBROKER ...\n\n\n");
system("cd /opt/documentum/dba;./dm_launch_Docbroker");
sleep(2);
printf("\n\n STARTING DATABASE: dbdoc_sh19necm1_r01 ...\n\n\n");
# Repository
$localcmd = ('cd /opt/documentum/dba;./dm_start_dbdoc_sh19necm1_r01');
system($localcmd);
# Start Tomcat for web services.
&handle_apache_server(1);
# Start Method Server.
#&handle_apache_server(4);
&start_fulltext();
&check_dmdocbroker();
printf("\n\n\n\n");
printf("=======================================================\n");
printf("NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE\n");
printf("=======================================================\n");
printf("You must close your browser and restart using the static\n");
printf("IP address for the DOCUMENTUM services to connect to.\n");
printf("Failure to do so will RESULT in no connectivity.\n");
printf("=======================================================\n");
printf("\n\nSTARTUP INITIATE COMPLETED.\n");
}
sub start_fulltext
{
my $localcmd;
printf(" \n\n STARTING INDEX SERVER ...\n\n\n");
#Index Server
$localcmd = ('cd /opt/documentum/fulltext/IndexServer/bin;./startup.sh');
system($localcmd);
printf(" \n\n STARTING INDEX AGENT ...\n\n\n");
# Index Agent
$localcmd = ('cd /opt/documentum/shared/IndexAgents/IndexAgent1;./startupIndexAgent.sh');
system($localcmd);
&get_nctrl();
}
sub get_nctrl
{
my $localcmd;
printf("Obtaining Node Controller status Info ...");
sleep(3);
$localcmd = ('cd /opt/documentum/fulltext/IndexServer/bin; nctrl sysstatus');
system($localcmd);
}
sub handle_apache_server
{
# Handler to start or stop application server or
# Documentum Method Server.
# INPUT: 1 = START APPLICATION SERVER
# 2 = STOP APPLICATION SERVER
# 3 = STOP METHOD SERVER
# 4 = START METHOD SERVER
my ($localcmd,$input);
$input = $_[0];
if ($input == 1)
{
printf(" STARTING APACHE TOMCAT services ...\n");
# Tomcat for web services.
$ENV{'CATALINA_HOME'} = '/opt/apache/tomcat';
$ENV{'CATALINA_BASE'} = '/opt/apache/tomcat';
$localcmd = 'cd /opt/apache/tomcat/bin;./startup.sh';
system($localcmd);
}
if ($input == 2)
{
printf(" STOPPING APACHE TOMCAT services ...\n");
# Tomcat for web services.
$ENV{'CATALINA_HOME'} = '/opt/apache/tomcat';
$ENV{'CATALINA_BASE'} = '/opt/apache/tomcat';
$localcmd = 'cd /opt/apache/tomcat/bin;./shutdown.sh';
system($localcmd);
}
if ($input == 3)
{
printf(" STOPPING Documentum Method Server ...\n");
printf("\n\n THIS IS NOT RECOMMENDED !!!\n");
$ENV{'CATALINA_HOME'} = '/opt/documentum/shared/tomcat/5.0.28';
$ENV{'CATALINA_BASE'} = '/opt/documentum/shared/tomcat/5.0.28';
$localcmd = 'cd /opt/documentum/shared/tomcat/5.0.28/bin;./shutdown.sh';
system($localcmd);
}
if ($input == 4)
{
printf(" STARTING Documentum Method Server ...\n");
printf("\n\n THIS IS NOT RECOMMENDED !!!\n");
printf(" COMMAND CANCELLED.\n");
$ENV{'CATALINA_HOME'} = '/opt/documentum/shared/tomcat/5.0.28';
$ENV{'CATALINA_BASE'} = '/opt/documentum/shared/tomcat/5.0.28';
$localcmd = 'cd /opt/documentum/shared/tomcat/5.0.28/bin;./startup.sh';
system($localcmd);
}
}
sub check_dmdocbroker
{
my $found;
$found = -1;
&create_path();
system("/bin/ps -ef > $path\/dmdocb.txt");
open(DMOUT, "< $path\/dmdocb.txt");
while(
{
if($_ =~ /.\/dmdocbroker/i)
{
$found = 0;
last;
}
}
close(DMOUT);
&remove_path();
if($found != 0)
{
my $action;
printf("Docbroker failed to start therefore\n");
$action = &promptUser("would you like to start manually
$action = lc($action);
if ($action eq 'y')
{
&setenv_vars();
# Docbroker failed to start so kick it manually.
system("cd /opt/documentum/dba;./dm_launch_Docbroker");
printf("\n**DM_DOCBROKER STARTED MANUALLY FROM SCRIPT**\n");
}
else { printf("\n**Please investigate DOCBROKER LOG\n /opt/documentum/dba/log/docbroker...**\n");}
}
}
sub stop_dmdocbroker
{
my $localcmd;
printf(" Stopping DM DOCBROKER ...\n");
$localcmd = 'cd /opt/documentum/dba;./dm_stop_Docbroker';
system($localcmd);
}
sub stop_services
{
my $localcmd;
printf("SHUTDOWN INITIATING ...\n\n");
sleep(2);
&stop_fulltext();
sleep(2);
# Stop Apache and Documentum Method Server
# &handle_apache_server(3); <-- This causes errors so don't do
&handle_apache_server(2);
printf(" Stopping repository ...\n");
$localcmd = 'cd /opt/documentum/dba;./dm_shutdown_dbdoc_sh19necm1_r01';
system($localcmd);
&stop_dmdocbroker();
sleep(5);
# Check for any documentum processes
&terminate_processes();
}
sub stop_fulltext
{
my $localcmd;
printf(" Stopping Index Agent ...\n");
$localcmd = 'cd /opt/documentum/shared/IndexAgents/IndexAgent1;./shutdownIndexAgent.sh';
system($localcmd);
printf(" Stopping Index Server ...\n");
$localcmd = 'cd /opt/documentum/fulltext/IndexServer/bin;./shutdown.sh';
system($localcmd);
&get_nctrl();
}
sub check_safety
{
if ($STOP == 0 && $counter > 0)
{
# Not safe to continue.
printf("ERROR: It is unsafe to continue ... \n");
printf(" Check for previous errors!\n\n");
exit(0);
}
}
sub setenv_vars
{
# Setup the environment just in case we are not being called from
# a profile that has the proper ENV.
$ENV{'ORACLE_SID'} = 'DBDOC';
$ENV{'DOCUMENTUM_SHARED'} = '/opt/documentum/shared';
$ENV{'LD_LIBRARY_PATH'} = '/opt/documentum/fulltext/IndexServer/lib:/opt/documentum/fulltext/fast40:/opt/documentum/shared/dfc:/opt/documentum/shared/IndexAgents/ftintegrity';
$ENV{'LC_ALL'} = 'C';
$ENV{'FASTSEARCH'} = '/opt/documentum/fulltext/IndexServer';
$ENV{'JAVA_HOME'} = '/opt/documentum/shared/java/1.4.2_11';
$ENV{'ORACLE_BASE'} = '/opt/oracle/oracle/product/10.2.0/db_1';
$ENV{'ORACLE_HOME'} = '/opt/oracle/oracle/product/10.2.0/db_1';
$ENV{'DISPLAY'} = 'localhost:1';
$ENV{'DM_HOME'} = '/opt/documentum/product/5.3';
$ENV{'LOGNAME'} = 'docinst';
$ENV{'DOCUMENTUM'} = '/opt/documentum';
$ENV{'PATH'} = '/usr/bin::/usr/local/bin:/usr/openwin/bin';
$ENV{'TNS_ADMIN'} = '/opt/oracle/oracle/product/10.2.0/db_1/network/admin';
}
Receiving the error javax.naming.CommunicationException [Root exception is java.rmi.ConnectException: Connection refused to host: Solutions -b option for run.bat/run.sh enables us to tell JBoss the host it is running on. That solves this problem.Problem(Abstract)
Cause
When attempting to use JMS or RMI remotely, you might run across an exception that looks like this:
javax.naming.CommunicationException [Root exception is java.rmi.ConnectException: Connection refused to host: 127.0.0.1
This is the result of a problem in the JBoss server side configuration. You're successfully talking to the correct server, but it does not know it's own hostname or IP address.Resolving the problem
Eg. run.bat -b192.168.9.6 -Djboss.bind.address=0.0.0.0
(the 2nd parameter makes jboss server accessible from remote clients)