1
votes

While taking backup of remote queue manager using dmpmqcfg command I am getting MQSC timed out waiting for a response from command server. Below is the command I am using.

dmpmqcfg -m <Queue Manager> -r <remote qmgr> -x all -a -o mqsc > D:\RemoteQueueManagerBackup\RemoteQmgr.txt

Before running this command I created a server and requester channel at both queue manager ends and when executed the above command channels are coming into running state but not able to take backup.

For few queue managers its working fine and for few its not working. I checked all the properties between running qmgr and other both looks same.

Update

Xmitq queue with the name queue manager is defined both ends eg: Queue Manager A Xmitq as B, For Queue Manager B Xmitq as A. Server and Requester channels are created. When the command is triggered channel are coming into Running state.

  • Any Errors returned from dmpmqcfg? --- No.
  • Whether DLQ is enabled and a queue of the specified name defined? - Yes
  • Presence or absence of messages on the DLQ at either end? - Messages are getting stored in Remote Queue Manager Dead Letter Queue.
  • Whether channels between the two QMgrs run when manually started (this can be a triggering problem instead of name resolution)? - Channels are running automatically ( triggering is enabled) No
  • Auth related errors? The only error we are seeing is

AMQ9544: Messages not put to destination queue.

Explanation: During the processing of channel "x.Y" one or more messages could not be put to the destination queue and attempts were made to put them to a dead-letter queue. The location of the queue is 2, where 1 is the local dead-letter queue and 2 is the remote dead-letter queue

Action: Examine the contents of the DLQ. Each message is contained in a structure that describes why the message was put to the queue, and to where it was originally addressed. Also look at previous error messages to see if the attempt to put messages to a dlq failed. The program identifier (PDI) of the processing program was '5608(10796)'

Examined Remote Dead Letter Queue Reason: MQRC_PERSISTENCE_NOT_ALLOWED

1
By the way, if you use -o 1line you can grep through the backup files to find objects meeting a certain criteria. For example, if you want to change all channels with CONNAME('1.2.3.4') to CONNAME('host.company.com') and use the 1line format a grep does the trick. Otherwise you have to write code to parse the MQSC across multiple lines.T.Rob
I changed for some of the xmitq's DEFPSIST as No and Now its working fine.Soni Kanth
I changed DEFPSIST value to NO for all the xmitq's and its working fine now for most of the queue managers ... but still seeing for some of them its not working. (Eg: of all 25 queue manager, 20 working fine, 5 not working)Soni Kanth

1 Answers

1
votes

You do not mention the details of the channels and their XMitQs. In order for the messages to get to the remote machine and the replies to get back each QMgr needs to be able to resolve a path to the other. That means something must have the name of the remote QMgr. That something must either be the XMitQ itself or a QMgr alias that points to the XMitQ.

For example you have <Queue Manager> and <remote qmgr>. The local QMgr may have a transmit queue named <remote qmgr> which resolves that destination. Since you do not report any errors from dmpmqcfg, I will assume the messages are getting sent out OK.

That means the messages are not getting back. This may be because the remote QMgr's XMitQ has a name like <Queue Manager>.XMITQ instead of <Queue Manager>. This can be solved by defining a QMgr alias:

DEF QREMOTE('<Queue Manager>') +
    XMITQ('<Queue Manager>.XMITQ') +
    RNAME(' ') +
    RQMNAME('<Queue Manager>') + 
    REPLACE

If this is in fact what's wrong, you should see some messages in the DLQ on the remote QMgr - assuming that one is defined and specified in the QMgr attributes.

If this does not solve the problem, please provide additional information including:

  • Any errors returned from dmpmqcfg
  • Whether DLQ is enabled and a queue of the specified name defined
  • Presence or absence of messages on the DLQ at either end
  • Whether channels between the two QMgrs run when manually started (this can be a triggering problem instead of name resolution)
  • Platforms of the QMgrs involved
  • Any relevant entries from the error logs, including auths errors (for example, mqm is a valid ID on Linux but not on Windows so would generate auths errors in this scenario if the sending QMgr were Linux and the remote QMgr Windows)

Update responding to additional info in question
So it looks like you have at least a couple of issues. The one that you have discovered is that temporary dynamic queues do not take persistent messages. If you think about it, this makes perfect sense. If a message is persistent, this tells MQ to take all precautions against losing it. But a temporary dynamic queue is deleted when the last input handle is released, discarding any messages that it holds.

Any attempt to put a persistent message onto a temporary dynamic queue sends conflicting signals to MQ. Should it accept a persistent message that it knows will be implicitly deleted? Or should it not delete the temporary dynamic queue in order to preserve the messages? Rather than try to guess the user's intent, it simply disallows the action. Thus, your persistent reply messages arrive at the local QMgr, find a temporary dynamic queue, and then are diverted to a DLQ.

You have already found the solution to this problem. Well, one of the solutions to this problem, anyway -- alter DEFPSIST so that the messages are non-persistent. Another solution would be to use the client connection capabilities of dmpmqcfg to connect directly to the remote QMgrs rather than routing through a local QMgr.

As to the remaining few QMgrs, you need to run the same diagnostic again. Check for error messages, depth in DLQ at both ends, channels running, auth errors. Remember that the resource errors, auth errors, routing problems, etc. can occur at either end so look for error messages and misrouted messages at both QMgrs. Also, verify channels by sending messages to and from both QMgrs to a known queue such as SYSTEM.DEFAULT.LOCAL.QUEUE or an application queue.

Another useful technique when playing a game of "where's my message" is to trace the message flow by stopping the channels in both directions prior to sending the commands. You can then run dmpmqcfg and see depth on the outbound XMitQ to verify the commands were sent. (You will have to GET-enable the XMitQ if you want to browse the messages since the channel agent GET-disables it. This will let you verify their persistence, expiry values, etc.)

Assuming the commands look OK you start the outbound channel only and let the messages flow to the remote QMgr where they are processed. Since the return channel is still stopped, the replies stack up in the return XMitQ. You can view them there to determine things like their persistence, expiry, and return codes/results of the command. If they look OK, start the channel and then look for them on the local QMgr.

For the few QMgrs where you still have issues, you should easily be able to find out where the messages are getting lost or being discarded. Keep in mind that non-persistent messages are sent across a channel outside any units of work so if there is no valid destination (or they aren't authorized to it) they are discarded silently. This diagnostic method of trapping them on XMitQs isolates each step so that if they are being discarded you can find out where and why.