[UNIX, Linux, Windows]

Error logs on UNIX, Linux, and Windows

The errors subdirectory, which is created when you install IBM® MQ, can contain up to three error log files.

At installation time, an errors subdirectory is created in the /var/mqm file path under UNIX and Linux® systems, and in the installation directory, for example C:\Program Files\IBM\MQ\ file path under Windows systems. The errors subdirectory can contain up to three error log files named:
  • AMQERR01.LOG
  • AMQERR02.LOG
  • AMQERR03.LOG

For more information about directories where log files are stored, see Error log directories on UNIX, Linux, and Windows.

After you have created a queue manager, it creates three error log files when it needs them. These files have the same names as those files in the system error log directory. That is, AMQERR01, AMQERR02, and AMQERR03, and each has a default capacity of [V9.0.4 Oct 2017]32 MB (33554432 bytes). The capacity can be altered in the Extended queue manager properties page from the IBM MQ Explorer, or in the QMErrorLog stanza in the qm.ini file. These files are placed in the errors subdirectory in the queue manager data directory that you selected when you installed IBM MQ or created your queue manager. The default location for the errors subdirectory is /var/mqm/qmgrs/ qmname file path under UNIX and Linux systems, and C:\Program Files\IBM\MQ\qmgrs\ qmname \errors file path under Windows systems.

[V9.0.4 Oct 2017]As error messages are generated, they are placed in AMQERR01. When AMQERR01 gets bigger than 32 MB it is renamed to AMQERR02.

The latest error messages are thus always placed in AMQERR01, the other files being used to maintain a history of error messages.

All messages relating to channels are also placed in the appropriate error files belonging to the queue manager, unless the queue manager is unavailable, or its name is unknown. In which case, channel-related messages are placed in the system error log directory.

To examine the contents of any error log file, use your usual system editor.

An example of an error log

Figure 1 shows an extract from an IBM MQ error log:
Figure 1. Sample IBM MQ error log

17/11/2014 10:32:29 - Process(2132.1) User(USER_1) Program(runmqchi.exe)
Host(HOST_1) Installation(Installation1)
VRMF(8.0.0.0) QMgr (A.B.C)
AMQ9542: Queue manager is ending.

EXPLANATION:
The program will end because the queue manager is quiescing.
ACTION:
None.
----- amqrimna.c : 931 -------------------------------------------------------

Operator messages

Operator messages identify normal errors, typically caused directly by users doing things like using parameters that are not valid on a command. Operator messages are national-language enabled, with message catalogs installed in standard locations.

These messages are written to the associated window, if any. In addition, some operator messages are written to the AMQERR01.LOG file in the queue manager directory, and others to the equivalent file in the system error log directory.

Error log access restrictions

Certain error log directories and error logs have access restrictions.
To gain the following access permissions, a user or application must be a member of the mqm group:
  • Read and write access to all queue manager error log directories.
  • Read and write access to all queue manager error logs.
  • Write access to the system error logs.

If an unauthorized user or application attempts to write a message to a queue manager error log directory, the message is redirected to the system error log directory.

Ignoring error codes under UNIX and Linux systems

On UNIX and Linux systems, if you do not want certain error messages to be written to a queue manager error log, you can specify the error codes that are to be ignored using the QMErrorLog stanza.

For more information, see Queue manager error logs.

Ignoring error codes under Windows systems

On Windows systems, the error message is written to both the IBM MQ error log and the Windows Application Event Log. The error messages written to the Application Event Log includes messages of error severity, warning severity and information severity. If you do not want certain error messages to be written to the Windows Application Event Log, you can specify the error codes that are to be ignored in the Windows registry.
Use the following registry key:

HKLM\Software\IBM\WebSphere MQ\Installation\MQ_INSTALLATION_NAME\IgnoredErrorCodes
where MQ_INSTALLATION_NAME is the installation name associated with a particular installation of IBM MQ.

The value that you set it to is an array of strings delimited by the NULL character, with each string value relating to the error code that you want ignored from the error log. The complete list is terminated with a NULL character, which is of type REG_MULTI_SZ.

For example, if you want IBM MQ to exclude error codes AMQ3045, AMQ6055, and AMQ8079 from the Windows Application Event Log, set the value to:

AMQ3045\0AMQ6055\0AMQ8079\0\0
The list of messages you want to exclude is defined for all queue managers on the machine. Any changes you make to the configuration will not take effect until each queue manager is restarted.