Removing a queue manager from a cluster: Alternative method

Remove a queue manager from a cluster, in scenarios where, because of a significant system or configuration issue, the queue manager cannot communicate with any full repository in the cluster.

Before you begin

This alternative method of removing a queue manager from a cluster manually stops and deletes all cluster channels linking the removed queue manager to the cluster, and forcibly removes the queue manager from the cluster. This method is used in scenarios where the queue manager that is being removed cannot communicate with any of the full repositories. This might be (for example) because the queue manager has stopped working, or because there has been a prolonged communications failure between the queue manager and the cluster. Otherwise, use the most common method: Removing a queue manager from a cluster.

About this task

This example task removes the queue manager LONDON from the INVENTORY cluster. The INVENTORY cluster is set up as described in Adding a queue manager to a cluster, and modified as described in Removing a cluster queue from a queue manager.

The process for removing a queue manager from a cluster is more complicated than the process of adding a queue manager.

When a queue manager joins a cluster, the existing members of the cluster have no knowledge of the new queue manager and so have no interactions with it. New sender and receiver channels must be created on the joining queue manager so that it can connect to a full repository.

When a queue manager is removed from a cluster, it is likely that applications connected to the queue manager are using objects such as queues that are hosted elsewhere in the cluster. Also, applications that are connected to other queue managers in the cluster might be using objects hosted on the target queue manager. As a result of these applications, the current queue manager might create additional sender channels to establish communication with cluster members other than the full repository that it used to join the cluster. Every queue manager in the cluster has a cached copy of data that describes other cluster members. This might include the one that is being removed.

This procedure might be appropriate in an emergency, when it is not possible to wait for the queue manager to leave the cluster gracefully.

Procedure

  1. Before you remove the queue manager from the cluster, ensure that the queue manager is no longer hosting resources that are needed by the cluster:
    • If the queue manager hosts a full repository, complete steps 1-6 from Moving a full repository to another queue manager. If the full repository functionality of the queue manager to be removed is not to be moved to a different queue manager, it is only necessary to complete steps 5 and 6.
    • If the queue manager hosts cluster queues, complete steps 1-7 from Removing a cluster queue from a queue manager.
    • If the queue manager hosts cluster topics, either delete the topics (for example by using the DELETE TOPIC command), or move them to other hosts as described in Moving a cluster topic definition to a different queue manager.
      Note: If you remove a queue manager from a cluster, and the queue manager still hosts a cluster topic, then the queue manager might continue to attempt to deliver publications to the queue managers that are left in the cluster until the topic is deleted.
  2. Stop all channels used to communicate with other queue managers in the cluster. Use MODE(FORCE) to stop the CLUSRCVR channel, on queue manager LONDON. Otherwise you might need to wait for the sender queue manager to stop the channel:
    
    STOP CHANNEL(INVENTORY.LONDON) MODE(FORCE)
    STOP CHANNEL(INVENTORY.TORONTO)
    STOP CHANNEL(INVENTORY.PARIS)
    STOP CHANNEL(INVENTORY.NEWYORK)
    
  3. Monitor the channel states, on queue manager LONDON, until the channels stop:
    
    DISPLAY CHSTATUS(INVENTORY.LONDON)
    DISPLAY CHSTATUS(INVENTORY.TORONTO)
    DISPLAY CHSTATUS(INVENTORY.PARIS)
    DISPLAY CHSTATUS(INVENTORY.NEWYORK)
    
    No more application messages are sent to or from the other queue managers in the cluster after the channels stop.
  4. Delete the manually defined cluster channels, on queue manager LONDON:
    
    DELETE CHANNEL(INVENTORY.NEWYORK)
    DELETE CHANNEL(INVENTORY.TORONTO)
    
  5. The remaining queue managers in the cluster still retain knowledge of the removed queue manager, and might continue to send messages to it. To purge the knowledge from the remaining queue managers, reset the removed queue manager from the cluster on one of the full repositories:
    
    RESET CLUSTER(INVENTORY) ACTION(FORCEREMOVE) QMNAME(LONDON) QUEUES(YES)
    
    If there might be another queue manager in the cluster that has the same name as the removed queue manager, specify the QMID of the removed queue manager.

Results

The queue manager LONDON is no longer part of the cluster. However, it can still function as an independent queue manager.

What to do next

The result of these changes can be confirmed by issuing the following command on the remaining members of the cluster:

DISPLAY CLUSQMGR(LONDON)
The queue manager continues to be displayed until the auto-defined cluster sender channels to it have stopped. You can wait for this to happen, or, continue to monitor for active instances by issuing the following command:

DISPLAY CHANNEL(INVENTORY.LONDON)
After the changes are propagated throughout the cluster, and no more messages are being delivered to this queue manager, delete the CLUSRCVR channel on LONDON:

DELETE CHANNEL(INVENTORY.LONDON)

The removed queue manager can be added back into the cluster at a later point as described in Adding a queue manager to a cluster. The removed queue manager continues to cache knowledge of the remaining members of the cluster for up to 90 days. If you prefer not to wait until this cache expires, it can be forcibly removed as described in Restoring a queue manager to its pre-cluster state.