Running in Linux  Locate

Using the syslog Daemon with BEA AquaLogic Service Registry  Locate

The log4j system used in BEA AquaLogic Service Registry can be configured to send log messages to the syslog daemon. In order to utilize this feature, your system must be configured as follows:

  1. Change log4j in REGISTRY_HOME/conf/log4j.config. First add a syslog appender, as shown in Example 3. Note the following properties in particular:

    • syslogHost - Set to host name of the computer where syslog is running.

    • Facility - BEA AquaLogic Service Registry log message facility recognized by syslog.

    Example 3. log4j.config--syslog Appender

    # Appender to syslog
    log4j.appender.syslog=org.apache.log4j.net.syslogAppender
    log4j.appender.syslog.syslogHost=localhost         
    log4j.appender.syslog.Facility=local6         
    log4j.appender.syslog.layout=org.apache.log4j.PatternLayout         
    log4j.appender.syslog.layout.ConversionPattern=%p: %c{2} - %m%n
    

    Then add syslog to the value of the property log4j.category.com.systinet.wasp.events under # event monitoring, as follows:

    Example 4. log4j.config--Event Monitoring

    # event monitoring         
    log4j.category.com.systinet.wasp.events=INFO,eventLog,syslog
    
  2. Set the syslogd configuration to recognize log messages from BEA AquaLogic Service Registry. Implicitly, BEA AquaLogic Service Registry sends log messages to syslog under the facility local6. Therefore, modify the /etc/syslog.conf file by adding the following line of text:

    local6.* /var/log/registry.log

    BEA AquaLogic Service Registry will now log messages of all priorities into the file /var/log/registry.log. You should create this file now with appropriate permissions (otherwise syslogd will create it for you automatically with default permissions, which may not be suitable for you).

  3. Your syslog daemon must be started with remote logging enabled (the -r command line option). To make sure that:

    • syslogd is running, use the pgrep syslogd command.

    • remote logging is enabled, use the netstat -l command (syslog's udp port is 514).

    [Note]Note

    The local6 facility is not mandatory in any way. You may use other localX facilities instead.

Running BEA AquaLogic Service Registry as a UNIX Daemon  Locate

BEA AquaLogic Service Registry can be forced to start as a system daemon using the script REGISTRY_HOME/etc/bin/registry.sh. This script can be renamed registry as per UNIX conventions. The directions for using this script follow.

  1. Tailor the service script as needed. The meaning of variables is shown in Table 1, “Variables in the Systinet Registry Service Script”.

    Table 1. Variables in the Systinet Registry Service Script

    Name of variable in registry service scriptDescriptionDefault value
    REGISTRY_HOME

    Home directory of Systinet Registry

    BEA AquaLogic Service Registry Installation directory.

    JAVA_HOME

    Home directory of Java

    None. This variable must be set manually.

    REGISTRY_USER

    User under whom the BEA AquaLogic Service Registry should run. If this is set to root, it will be changed to "nobody".

    Determined during runtime according to the user who owns the REGISTRY_HOME directory. If the user is root, this value reverts to "nobody".

    TIMEOUT

    Number of seconds the system waits for BEA AquaLogic Service Registry to successfully start up.

    60 seconds.

  2. Rename the script registry (without the .sh extension) and save it in the /etc/init.d/ directory.

  3. (optional) To start BEA AquaLogic Service Registry automatically in the appropriate run-level, create SXXregistry and KXXregistry symbolic links in the appropriate /etc/rcX.d/ directory.

Now you may start and stop BEA AquaLogic Service Registry using the installed script. You can invoke this script directly or by using specific OS tools. For example, on RedHat, by using the redhat-config-services command.

The parameters of the script are shown in Table 2, “Parameters of init.d Scripts”.

Table 2. Parameters of init.d Scripts

ParameterFunction
startStarts BEA AquaLogic Service Registry
stopStops BEA AquaLogic Service Registry
restartRestarts BEA AquaLogic Service Registry
condrestartRestarts BEA AquaLogic Service Registry only if it is already running
statusDisplays whether BEA AquaLogic Service Registry is running or not
[Note]Note

The provided startup script may be run by the root user. The script uses the su command to run as REGISTRY_USER.