Translate

Wednesday, 18 January 2012

OBIEE 11g UNIX/LINUX Start and Stop commands

How To Start / Stop An OBIEE 11g (11.1.1.x) Unix / Linux Environment Via Command-line
Starting the environment via command-line:
The high-level manual steps are:

Set your environment
Start WLS Admin Server in the background
Start WLS NodeManager
Start WLS Managed Server
Start Oracle Instance
Note: init.d boot time startup scripts are not covered here.  These examples are from Oracle Enterprise Linux 5


Set your environment (manually or via script).

Note: You may use the standard environment scripts (commEnv.sh, setDomainEnv.sh, etc) ; however, these are the minimal variables necessary for these examples

MW_HOME=/[path]/[obiee11g_middleware_home]; export MW_HOME
DOMAIN_HOME=/$MW_HOME/user_projects/domains/bifoundation_domain; export DOMAIN_HOME
WL_HOME=$MW_HOME/wlserver_10.3; export WL_HOME
ORACLE_HOME=$MW_HOME/Oracle_BI1; export ORACLE_HOME
ORACLE_INSTANCE=$MW_HOME/instances/instance1; export ORACLE_INSTANCE
#
# You may also want to set your PATH environment to avoid having to use
# paths in the commands
#
PATH=$WL_HOME/server/bin:$DOMAIN_HOME/bin:$ORACLE_INSTANCE/bin:$ORACLE_HOME/OPatch:$PATH; export PATH

Start the WebLogic (WLS) Administration Server in the background

Note:  For username and password, you can:
pass username/pwd in the command line,
use the boot.properties file for an encrypted username/password
set as environment variables - WLS_USER / WLS_PW,
or pass WLS_USER /WLS_PW in the start scripts.
Please see the Oracle WebLogic documentation to determine what meets your need.
In these examples, you can name the logs whatever you desire.

Execute:
nohup sh $DOMAIN_HOME/bin/startWebLogic.sh -Dweblogic.management.username=weblogic -Dweblogic.management.password=[_your_password_] > wls_start.log &
Next, tail the log to determine if the server started completely.
execute:
tail -f [log name]
wait until you see:
<WebLogicServer> <BEA-000360> <Server started in RUNNING mode>
 there should be no further lines after this. If successful,  proceed to step 3. If errors, correct them and restart.

Note: This takes some time.  The terms "takes some time", "starts fast", "starts slow", "takes xx amount of time" are all relative terms depending upon resources in your environment.

Start Node Manager

Note: In this example, the username and password are embedded in script via WLS_USER and WLS_PW.  If you need another method or a more secure method, like a boot.properties  file, then please see:
Oracle Fusion Middleware Managing Server Startup and Shutdown for Oracle WebLogic Server 11g Release 1 (10.3.1)

Execute:
nohup sh  $WL_HOME/server/bin/startNodeManager.sh > startNodeManager.log &
Next, tail the log to determine if the server started completely.
tail -f [log name]

Look for <INFO> <Secure socket listener started on port 9556>

Note: starts fast


Start the OBI Managed Server (bi_server1 -- default  - java bits)

Note: This can be started via Fusion Middleware Control  or WebLogic Administration Console as well. For this example, modify WLS_USER and WLS_PW in the startManagedWebLogic.sh script to the values chosen during installation. You can set ADMIN_URL in the environment, in the script or pass on the command-line. In this example, it is passed on the command-line.

Execute:
nohup sh $DOMAIN_HOME/bin/startManagedWebLogic.sh bi_server1 http://server.domain:7001/ > start_bi_server1.log &
Next, tail the log to determine if the server started completely.
tail -f [log name]

look for "Server started in RUNNING mode:
<Mon D, YYYY H:MM:SS PM EDT> <Notice> <WebLogicServer> <BEA-000330> <Started WebLogic Managed Server "wls_ods1" for domain "IDMDomain" running in Production Mode>
<Mon D, YYYY H:MM:SS PM EDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING>
<Mon D, YYYY H:MM:SS PM EDT> <Notice> <WebLogicServer> <BEA-000360> <Server started in RUNNING mode

Note: takes about 30 seconds depending upon your environment. At this point, you could start any other servers that you have configured in the same manner. For example, WLS_DISCO, WLS_PORTAL.


Start the OBIEE System Components ( BI Servers -- c++ bits)
$ORACLE_INSTANCE/bin/opmnctl startall
Next, execute:  opmnctl status or opmnctl status -l (lower case L) to ensure the processes are started properly/completely.

The output will look similar to this:

$ORACLE_INSTANCE/bin/opmnctl status -l
Processes in Instance: instance1
---------------------------------+--------------------+---------+----------+------------+----------+-----------+------
ias-component | process-type | pid | status | uid | memused | uptime | ports
---------------------------------+--------------------+---------+----------+------------+----------+-----------+------
coreapplication_obiccs1 | OracleBIClusterCo~ | 11741 | Alive | 70916792 | 55188 | 0:01:01 | N/A
coreapplication_obisch1 | OracleBIScheduler~ | 11740 | Alive | 70916789 | 122388 | 0:01:01 | N/A
coreapplication_obijh1 | OracleBIJavaHostC~ | 11739 | Alive | 70916790 | 1186088 | 0:01:01 | javahost:9810
coreapplication_obips1 | OracleBIPresentat~ | 11742 | Alive | 70916791 | 261576 | 0:01:01 | N/A
coreapplication_obis1 | OracleBIServerCom~ | 11738 | Alive | 70916788 | 150904 | 0:01:01 | N/A

The OPMN configuration file is in the ORACLE_INSTANCE/config/OPMN/opmn/opmn.xml directory on UNIX and specifies the exact environment that is used to launch each Oracle Business Intelligence system component.
It contains the PATH and LD_LIBRARY_PATH values for the system components and the port number for OPMN and optional SSL configuration

Start OPMN - ./opmnctl start
CHECK Status - ./opmnctl status


Stopping the enviroment cleanly via the command-line:
Reverse the steps above with the following commands:
Note: You can look inside the respective scripts or the documentation for alternative or more secure methods. You can also kill the processes, but you may risk corruption.
Stop the Oracle Instance 
$ORACLE_INSTANCE/bin/opmnctl stopall

Stop the OBIEE Managed Server (bi_server1)
$DOMAIN_HOME/bin/stopManagedWebLogic.sh bi_server1 t3://host.domain:7001 username password
If running other managed servers, then stop them in the same manner.

Stop the the WebLogic (WLS) Administration Server
$DOMAIN_HOME/bin/stopWebLogic.sh username password t3://host.domain:7001

At this point, since the node manager was started in another shell in the background, then you will need to kill the JVM process that the node manager is running under. There should be no risk of corruption at this point since everything is already shutdown.  If you had started the node manager in a shell (and not in the background), then you could just close the shell.
You can use the command ps -ef | grep [os user] to check for running processes under the specified user and then kill the JVM process with kill -9 [PID] (where PID is the process id of the running JVM)


DOMAIN_HOME

MiddlewareHome/user_projects/domains/bifoundation_domain
Set boot.properties files for biserver and adminserver.
DOMAIN_HOME\servers\AdminServer\security\boot.properties
DOMAIN_HOME\servers\biserver1\security\boot.properties

Linux Start Commands

nohup $MW_HOME/user_projects/domains/bifoundation_domain/bin/startWebLogic.sh &

nohup $MW_HOME/wlserver_10.3/server/bin/startNodeManager.sh &

nohup $MW_HOME/user_projects/domains/bifoundation_domain/bin/startManagedWebLogic.sh bi_server1 &

nohup $MW_HOME/instances/instance1/bin/opmnctl startall &

Linux Stop Commands

$MW_HOME/instances/instance1/bin/opmnctl stopall

$MW_HOME/user_projects/domains/bifoundation_domain/bin/stopManagedWebLogic.sh bi_server1

ps -ef |grep Node|grep nodemanager |cut -c10-15
This will show the Node Manager process. Write down its PID. Then execute:
kill <NodeManager_PID>

$MW_HOME/user_projects/domains/bifoundation_domain/bin/stopWebLogic.sh


1 comment:

  1. Another Version here....

    http://www.rittmanmead.com/2012/01/scripted-obi-11g-linux-startupshutdown/

    ReplyDelete

Google Big Query Clone / Copy DataSets / Tables - PROD --> TEST --> DEV Projects

Google Big Query Cloning of Datasets & Tables across GCS Projects. We searched the internet and could not find a simple cloning / ...