4 Understanding Process Control of Oracle Internet Directory Components

This chapter describes the Oracle Internet Directory process control architecture and related concepts for the LDAP server and the replication server processes. It includes starting, stopping, and monitoring the Oracle Internet Directory processes and some best practices for process control.

For information on creating and destroying Oracle Internet Directory server instances, see Managing Oracle Internet Directory Instances.

For information on starting and stopping the Oracle Directory Integration Platform server refer to Oracle Directory Integration Platform .

4.1 Oracle Internet Directory Process Control Architecture

The Node Manager is a daemon process that monitors Oracle Fusion Middleware system components, including Oracle Internet Directory. Oracle Enterprise Manager Fusion Middleware Control uses Node Manager to stop or start instances of Oracle Internet Directory. If you stop or start Oracle Internet Directory components from the command line, you use WLST, the command-line interface to Node Manager.

See Managing Oracle Internet Directory Instances.

The Node Manager is responsible for the direct start, stop, restart and monitoring of the daemon process, OIDMON ($ORACLE_HOME/bin/oidmon). OIDMON is responsible for the process control of an Oracle Internet Directory instance. Since 11g Release 1, you can have multiple instances of Oracle Internet Directory on the same Oracle instance on the same node. The recommended way to create a new Oracle Internet Directory instance is to create a Oracle Fusion Middleware component of type OID. Each Oracle Internet Directory instance created in this manner has its own OIDMON.

Figure 4-1 shows the overall architecture for Oracle Internet Directory process control. For each Oracle Fusion Middleware component of type OID, the Node Manager spawns an OIDMON process. The figure shows two components, oid1 and oid2. OIDMON spawns the OIDLDAPD dispatcher process, then the dispatcher process spawns one or more OIDLDAPD server processes.

Since Oracle Internet Directory 11g Release 1 (11.1.1.7.0), the OIDLDAPD process is separated as the OIDDISPD (dispatcher) process and the OIDLDAPD (server) process. On UNIX and Linux systems, however, the ps -ef command will continue to show both of these processes as OIDLDAPD at runtime.

If replication is configured for that instance, OIDMON spawns a replication server process. Each dispatcher process has its own non-SSL and SSL port for receiving requests. The number of OIDLDAPD server processes that the dispatcher spawns for a component is controlled by the attribute orclserverprocs in the instance-specific configuration entry for the component.

Note:

If the log file size increases over 1 MB regardless the settings specified for orclmaxlogfilesize then OID Monitor (OIDMON) and OIDDISPD (dispatcher) log files are rotated after restarting Oracle Internet Directory.

Figure 4-1 Oracle Internet Directory Process Control Architecture

Oracle Internet Directory Process Control Architecture

See Managing Oracle Internet Directory Instances for information about creating new Oracle Internet Directory instances.

4.2 The ODS_PROCESS_STATUS Table in Oracle Internet Directory

Oracle Internet Directory process information is maintained in the ODS_PROCESS_STATUS table in the ODS database user schema. OIDMON reads the contents of the table at a specified interval and acts upon the intent conveyed by the contents of that table. The interval is controlled by the value of the sleep command line argument used at OIDMON startup, and the default value is 10 seconds.

Table 4-1 describes the information in the ODS_PROCESS_STATUS table that is relevant to process control:

Table 4-1 Process Control Items in the ODS_PROCESS_STATUS Table

Item Meaning

Instance

Unique instance number for a given server ID on a given host

PID

Process ID of the server that is up and running

ServerID

Server ID (2=OIDLDAPD, 3=OIDREPLD)

Flags

Command line arguments that must be passed to the server instance

Hostname

Name of the host on which this server must be present

State

State of the Server Instance (0=stop, 1=start, 2=running, 3=restart, 4=shutdown, 5=failed-over, 7=delete, 8=add). OIDMON updates the state.

RetryCount

Number of attempts to start the server instance before it could be started successfully

Instancename

Name of the server instance, for example: server1

Compname

Name of the server component, for example: OID1

Note:

  • There is a uniqueness constraint on: Instance, Instancename, Compname, ServerID, and Hostname.

  • Details about ODS_PROCESS_STATUS are provided here for informational purposes only. Do not attempt to modify this table directly.

4.3 Starting, Stopping, and Monitoring of Oracle Internet Directory Processes

Understand about the events that occur when Node Manager starts and stops Oracle Internet Directory. It also describes process monitoring.

This section contains the following topics:

4.3.1 Starting Oracle Internet Directory Using WLST Command

Understand the process of starting an Oracle Internet Directory using WebLogic Scripting Tool (WLST) commands.

To start Oracle Internet Directory, follow the below given procedure:

  1. You start an Oracle Internet Directory instance with Oracle Enterprise Manager Fusion Middleware Control or with the WLST command start().
  2. Node Manager issues an oidmon start command with appropriate arguments.
  3. OIDMON then starts all Oracle Internet Directory Server instances whose information in the ODS_PROCESS_STATUS table has state value 1 or 4 and DOMAIN_HOME, COMPONENT_NAME, INSTANCE_NAME values matching the environment parameters set by the Node Manager.

4.3.2 Shutting Down Oracle Internet Directory Using WLST Command — shutdown ()

Understand the process and prerequisites to shut down an Oracle Internet Directory using WebLogic Scripting Tool (WLST) commands.

Note:

  • Before executing the shutdown() command, ensure that you connect to the weblogic server by using the connect command.

    The syntax for connecting to weblogic admin server is:

    connect(username='weblogic',password='weblogic-password',url='t3://admin-server-host:admin-server-port')
  • Ensure that the Node Manager is up and running on the machine where you want to shutdown Oracle Internet Directory instance.

  • Alternatively, you can shutdown Oracle Internet Directory instance using stopComponent.sh command. Before executing stopComponent.sh command, ensure that the Node Manager is up and running. You need not connect to WebLogic Server to execute stopComponent.sh command. The syntax for stopComponent.sh is:

    $DOMAIN_HOME/bin/stopComponent.sh <instance-name>

To Shutdown the Oracle Internet Directory instance, type:

shutdown(name='instance-name',type='OID'))

4.3.3 Server Process Monitoring Using Node Manager

Node Manager does not monitor server processes directly. The Node Manager monitors OIDMON and OIDMON monitors the server processes.

The events are as follows:

  • When you start OIDMON through Node Manager, the Node Manager starts OIDMON and ensures that OIDMON is up and running.

  • If OIDMON goes down for some reason, Node Manager brings it back up.

  • OIDMON monitors the status of the Oracle Internet Directory dispatcher process, LDAP server processes, and replication server process and makes this status available to Node Manager and Fusion Middleware Control.

4.4 Oracle Internet Directory Replication-Server Control and Failover

Understand the process control and failover for the Oracle Internet Directory replication server (oidrepld) in a Maximum Availability Architecture (MAA).

This section contains the following topics:

4.4.1 Understanding the OID Monitor and Replication Server Failover

On each node, the Node Manager is responsible for the direct start, stop, restart, and monitoring of the OID Monitor process (oidmon). The OID Monitor is then responsible for the process control of an Oracle Internet Directory component, including the LDAP server processes and the replication server (oidrepld) process, if replication is configured for the instance.

In a Maximum Availability Architecture (MAA), these processes run as follows:

  • Multiple OID Monitor processes can be running on a node and can connect to the same Oracle database. Each OID Monitor is responsible for an Oracle Internet Directory component, such as oid1 and oid2. However, only one OID Monitor performs high availability operations.

  • If replication is configured, the replication server process should be running on only one node at any given time.

Every 60 seconds, the OID Monitor reports that it is running by sending a message to the Oracle database. The OID Monitor also polls the database to determine if any of the other nodes have failed. The OID Monitor uses the ODS_PROCESS_STATUS and ODS_SHM tables to communicate the starting and stopping of processes and the metadata changes across the nodes.

On the node running the replication server, the OID Monitor detects if the replication server is not responding and then tries to restart it. If the restart fails, the replication server is started on one of the surviving nodes, using the following logic:

  • Pull logic: If an OID Monitor detects that another OID Monitor is down on another node for more than the configured time (specified by the orclfailoverenabled attribute), then the OID Monitor treats that node as failed and starts the replication server on its node.

  • Push logic: The local OID Monitor on a node can push a failed replication server to another node by requesting that the OID Monitor on the other node start the process. An OID Monitor cannot start a replication server process on another node.

Later, if the failed node comes back up and the OID Monitor is restarted on that node, the OID Monitor will detect that another node is running the replication server. The OID Monitor will then request that the OID Monitor on the other node stop the replication server so that it can start the replication server on the original node.

4.4.2 Enabling Failover for Oracle Internet Directory Processes

The orclfailoverenabled attribute is a configuration entry ("cn=configset,cn=oidmon,cn=subconfigsubentry") that configures failover for Oracle Internet Directory processes.

This attribute specifies the failover time in minutes before the OID Monitor will start failed processes on a surviving node. The default failover time is 5 minutes. A value of zero (0) specifies that Oracle Internet Directory processes will not fail over to another node.

For example, if the OID Monitor on NodeB detects that NodeA has not responded for the time specified by orclfailoverenabled, NodeB considers NodeA as having failed. NodeB then retrieves the necessary information from the Oracle database about the Oracle Internet Directory processes that were running on NodeA and tries to start them on NodeB.

To check the orclfailoverenabled attribute for the current failover time:

ldapsearch -h oid_host  p oid_port -D "cn=orcladmin" -q -s base \
-b "cn=configset,cn=oidmon,cn=subconfigsubentry" objectclass=* orclfailoverenabled

To specify a different failover time, set the value of the orclfailoverenabled attribute. For example, to set the failover time to 10 minutes:

ldapmodify -h oid_host  p oid_port -D "cn=orcladmin" -q -f enablerepl.ldif

where enablerepl.ldif contains:

dn: cn=configset,cn=oidmon,cn=subconfigsubentry
changetype: modify
replace: orclfailoverenabled
orclfailoverenabled: 10

4.5 Oracle Internet Directory Process Control: Best Practices

Learn about the best practices for using wlst and oidctl.

The recommended approach is as follows:

  • Use wlst to stop or start Oracle Internet Directory as a component. That is, use it to stop or start all Oracle Internet Directory LDAP and replication server instances.

    • Using stopComponent.sh to stop Oracle Internet Directory causes Node Manager to issue an oidmon stop, which results in OIDMON shutting down all configured LDAP and replication server instances.

    • Using startComponent.sh to start Oracle Internet Directory causes Node Manager to issue an oidmon start, which results in OIDMON starting up all configured LDAP and replication server instances.

    See Also:

  • Use oidctl to stop and start an Oracle Internet Directory Replication Server Instance without affecting the associated OIDMON and LDAP server instance managed by OIDMON.

    See Also: