Pages

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

No comments:

Post a Comment