AMQ7315 or AMQ7316 errors after deleting messages from the SYSTEM.ADMIN.ACCOUNTING.QUEUE and SYSTEM.ADMIN.STATISTICS.QUEUE

Technote (FAQ)


Question

You want to know if you can delete messages from the WebSphere MQ SYSTEM.ADMIN.ACCOUNTING.QUEUE or SYSTEM.ADMIN.STATISTICS.QUEUE?

Cause

You notice one of the following errors in the logs of the queue manager:


AMQ7315: Failed to put message to accounting queue. Reason(2053)
EXPLANATION: The attempt to put a message containing accounting data to the queue SYSTEM.ADMIN.ACCOUNTING.QUEUE failed with reason code 2053. The message data has been discarded. This error message will be written only once for attempts to put a message to the queue as part of the same operation which fail for the same reason.
ACTION: Ensure that the queue SYSTEM.ADMIN.ACCOUNTING.QUEUE is available and operational.

AMQ7316: Failed to put message to statistics queue. Reason(2053)
EXPLANATION: The attempt to put a message containing statistics data to the queue SYSTEM.ADMIN.STATISTICS.QUEUE failed with reason code 2053. The message data has been discarded. This error message will be written only once for attempts to put a message to the queue as part of the same operation which fail for the same reason.
ACTION: Ensure that the queue SYSTEM.ADMIN.STATISTICS.QUEUE is available and operational.

You can use the "mqrc" utility to find the meaning of the Reason Code 2053:

% mqrc 2053
2053 0x00000805 MQRC_Q_FULL

The most likely cause for this problem is that the queue is full of messages and cannot receive another message.


Answer

In general, you should not delete messages from any of the WebSphere MQ SYSTEM.* queues.

Recommended ways:

a) The sample monitoring utility "amqsmon" can be used to get the messages from the queues and display the information contained in the messages. The default mode is to do a destructive "get" of these messages and thus, this would clear up the messages from those queues.

b) Restart the queue manager: the messages in the SYSTEM.ADMIN.* queues are non-persistent, which means, that they do not survive a restart of the queue manager.

Alternative way:

You could use runmqsc to CLEAR the messages from these 2 queues and if you are very careful, you will not damage the configuration.

CAVEAT: You need to be very careful because if you make a typo and accidentally delete the contents of other SYSTEM queues, you may corrupt the queue manager and then you may have to delete the entire queue manager and recreate it.
CLEAR QLOCAL(SYSTEM.ADMIN.ACCOUNTING.QUEUE)
CLEAR QLOCAL(SYSTEM.ADMIN.STATISTICS.QUEUE)

In case the CLEAR command fails (such as reporting that the queue has been opened by another process), then you could use the following sample program, which will get every message from the queue (in a destructive get mode):

amqsget SYSTEM.ADMIN.STATISTICS.QUEUE QueueManager


Additional information
The SYSTEM.ADMIN.ACCOUNTING.QUEUE and SYSTEM.ADMIN.STATISTICS.QUEUE are used by the monitoring feature introduced in WebSphere MQ V6. If monitoring is enabled, then accounting and statistics messages are placed on these queues. These messages are generated at the end of the queue manager accounting and statistics interval, and when the reset queue manager statistics command is issued via runmqsc:
RESET QMGR TYPE(STATISTICS)

If you notice that there are messages on these queues, this indicates that the queue manager accounting, or the statistics monitoring feature of MQ has been enabled.

You can disable the queue manager accounting or the statistics monitoring features using runmqsc commands. Example:
ALTER QMGR ACCTQ(OFF) STATQ(OFF)

The queue manager may continue creating statistics records (2 scenarios to consider)

Scenario 1: After you turn off the statistics for the queue manager, you may notice that you still see new statistics messages being added to the system queue. The reason is that the change of the STATQ attribute does not affect those queues which are already open (very likely SYSTEM.* queues), and thus, these queues may be generating new statistics messages. You will need to restart the queue manager for these queues to stop generating new statistics.

Scenario 2:
Let's suppose that you ensure that STATQ is OFF at the queue manager level and then you restart the queue manager to avoid the situation mentioned in Scenario 1 (above):
display qmgr statq
AMQ8408: Display Queue Manager details.
QMNAME(QM_701) STATQ(OFF)

But you keep seeing new messages being added to the SYSTEM.ADMIN.STATISTICS.QUEUE.

The most likely reason is that an explicit and manual alteration was done to at least one of the queues for the attribute STATQ.
The default when a queue is created is STATQ equals QMGR, which means that the behavior of the statistics gathering is based on the overall setting of the queue manager.
The following is an example of the default STATQ:
display ql(Q1) statq
AMQ8409: Display Queue details.
QUEUE(Q1) TYPE(QLOCAL)
STATQ(QMGR)

Thus, if the queue manager is NOT collecting statistics, then the queues that have the default attribute of STATQ(QMGR) will NOT collect statistics.
But if the overall switch of STATQ is turned on at the queue manager level, then all the queues that have STATQ(QMGR) will collect statistics.

However, it is possible to override this general behavior.
Let's suppose that you are interested in the statistics for ONLY one or a subset of queues, then you can keep the overall setting at the queue manager STATQ being OFF, but for the selected few queues, you can change it to:
ALTER QL(Q1) STATQ(ON)
Then the statistics will be gathered ONLY for this queue (subset of queues).

You can use the following runmqsc command to display those queues that have STATQ equal ON:
display ql(*) where(STATQ EQ ON)
AMQ8409: Display Queue details.
QUEUE(Q1) TYPE(QLOCAL)
STATQ(ON)

Then you can decide if you want to keep getting the statistics or stop getting them: you will need to use the ALTER command for STATQ(QMGR) for the queues listed in the output of the above DISPLAY command.


References:

Product Alias/Synonym

WebSphere MQ WMQ

Rate this page:

(0 users)Average rating

Document information


More support for:

WebSphere MQ
SMF Accounting/Statistics

Software version:

6.0, 7.0, 7.1, 7.5

Operating system(s):

AIX, HP-UX, Linux, Solaris, Windows

Reference #:

1377808

Modified date:

2013-03-01

Translate my page

Machine Translation

Content navigation