Configuring queue managers for remote administration
You can administer a remote queue manager from a local queue manager by using the
administrative REST API, MQSC, or PCF commands. The remote
queue manager might be on the same system, in a different installation, or on a different system
with the same environment, or a different IBM® MQ
environment. Before you can remotely administer a queue manager from a local queue manager, you must
create a sender and receiver channel, a listener, and a transmission queue on each queue manager.
These channels and queues enable the commands to be sent to the remote queue manager and the
responses to be received on the local queue manager. The procedure to create these queues and
channels is the same whether you want to use the administrative REST API, MQSC, or PCF commands.
Before you begin
The following procedure uses example queue managers source.queue.manager, and
target.queue.manager. You must create and start these queue managers on your system
to follow these steps, or substitute your own queue manager names in the relevant steps.
The following procedure uses TCP/IP as the transport type. You must know the IP address of both
systems to complete this task.
The following procedure creates listeners that use the network ports 1818 on the local system
and 1819 on the remote system. You can use other ports, but must substitute your port values in the
appropriate steps.
You must run the commands in the procedure locally or over a network facility such as
Telnet.
About this task
Figure 1. Setting up channels and queues for remote administration
Figure 1 shows the configuration of queue managers, queues, and
channels that you need for remote administration:
The object source.queue.manager is the source queue manager from which you can
issue administrative REST API, MQSC, or PCF commands, and to
which the results of these commands are returned.
The object target.queue.manager is the name of the target queue manager, which
processes the commands and generates any operator messages.
Commands get put onto the transmission queue that has the same name as the remote queue manager.
In this case, target.queue.manager. A transmission queue is a specialized local
queue that temporarily holds messages before the MCA picks them up and sends them to the remote
queue manager.
The commands get sent by the source.to.target channel to the
SYSTEM.ADMIN.COMMAND.QUEUE on the remote queue manager. Each end of the channel has
a separate definition. One end is a sender and the other end is a receiver. The two definitions must
have the same name and together constitute a single message channel.
The command output is put on the remote transmission queue that has the same name as the local
queue manager from which the command was sent. In this case,
source.queue.manager.
The output is sent by the target.to.source channel to an appropriate reply
queue, where it is taken and output by the original command.
Procedure
On the remote system queue manager, ensure that the command queue
SYSTEM.ADMIN.COMMAND.QUEUE is present. This queue is created by default when a
queue manager is created.
On the remote system, check that the command server is running on the queue
manager. If the command server is not running, remote administration is not possible:
Start runmqsc for the queue manager. For example, for queue manager
target.queue.manager, enter the following command:
runmqsc target.queue.manager
Display the status of the command server by entering the following command:
DISPLAY QMSTATUS CMDSERV
Exit runmqsc by entering the following command:
end
If the command server is not started, start it. For example, for queue manager
target.queue.manager, enter the following command:
strmqcsv target.queue.manager
Define the channels, listener, and transmission queue on the local queue
manager:
Start runmqsc for the queue manager. For example, for queue manager
source.queue.manager, enter the following command:
runmqsc source.queue.manager
Define the sender channel. This sender channel must have the same name as the receiver
channel on the remote queue manager. For example, enter the following MQSC command, replacing the
value for CONNAME with the IP address for the remote queue manager and the port
number of the listener:
Define the receiver channel. This receiver channel must have the same name as the
sender channel on the remote queue manager. For example, enter the following command:
Define the listener on the local queue manager. For example, enter the following
command:
DEFINE LISTENER ('source.queue.manager') +
TRPTYPE (TCP) +
PORT (1818)
Define the transmission queue on the local queue manager. This transmission queue must
have the same name as the remote queue manager. For example, enter the following command:
Start the listener. For example, enter the following command:
START LISTENER ('source.queue.manager')
Exit runmqsc by entering the following command:
end
Define the channels, listener, and transmission queue on the remote queue
manager:
Start runmqsc for the queue manager. For example, for queue manager
target.queue.manager, enter the following command:
runmqsc target.queue.manager
Define the sender channel. This sender channel must have the same name as the receiver
channel on the local queue manager. For example, enter the following MQSC command, replacing the
value for CONNAME with the IP address for the local queue manager and port
number for the listener:
Define the receiver channel. This receiver channel must have the same name as the
sender channel on the local queue manager For example, enter the following command:
Display the queues on the remote queue manager by entering the following
command:
DISPLAY QUEUE (*)
On success, a list of queues from the remote queue manager is
displayed.
If these steps do not work, check that the channels on both systems are in a running state. If
the channels are not running, and do not start, check the channels and transmission queues are
configured correctly, and that the command server is running. For example, check that the correct
CONNAME is specified for the sender channels, and that the transmission queues have the correct
names. Also, check the queue manager logs for security exceptions that might help resolve the
issue.
Results
Your queue managers are configured to remotely administer the remote
queue manager from the local system.