Shahed Munir
How to install the weblogic AdminServer and Managed Server as MS Windows Service for OBIEE 11g
installation.
This is how neat it can look
Start with adding two Environment Variable to Windows
- BI_ORACLE_HOME
- My Computer
- Then goto Advanced
- Click on Environment Variables
And Add 2 Variables
1st one too User Variables
Variable Name : BI_ORACLE_HOME
Variable Value : D:\MIDDLEWAREHOME\Oracle_BI1
Add another one too System Variables
Variable Name : BI_ORACLE_HOME
Variable Value : D:\MIDDLEWAREHOME\Oracle_BI1
Your variable value will depend on what you called your middleware location on install
and your drive letter where ever you installed OBIEE.
Restart Machine..
AdminServer
1. Create a text file
%MIDDLEWARE_HOME%\user_projects\domains\bifoundation_domain\servers\AdminServer\security\boot.properties
For example, if the MIDDLEWARE_HOME is BI11g, then the boot properties needs to be here:
C:\BI11g\user_projects\domains\bifoundation_domain\servers\AdminServer\security\boot.properties
Add the following lines,
username=<(the Administrator username created during install, e.g weblogic)>
password=<the weblogic username password e.g welcome1)>
the above credentials are the same as the one provided when the AdminServer is started from Command line.
As soon as you start the Admin Server the username and password values in this file will be encrypted.
2. Create a command script called installAdmServer_Service.cmd.
Open a text file and input the following lines: eg for my install.
echo off
SETLOCAL
set MW_HOME=d:\MIDDLEWAREHOME
set OPMN_PORT=9500
set wls.host=oraclepc
set wls.admin.port=7001
set wls.mgd.port=9704
set wls.mgd.name=bi_server1
set BI_URL=http://%wls.host%:%wls.mgd.port%/analytics
set JAVA_HOME=d:\MIDDLEWAREHOME\Oracle_BI1\jdk
set PRODUCTION_MODE=true
set DOMAIN_HOME=d:\MIDDLEWAREHOME\user_projects\domains\bifoundation_domain
set WLS_HOME=%MW_HOME%\wlserver_10.3
set INSTANCE_HOME=d:\MIDDLEWAREHOME\instances\instance2
set ORACLE_BI_HOME=d:\MIDDLEWAREHOME\Oracle_BI1
set ANT_HOME=%MW_HOME%\modules\org.apache.ant_1.7.1
set DOMAIN_NAME=bifoundation_domain
set USERDOMAIN_HOME=D:\MIDDLEWAREHOME\user_projects\domains\bifoundation_domain
set SERVER_NAME=AdminServer
call "D:\MIDDLEWAREHOME\user_projects\domains\bifoundation_domain\bin\setDomainEnv.cmd"
call "D:\MIDDLEWAREHOME\wlserver_10.3\server\bin\installSvc.cmd"
ENDLOCAL
Please note that the middleware home values need to be specific to your install.
3. 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 from the command prompt using startWebLogic.cmd). To redirect standard out to a text file, backup and edit installSvc.cmd and change the line at the bottom of the file so it include the -log parameter e.g
"%WL_HOME%\server\bin\beasvc" -install
-svcname:"%DOMAIN_NAME%_%SERVER_NAME%"
-javahome:"%JAVA_HOME%" -execdir:"%USERDOMAIN_HOME%"
-extrapath:"%WL_HOME%\server\bin" -password:"%WLS_PW%"
-cmdline:%CMDLINE%
-log:"C:\BI11g\user_projects\domains\bifoundation_domain\AdminServer-stdout.txt"
4. Now run "installAdmServer_Service.cmd". 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'.
Start the Service. The Service will come back fairly quickly to say it is started. The actual time taken for AdminServer to start and reach a state of 'RUNNING' will be longer - perhaps two or three minutes. The state of the server can be monitored by reviewing the stdout txt file.
Notes:
An alternative to the boot.properties approach to specifying the Admin Server weblogic username / password is to add the following environment variables to your wrapper cmd script - installAdmServer_Service.cmd
set WLS_USER=weblogic
set WLS_PW=manager11g
To quote the documentation
The beasvc utility encrypts the login credentials and stores them in the Windows registry.
This is one of two possible methods for avoiding the username/password prompt when a server instance starts. The disadvantage to this method is that changing the username or password for the server instance requires you to delete the Windows service and set up a new one with the new username and password. Instead of this method, you can use a boot identity file. With a boot identity file, you can change the login credentials without needing to modify the Windows service.
Managed Server bi_server1
1. Create a text file or copy the one we made earlier
%MIDDLEWARE_HOME%\user_projects\domains\bifoundation_domain\servers\bi_server1\security\boot.properties
For e.g
C:\BI11g\user_projects\domains\bifoundation_domain\servers\bi_server1
where the BI11g is your middleware home.
Add the following lines
username=<weblogic username e.g weblogic>
password=<the weblogic username password e.g welcome1)>
As soon as you start the managed server the username and password values in this file will be encrypted. The alternative approach - like for AdminServer - is to specify WLS_USER and WLS_PW in the wrapper cmd script. See next point
2. Create a command script called installManagedSrvr_Service.cmd which has lines like also make sure that you set your admin url to weblogic server ip and port.
SETLOCAL
set DOMAIN_NAME=bifoundation_domain
set USERDOMAIN_HOME=D:\MIDDLEWAREHOME\user_projects\domains\bifoundation_domain
set SERVER_NAME=bi_server1
set PRODUCTION_MODE=true
set ADMIN_URL=http://192.168.1.99:7001
set JAVA_HOME=d:\MIDDLEWAREHOME\Oracle_BI1\jdk
set PRODUCTION_MODE=true
set DOMAIN_HOME=d:\MIDDLEWAREHOME\user_projects\domains\bifoundation_domain
set WLS_HOME=%MW_HOME%\wlserver_10.3
set INSTANCE_HOME=d:\MIDDLEWAREHOME\instances\instance2
set ORACLE_BI_HOME=d:\MIDDLEWAREHOME\Oracle_BI1
set ANT_HOME=%MW_HOME%\modules\org.apache.ant_1.7.1
set DOMAIN_NAME=bifoundation_domain
call "D:\MIDDLEWAREHOME\user_projects\domains\bifoundation_domain\bin\setDomainEnv.cmd"
call "D:\MIDDLEWAREHOME\wlserver_10.3\server\bin\installSvc.cmd"
ENDLOCAL
Edit Registry to rename services
Open RegEdit.
Navigate to HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services.
Find the key for the service you want to change and simply rename them
I Renamed my services so i start them in the Right Order
The Node Manager First, Then Admin Server , Managed Server BISERVER1, OPMN.
Notes:
a) The ADMIN_URL value should reference the AdminServer hostname and listen port
b) 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.
c) 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
3. Now run "installManagedSrvr_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'.
Start the Service. The Service will come back fairly quickly to say it is started. The actual time taken for the managed server to start and reach a state of 'RUNNING' will be longer - perhaps two or three minutes. The state of the server can be monitored by reviewing the stdout txt file.
4) Ensure you make the managed Server to a manual startup so this service can be started after the AdminServer is started.
5) You may choose to start the managed server from the AdminServer instead of from creating the MS Windows service which is the recommended practice.
6) First start the Node Manager, Admin Server and the Managed Server in this Order.
You can start the BI Server components either from FMW Control or from the OPMN Command line.
Note: only a member of this blog may post a comment.