Configuring OBIEE to run as a Windows Service

Introduction

One key step to configuring an enterprise deployment of Oracle Business Intelligence is to be setup your services to run in the background as Windows services and start automatically with your server.  By default the installer will create windows services for Oracle Process Manager (OPMN) and the Weblogic Node Manager, this leaves us with the need to configure services for the Weblogic AdminServer and the BI Managed Server.

Pre-requisites

  • Verify boot.properties files exist for both Weblogic Servers

    AdminServer:
    %mw_home%\user_projects\domains\bifoundation_domain\servers\AdminServer\security\boot.properties

    BI Managed Server:
    %mw_home%\user_projects\domains\bifoundation_domain\servers\bi_server1\security\boot.properties

  • Define the MW_HOME Variable
  • Edit %MW_HOME%\wlserver_10.3\server\bin\installSvc.cmd to redirect standard output to a file and to set the service name prefix to “Oracle_”

    Log Syntax:
    -log:”%MW_HOME%\user_projects\domains\bifoundation_domain\servers\%SERVER_NAME%-stdout.txt”

    Example Customization:

    set MW_HOME=%WL_HOME%\..\

    rem *** Install the service”
    %WL_HOME%\server\bin\beasvc” -install -svcname:”Oracle_%DOMAIN_NAME%_%SERVER_NAME%” -javahome:”%JAVA_HOME%” -execdir:”%USERDOMAIN_HOME%” -maxconnectretries:”%MAX_CONNECT_RETRIES%” -host:”%HOST%” -port:”%PORT%” -extrapath:”%EXTRAPATH%” -password:”%WLS_PW%” -cmdline:%CMDLINE% -log:”%MW_HOME%\user_projects\domains\bifoundation_domain\servers\%SERVER_NAME%-stdout.txt”

    Note: Make sure you replace beasvc and the subsequent space with Oracle_ on the section for -svcname

  • Change the environment script

    %MW_HOME%\user_projects\domains\bifoundation_domain\bin\setOBIDomainEnv.cmd

  • Edit %MW_HOME%\wlserver_10.3\server\bin\installSvc.cmd to ensure the correct Java memory arguments are utilized by your windows service

    Old Code:
    call “%WL_HOME%\common\bin\commEnv.cmd”
    New Code:
    call “%WL_HOME%\..\user_projects\domains\bifoundation_domain\bin\setOBIDomainEnv.cmd”

  • Edit %MW_HOME%\wlserver_10.3\server\bin\installSvc.cmd to implement a workaround for the Windows limitation of the maximum length of the command line being 2KB
    • Locate the two instances where the script sets the value of the CMDLINE variable
    • Add the code below before each instance, this code will output the current value of CLASSPATH to a text file

      REM –
      REM output the class path to text file and change reference to file on CMDLINE variable
      REM this is a workaround to a limit on windows command line to 2KB
      echo %CLASSPATH% > %WL_HOME%\server\bin\classpath.txt

    • Replace the class path variable reference \”%CLASSPATH%\” with@%WL_HOME%\server\bin\classpath.txt as depicted in the example below

      set CMDLINE=”%JAVA_VM% %MEM_ARGS% %JAVA_OPTIONS% -classpath @%WL_HOME%\server\bin\classpath.txt -Dweblogic.Name=%SERVER_NAME% -Dweblogic.management.username=%WLS_USER% -Dweblogic.ProductionModeEnabled=%PRODUCTION_MODE% -Djava.security.policy=\”%WL_HOME%\server\lib\weblogic.policy\” weblogic.Server”

  • Read the Microsoft Support article on specifying the startup order of Windows Services
  • Using regedit, add the one group for each of the OBIEE processes to be started at the end of the list entry at:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ServiceGroupOrder

    Example groups:

    OBI Node Manager
    OBI AdminServer
    OBI Managed Server
    OBI OPMN

    This will sequence the startup of your services based on group

  • Note down the names of the OPMN and Node Manager Services from the registry

    Registry Location:

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\

    Sample Service Names:

    OracleProcessManager_instance1
    Oracle WebLogic NodeManager (d_obi_mw_wlserver_10.3)

  • For each of the two services above add a string value (right click the registry folder and follow New > String Value) named Group and provide the corresponding group value for each service (ie. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Oracle WebLogic NodeManager (d_obi_mw_wlserver_10.3)\Group=OBI Node Manager).

    This will work along with the ServiceGroupOrder configuration to ensure the startup order of your services

Implementation


AdminServer Service

  • Create a new script named %MW_HOME%\wlserver_10.3\server\bin\installAdminServer_svc.cmd and using the code below:

    SETLOCAL
    @echo off
    set MW_HOME=d:\obi_mw
    set DOMAIN_NAME=bifoundation_domain
    set USERDOMAIN_HOME=%MW_HOME%\user_projects\domains\%DOMAIN_NAME%
    set SERVER_NAME=AdminServer
    set PRODUCTION_MODE=true
    call “%MW_HOME%\wlserver_10.3\server\bin\installSvc.cmd”
    ENDLOCAL

  • Run the installAdminServer_svc.cmd script
  • Using regedit, verify that a service named Oracle_bifoundation_domain_AdminServer now exists under the following location

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\

  • Right click your service folder and follow the context menus New > String Value to add a new entry in your service folder, call your new string value Group and double click on it to add OBI AdminServer as a value. This will work in tandem with the ServiceGroupOrder configuration to ensure the startup order of your services.
  • Right click your service folder and follow the context menus New > Multi-String Value to add a new entry in your service folder, call your new string value DependOnService and double click on it to add the node manager service as a dependency, the node manager service must match the service listing you noted down as part of the pre-requisite preparation steps (ie. Oracle WebLogic NodeManager (d_obi_mw_wlserver_10.3)). Using this dependency value will cause Windows to verify that dependent services have been started before attempting to start this service.

BI Managed Server Service

  • Create a new script named %MW_HOME%\wlserver_10.3\server\bin\installbi_server1_svc.cmd and using the code below:

    SETLOCAL
    @echo off
    set MW_HOME=d:\obi_mw
    set DOMAIN_NAME=bifoundation_domain
    set USERDOMAIN_HOME=%MW_HOME%\user_projects\domains\%DOMAIN_NAME%
    set SERVER_NAME=bi_server1
    set PRODUCTION_MODE=true
    set ADMIN_URL=http://localhost:7001
    call “%MW_HOME%\wlserver_10.3\server\bin\installSvc.cmd”
    ENDLOCAL

  • Run the installbi_server1_svc.cmd script
  • Using regedit, verify that a service named Oracle_bifoundation_domain_bi_server1 now exists under the following location

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\

  • Right click your service folder and follow the context menus New > String Value to add a new entry in your service folder, call your new string value Group and double click on it to add OBI Managed Server as a value. This will work in tandem with the ServiceGroupOrder configuration to ensure the startup order of your services.
  • Right click your service folder and follow the context menus New > Multi-String Value to add a new entry in your service folder, call your new string value DependOnService and double click on it to add the node manager service and Weblogic AdminServer services as a dependencies (ie.Oracle_bifoundation_domain_AdminServer ). Using this dependency value will cause Windows to verify that dependent services have been started before attempting to start this service.
  • Right click the service folder for OPMN and follow the context menus New > Multi-String Value to add a new entry in your service folder, call your new string value DependOnService and double click on it to add the node manager service and Weblogic AdminServer  and your new BI Managed Server services as a dependencies (ie. Oracle_bifoundation_domain_bi_server1). Using this dependency value will cause Windows to verify that dependent services have been started before attempting to start this service.
  • On the Administration Tools > Services application verify that all of the following services are configured to start automatically and, optionally, configure what actions are taking on failure starting each service.

    Oracle WebLogic NodeManager
    Oracle_bifoundation_domain_AdminServer
    Oracle_bifoundation_domain_bi_server1
    Oracle Process Manager (instance 1)

Setup Validation

  • Restart your windows server and monitor the order in which services are started
  • If you see issues with OPMN starting at the same time as your WebLogic servers you might need to try setting the AdminServer, BI Managed Server and OPMN  services to start manually and using the code below to create batch command file that is executed by a scheduled task each time the computer starts:

    net start Oracle_bifoundation_domain_AdminServer
    timeout 300
    net start Oracle_bifoundation_domain_bi_server1
    timeout 300
    net start OracleProcessManager_instance1

    This script would use the timeout DOS command to institute a five minute wait between each of the OBI services being started.

One key step to configuring an enterprise deployment of Oracle Business Intelligence is to be setup your services to run in the background as Windows services and start automatically with your server.  By default the installer will create windows services for Oracle Process Manager (OPMN) and the Weblogic Node Manager, this leaves us with the need to configure services for the Weblogic AdminServer and the BI Managed Server.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.