After installing OBIEE 11g in a windows environment,
the server is stopped and started by using command windows. This works fine in a Development or Testing
environment, but in Production, this can cause serious issues. If server maintenance
is preformed or the server is restarted, OBIEE will not automatically come back
up. The only way to start a windows program on start, without logging in, is by
using windows services. The following guide is set of steps we used to create
and install OBIEE 11g using windows services. After the services are installed,
they must be configured to start automatically after each other with delayed
startup to ensure that when one service completes, the next will start after
it. Please feel free to leave any questions or comments.
Set the following environment variables
System variable JAVA_HOME = D:\OBI11g\Oracle_BI1\jdk
System variable BI_ORACLE_HOME = D:\OBI11g\Oracle_BI1
installSvc.cmd
Take a backup of ‘installSvc.cmd’ located at ‘D:\OBI11g\wlserver_10.3\server\bin’
Add the following to ‘installSvc.cmd’:
set JAVA_VM=-server
set MEM_ARGS=-Xms512m -Xmx512m -XX:MaxPermSize=512m
-XX:+UseSpinning
- Create a command script called
installAdmServer_Service.cmd.
Open a text file and input the following lines [edit for your install]:
SETLOCAL
set
DOMAIN_NAME=bifoundation_domain
set
USERDOMAIN_HOME=D:\OBI11g\user_projects\domains\bifoundation_domain
set
SERVER_NAME=AdminServer
set
PRODUCTION_MODE=true
set OPMN_PORT=9500
cd %USERDOMAIN_HOME%
call
"D:\OBI11g\user_projects\domains\bifoundation_domain\bin\setDomainEnv.cmd"
call
"D:\OBI11g\wlserver_10.3\server\bin\installSvc.cmd"
ENDLOCAL
2.
Add -delay:120000 in the installSvc.cmd file to the line at the
bottom.
For
Example:
rem
*** Install the service
"%WL_HOME%\server\bin\beasvc"
-install -svcname:"beasvc %DOMAIN_NAME%_%SERVER_NAME%" -delay:120000 -javahome:"%JAVA_HOME%"
-execdir:"%USERDOMAIN_HOME%"
-maxconnectretries:"%MAX_CONNECT_RETRIES%" -host:"%HOST%"
-port:"%PORT%" -extrapath:"%EXTRAPATH%" -password:"%WLS_PW%"
-cmdline:%CMDLINE%
-log:"D:\OBI11g\user_projects\domains\bifoundation_domain\servers\AdminServer\AdminServer-stdout.txt"
- For troubleshooting / debugging purposes it is helpful to redirect standard out and error to a text file. Although most information is captured in the AdminServer server log files, you will not see all standard out and error when the server is started via a MS Windows Service (unlike when you start an AdminServer in console mode from the command prompt using startWebLogic.cmd). To redirect standard out to a text file, backup and edit installSvc.cmd file and change the line at the bottom of the file so it includes the -log parameter. For example:
"%WL_HOME%\server\bin\beasvc"
-install -svcname:"beasvc %DOMAIN_NAME%_%SERVER_NAME%" -delay:120000
-javahome:"%JAVA_HOME%" -execdir:"%USERDOMAIN_HOME%"
-maxconnectretries:"%MAX_CONNECT_RETRIES%" -host:"%HOST%"
-port:"%PORT%" -extrapath:"%EXTRAPATH%"
-password:"%WLS_PW%" -cmdline:%CMDLINE% -log:"D:\OBI11g\user_projects\domains\bifoundation_domain\servers\AdminServer\AdminServer-stdout.txt"
- Next, run "installAdmServer_Service.cmd" and the service should be installed, it will have a name like "beasvc %DOMAIN_NAME%_%SERVER_NAME%" (e.g. beasvc bifoundation_domain_AdminServer)
The Service "Startup Type" will be 'Automatic'. Just like any other
MS Windows Service you can change the 'Startup Type' to 'Manual'.
For Managed Server bi_server1
For Managed Server bi_server1
- Create a command script called installBIServer_Service.cmd
which has lines like:
SETLOCAL
set
DOMAIN_NAME=bifoundation_domain
set
USERDOMAIN_HOME=D:\OBI11g\user_projects\domains\bifoundation_domain
set
SERVER_NAME=bi_server1
set
JAVA_HOME=D:\OBI11g\Oracle_BI1\jdk
set
PRODUCTION_MODE=true
set
ADMIN_URL=http://localhost:7001
set OPMN_PORT=9500
set
BI_ORACLE_HOME=D:\OBI11g\Oracle_BI1
cd %USERDOMAIN_HOME%
call
"D:\OBI11g\user_projects\domains\bifoundation_domain\bin\setDomainEnv.cmd"
call
"D:\OBI11g\wlserver_10.3\server\bin\installSvc.cmd"
ENDLOCAL
Notes:
- Before running, add
-depend:"beasvc
bifoundation_domain_AdminServer" -delay:180000
To the
last line at the bottom of the installSvc.cmd. For Example:
rem ***
Install the service
"%WL_HOME%\server\bin\beasvc"
-install -svcname:"beasvc %DOMAIN_NAME%_%SERVER_NAME%" -depend:"beasvc
bifoundation_domain_AdminServer" -delay:180000
-javahome:"%JAVA_HOME%" -execdir:"%USERDOMAIN_HOME%"
-maxconnectretries:"%MAX_CONNECT_RETRIES%" -host:"%HOST%"
-port:"%PORT%" -extrapath:"%EXTRAPATH%"
-password:"%WLS_PW%" -cmdline:%CMDLINE% -log:"D:\OBI11g\user_projects\domains\bifoundation_domain\servers\AdminServer\bi_Server1-stdout.txt"
- Before running, change the -log parameter in the
installSvc.cmd file to the new location. For example:
"%WL_HOME%\server\bin\beasvc" -install -svcname:"beasvc %DOMAIN_NAME%_%SERVER_NAME%" -depend:"beasvc bifoundation_domain_AdminServer" -delay:180000 -javahome:"%JAVA_HOME%" -execdir:"%USERDOMAIN_HOME%" -maxconnectretries:"%MAX_CONNECT_RETRIES%" -host:"%HOST%" -port:"%PORT%" -extrapath:"%EXTRAPATH%" -password:"%WLS_PW%" -cmdline:%CMDLINE% -log:"D:\OBI11g\user_projects\domains\bifoundation_domain\servers\AdminServer\bi_Server1-stdout.txt" - The ADMIN_URL value should reference the AdminServer hostname and listen port
- The SERVER_NAME value is case sensitive. For example, if you are creating a MS Windows service for a different managed server such as 'wls_ods1' then the value needs to match the case of the server name otherwise the startup of the server via the MS Windows service will fail.
- Be careful that there are no trailing spaces after
each line in the command file - trailing spaces will cause the managed
server to fail at startup. For example a trailing space in the ADMIN_URL
value will result in the error
<19-Jan-2010 11:37:58 o'clock GMT> <Error> <EmbeddedLDAP> <BEA-171524> <Cannot determine the Listen address for the Admin server
- Now run "installBIServer_Service.cmd". The
Service should be installed, it will have a name like "beasvc
%DOMAIN_NAME%_%SERVER_NAME%" (e.g. - beasvc
bifoundation_domain_bi_server1)
The Service "Startup Type" will be 'Automatic'. Just like any other MS Windows Service you can change the 'Startup Type' to 'Manual'.
OBIEE Services Dependencies
The services
should be started in the order below:
1) Oracle WebLogic NodeManager (D_OBI11g_wlserver_10.3)
2) beasvc bifoundation_domain_AdminServer
3) beasvc bifoundation_domain_bi_server1
4) OracleProcessManager_instance1
1) Oracle WebLogic NodeManager (D_OBI11g_wlserver_10.3)
2) beasvc bifoundation_domain_AdminServer
3) beasvc bifoundation_domain_bi_server1
4) OracleProcessManager_instance1
Setting
Dependencies:
In Registry
Editor navigate to HKEY_LOCALMACHINE->SYSTEM->CurrentControlSet->service
For OracleProcessManager_instance1 Service
set
‘DependOnService’
= beasvc bifoundation_domain_bi_server1
For beasvc bifoundation_domain_bi_server1 Service
set
‘DependOnService’
= beasvc bifoundation_domain_AdminServer
Note: This should already be set as we
created the dependency while creating the service
For beasvc bifoundation_domain_AdminServer Service
set
‘DependOnService’
= Oracle WebLogic NodeManager (D_OBI11g_wlserver_10.3)
Note: The startup type for all the above
services should be ‘Manual’
Starting OBIEE Services after the Database is Up and
Running
The Admin Server
Service(beasvc bifoundation_domain_AdminServer) and Managed Server Service(beasvc
bifoundation_domain_bi_server1) requires the database to be up and running for
them to start properly.
In order for
OBIEE services to start after the database is up and running, we create a batch
file and set this as Startup Scripts to delay start OBIEE services after system
startup.
Batch File:
NET STOP
"OracleProcessManager_instance1"
TIMEOUT /T 300
/NOBREAK
NET START
"OracleProcessManager_instance1"
Setting batch
file as Startup Script:
Run-> gpedit.msc
In Local Group
Policy Editor:
Computer
Configuration->Windows Settings->Scripts (Startup/Shutdown)->Startup
Add the Batch
file as startup script.
No comments:
Post a Comment