Pages

Showing posts with label services. Show all posts
Showing posts with label services. Show all posts

Thursday, 18 October 2012

Creating a windows service for a managed server in OBIEE 11.1.1.6


Create a text file with the contents as below, the assumption here is that you have a middleware home of D:\OBIEE11G - set yours appropriately and fill in the servername in <myserver>.

SETLOCAL
set DOMAIN_NAME=bi_server1
set USERDOMAIN_HOME=D:\OBIEE11G\user_projects\domains\bifoundation_domain
set SERVER_NAME=bi_server1
set PRODUCTION_MODE=true
set ADMIN_URL=http://<myserver>:7001
cd %USERDOMAIN_HOME%
call %USERDOMAIN_HOME%\bin\setDomainEnv.cmd
call "D:\OBIEE11G\wlserver_10.3\server\bin\installSvc.cmd"
ENDLOCAL

and name the file something like "installManServer.cmd"

Assuming that you have created an AdminServer service and set the Java Memory configuration then you are nearly home and dry.

Refer to http://docs.oracle.com/cd/E14571_01/web.1111/e13708/winservice.htm#i1188099

especially the part on delay (-delay:delay_milliseconds) and depend (-depend:"beasvc Adminserver_Adminserver")
for example -delay:300000 will delay for 5 minutes

And in your  WL_HOME\server\bin\installSvc.cmd script edit in the delay and/or depend parameters.
Also remember to change your logfile destination, you don't want Adminserver and managed service in the same logfile, trust me, it gets very confusing.

This should give you a final line in the I=installSvc.cmd that looks something like

"%WL_HOME%\server\bin\beasvc" -install
-svcname:"%DOMAIN_NAME%_%SERVER_NAME%"
-delay:300000
-depend:"beasvc Adminserver_Adminserver"
-javahome:"%JAVA_HOME%" -execdir:"%USERDOMAIN_HOME%"
-extrapath:"%WL_HOME%\server\bin" -password:"%WLS_PW%"
-log:"D:\OBIEE11G\user_projects\domains\bifoundation_domain\servers\bi_server1\bi_server1-stdout.txt"
-cmdline:%CMDLINE%

Update (27 Feb 2014)
This also works for 11.1.1.7

Thursday, 14 June 2012

bicontentserver(11.1.1) down - an update and fix

Following on from a previous post here.

It turns out that all you have to do is create a new environment variable






BI_ORACLE_HOME and give the value of your middleware install ..\Oracle_BI1 directory.

You then need to restart the service and ..... yay.

Thursday, 7 June 2012

Just What is BEASVC?

When you install WebLogic as a service, you're really setting up beasvc.exe as the service. This is a tool that BEA/Oracle supplies with your WebLogic installation, and all it does is runs WebLogic using parameters stored in the Windows Registry.

For a list of all the parameters in beasvc use the -help switch
Note: Some of the parameters are only to be used on install.

D:\OBIEE11G\wlserver_10.3\server\bin>beasvc -help
Usage: beasvc <options>
OPTIONS:
Options should be separated by spaces.  '/' may be substituted for '-'.

        -install | -remove | -edit | -dump
                Install, remove or edit the specified service.
                -dump will issue Ctrl-Break signal to trigger threaddumps
        -svcname:<user_specified_service_name>
                Service name associated with this service.

Use the following options only when installing the service.
        -cmdline:<java_cmdline_parameters>
                Required java command line parameters.
                This should not include specification of the java command.
        -javahome:<java_home_directory>
                Root directory of targeted java distribution.
                The java command will be formed by appending \bin\java.
        -execdir:<base_directory_for_execution>
                Directory out of which this command will be executed.
        -extrapath:<additional_path_environment_settings>
                Additional path settings that will be prepended to the path
                applicable to this command execution only.
        -depend:<dependent_service_list>
                List of services seperated by ',' that this service
                depends on.
        -delay:<delay_milliseconds>
                Milliseconds the service will be in 'starting' status.
        -stopclass:<java_class>
                Java class, whose 'public static void stop()' is invoked
                during service stop.
        -log:<log_file_path>
                Log file, into which all stdout/stderr will be redirected
        -password:<system_password>
                System password to start WebLogic Server.
        -acctname:<windows_username>
                Windows user to run this service as. If not specified service
                runs as the user LOCALSYSTEM.
        -acctpass:<windows_password>
                Password for the windows user.
        -host:<host_to_ping>
                Host address to ping for status during startup.
        -port:<port_to_ping>
                Port to ping for status during startup.
        -maxconnectretries:<max_connect_attempts>
                Number of times to ping during startup for status.


BEASVC windows services.

For each server instance that you set up as a Windows service, WebLogic Server creates a key in the Windows Registry under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services. The registry entry contains such information as the name of the server and other startup arguments.



Debugging BEASVC.

If you are encountering errors with your service it may be worthwhile running in "debug" mode for a while.

To do this;
Firstly, navigate to the WL_HOME\server\bin directory
Then, assuming the service is called "beasvc AdminServer_AdminServer" issue the following
net stop “beasvc AdminServer_AdminServer”

Now our service is gracefully stopped we can debug the service.
D:\OBIEE11G\wlserver_10.3\server\bin>beasvc -debug "beasvc AdminServer_AdminServer"
This will give a lot more information than is available in the logs and console output.

Reference: http://docs.oracle.com/cd/E17904_01/web.1111/e13708/winservice.htm

Friday, 1 June 2012

OBIEE Remove Windows Service

In my previous post I dealt with creating services to start the weblogic components under windows services.

Apart from the risky editing of the registry (not usually recommended) you need a way to remove any services created using the beasvc utility.

You need to create a small file called removesvc.cmd

and edit the contents to
echo on
d:
cd D:\OBIEE11G\wlserver_10.3\server\bin
beasvc.exe -remove -svcname:"beasvc AdminServer_AdminServer"


this assumes of course that your WL_HOME is D:\OBIEE11G\wlserver_10.3 and that the service you wish to remove is called "beasvc AdminServer_AdminServer"

Wednesday, 30 May 2012

OBIEE 11.1.1.6 Windows service on Server 2008 64

Service install on OBIEE 11.1.1.6

To get your windows services to run properly under Windows Server 2008 64bit, you need to:
  1. make some small configuration changes.
  2. set-up a log file destination
  3. create the service.
Configuration changes

Edit the following files assuming that your Weblogic in stall is in D:\OBIEE11G.
D:\OBIEE11G\wlserver_10.3\common\bin
Edit  commEnv.cmd
Change the memory setting for MEM_ARGS

:sun
if "%PRODUCTION_MODE%" == "true" goto sun_prod_mode
set JAVA_VM=-client
set MEM_ARGS=-Xms32m -Xmx200m -XX:MaxPermSize=128m -XX:+UseSpinning
set JAVA_OPTIONS=%JAVA_OPTIONS% -Xverify:none
goto continue
:sun_prod_mode
set JAVA_VM=-server
set MEM_ARGS=-Xms512m -Xmx512m -XX:MaxPermSize=512m -XX:+UseSpinning
goto continue


Now D:\OBIEE11G\wlserver_10.3\server\bin
Edit installSvc.cmd and add the parts in bold

rem *** Set Command Line for service to execute within created JVM
@echo off
set JAVA_VM=-server
if "%ADMIN_URL%" == "" goto runAdmin
@echo on
set CMDLINE="%JAVA_VM% %MEM_ARGS% %JAVA_OPTIONS% -classpath \"%CLASSPATH%\" -Dweblogic.Name=%SERVER_NAME% -Dweblogic.management.username=%WLS_USER% -Dweblogic.management.server=\"%ADMIN_URL%\" -Dweblogic.ProductionModeEnabled=%PRODUCTION_MODE% -Djava.security.policy=\"%WL_HOME%\server\lib\weblogic.policy\" weblogic.Server"
goto finish

and then on the last line add a log file for help in debug.
rem *** Install the service
"%WL_HOME%\server\bin\beasvc" -install -svcname:"beasvc %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:"D:\OBIEE11G\user_projects\domains\bifoundation_domain\servers\AdminServer\Weblogic_server_output.txt"
ENDLOCAL

The last line starting log points to a file you appoint that will be the destination of your log output. The contents of this file are what you would normally see when starting OBIEE manually from the start menu.

It may be worth considering setting the file destination to be in a new directory (with no subdirectories) and sharing and setting permissions so that the contents can be viewed without having to go to the server.

Creating the Windows Service for OBIEE

Create a file called installService.cmd with the following contents, once again, assume that the install MW_HOME for your install is D:\OBIEE11G

SETLOCAL
set DOMAIN_NAME=AdminServer
set USERDOMAIN_HOME=D:\OBIEE11G\user_projects\domains\bifoundation_domain
set SERVER_NAME=AdminServer
set PRODUCTION_MODE=true
cd %USERDOMAIN_HOME%
call %USERDOMAIN_HOME%\bin\setDomainEnv.cmd
call "D:\OBIEE11G\wlserver_10.3\server\bin\InstallSvc.cmd"
ENDLOCAL


Run the installService.cmd. This creates a service that will automatically start the AdminServer component of OBIEE. If you have opted for a simple install then your analytics will be available once the service has fully started.