How can I collect more information from a failure of an oracledb, orainstance, or oralistener resource in a RHEL 5 or 6 High Availability cluster?
Environment
- Red Hat Enterprise Linux (RHEL) 5 or 6 with the High Availability Add On
rgmanager- One or more
oracledb,orainstance, ororalistenerresources from which extra verbosity is desired, such as if that resource is failing an operation
Issue
- My
oracledbresource is failing to start, but I don't get anything useful in the logs. Is there any way to get more verbose output? - If I try to start an
oracledbororainstanceresource viarg_test, I see no more output on the command line than I normally do when enabling the service withclusvcadm -e. How can I determine why the operation is failing? - Where does verbose output from the Oracle High Availability resource agents go?
- How can I generate debug logging for Oracle resources?
Root Cause
On more recent releases of resource-agents or rgmanager, the Oracle-related resource-agents (oracledb, orainstance, oralistener) have a modified logging method implemented that causes them to send their more verbose output to the daemon syslog facility using the logger utility. This mechanism is used for most outputs from the agent, including for the output from Oracle-specific processes and utilities that may give useful information about why an operation is failing or why something is not behaving as expected. The end result is that unless daemon.* is captured in syslog, then those messages may not be seen anywhere and certain failures or behaviors may be left unexplained.
The common reaction to such failures is to turn to rg_test to run the resource operation manually to get extra verbosity on the command line, but with these Oracle resource agents and the newer package releases, this generally won't produce any extra useful information, because those log messages are still going to daemon instead of to the command line as would occur with other resource types. As such, on these newer package releases, its best to capture that daemon output to a file, so that extra information is available for diagnosing behaviors that warrant a closer look.
Diagnostic Steps
When using an oracledb, orainstance, or oralistener agent, additional output from Oracle processes or from the resource agent itself can be obtained in one of two ways, depending on the release of High Availability packages deployed on the node:
-
Capturing output from the
daemonsyslogfacility to a log file -
Using
rg_testto manually execute an agent operation and get verbose output
Determining which method to use
The specific method to use depends on the RHEL release and High Availability package releases:
RHEL 6
-
With
resource-agents-3.9.2-21.el6_4.1and later, capture output from thedaemonfacility -
With earlier
resource-agentsreleases, userg_testto get verbose output
RHEL 5
-
With
rgmanager-2.0.52-37.el5_9.2and later, capture output from thedaemonfacility -
With earlier
rgmanagerreleases, userg_testto get verbose output
Capturing output from the daemon syslog facility to a log file
-
Add an entry to
/etc/rsyslog.conf(RHEL 6) or/etc/syslog.conf(RHEL 5) to capturedaemon.*to the desired log file. To send this output to/var/log/messages, simply adddaemon.*to the list of facilities going to that file on the line that should already exist:*.info;mail.none;authpriv.none;cron.none;daemon.* /var/log/messagesOr to log these messages to a separate file, create a new line pointing to the desired file path:
daemon.* /var/log/daemon.logNOTE: Many other applications use the
daemonsysylogfacility, so this may capture more than just the desired Oracle resource agent output. -
Now restart the
rsyslogddaemon (RHEL 6) orsyslogddaemon (RHEL 5) to apply the changes after saving the configuration:RHEL 6:
# service rsyslog restartRHEL 5:
# service syslog restart -
Now attempt to execute the operation for which extra verbosity is needed, using
clusvcadm,Conga, orrg_testNOTE: The below
rg_testmethod can still be used on the above mentioned releases, but the output on the command line will not be any more verbose than when starting withrgmanager. In other words, even ifrg_testis used to test resources, the abovesyslogcapture method should be implemented if extra verbosity is desired.
Using rg_test to manually execute an agent operation and get verbose output
Like with other resource agents, rg_test can be useful to start a resource and see the output on the command line. However, in those releases noted above for which capturing daemon syslog output is recommended, rg_test will actually not show much more verbose output on the command line than it would when starting through rgmanager with clusvcadm or Conga. However, on older releases, rg_test can still be useful.
For these releases, follow these instructions for using rg_test to perform the desired operation manually and see what it prints out.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments