+

Search Tips | Advanced Search

Reverting to the previous maintenance level on Linux

We can remove updates and revert to the previous maintenance level of IBM MQ by using RPM. The same procedure applies to all Linux platforms, including Ubuntu.


Before starting

If we are running on a server with multiple IBM MQ installations, we must identify the installation. Make sure that the commands you enter run against the correct installation; see setmqenv.


About this task

When maintenance is applied, the original versions of replaced files are saved to allow the updates to be removed if necessary. To restore the previous maintenance level, run an RPM Package Manager (RPM) uninstall command for all the packages that were updated by the maintenance package as follows:


Procedure

  1. Log in as a user in group mqm.
  2. Stop all applications using the IBM MQ installation.

    If we use the Managed File Transfer (MFT) component, ensure that any MFT agents have finished all of the file transfers that they were engaged in. There should be no incomplete transfers associated with the agents, and their SYSTEM.FTE.STATE queues should contain no messages.

  3. End all the activity of queue managers associated with the IBM MQ installation.
    1. Run the dspmq command to list the state of all the queue managers on the system.

      Run either of the following commands from the installation that we are updating:

      dspmq -o installation -o status
      dspmq -a
      

      dspmq -o installation -o status displays the installation name and status of queue managers associated with all installations of IBM MQ.

      dspmq -a displays the status of active queue managers associated with the installation from which the command is run.

    2. Use the MQSC command DISPLAY LSSTATUS to list the status of listeners associated with a queue manager, as shown in the following example:
      echo "DISPLAY LSSTATUS(*) STATUS" | runmqsc QmgrName
      
    3. Run the endmqm command to stop each running queue manager associated with this installation. endmqm -c-w-i-p QmgrName

      The endmqm command informs an application that the queue manager it is connected to is stopping; see Stopping a queue manager.

      For the maintenance to proceed, applications must respond to an endmqm command by disconnecting from the queue manager and releasing any IBM MQ libraries they have loaded. If they do not, we must find another way to force applications to release IBM MQ resources, such as by stopping the applications.

      We must also stop applications that are using the client libraries that are part of the installation. Client applications might be connected to a different queue manager, running a different installation of IBM MQ. The application is not informed about queue managers in the current installation being shut down.

      Any applications that continue to have IBM MQ shared libraries from the installation loaded prevent you applying IBM MQ maintenance. An application might disconnect from a queue manager, or be forcibly disconnected, but keep an IBM MQ shared library loaded.

      Note: Applying maintenance level updates to multi-instance queue managers on UNIX and Linux describes how to apply maintenance to a multi-instance queue manager. A multi-instance queue manager can continue to run on one server, while maintenance is applied to another server.
    4. Stop any listeners associated with the queue managers, using the command:
      endmqlsr -m QMgrName
      

  4. Log in as root, or switch to the superuser using the su command.
  5. Run the rpm command to find out which packages are installed on your server.

    Enter the following command:

    rpm -qa | grep MQSeries
    
    Note: If we are using Ubuntu, add the --force-debian attribute.
    rpm --force-debian -qa | grep MQSeries
    
    Using the example given in Applying maintenance level updates on Linux using RPM, returns:
    MQSeriesRuntime-V.R.0-0
    MQSeriesSDK-V.R.0-0
    MQSeriesServer-V.R.0-0
    MQSeriesRuntime-Uxxxx-V.R.0-1
    MQSeriesSDK-Uxxxx-V.R.0-1
    MQSeriesServer-Uxxxx-V.R.0-1
    
    where V is the version number and R is the number of the Release. Note: If we are using the RDQM facility you might need to use a different process to revert to a prior level. This involves removing the RDQM support using the supplied script and reinstalling from the media supplied with the earlier version.

    See Installing RDQM (replicated data queue managers) for more information.

  6. Run the rpm command to remove all the updates applied at level 1.

    Enter the following commands:

    rpm -ev MQSeriesRuntime-Uxxxx-V.R.0-1 MQSeriesSDK-Uxxxx-V.R.0-1
    MQSeriesServer-Uxxxx-V.R.0-1
    
    where V is the version number and R is the number of the Release.
  7. Repeat step 5 to check that the ptf packages have been removed, leaving only the original installation packages:
    MQSeriesRuntime-V.R.0-0
    MQSeriesSDK-V.R.0-0
    MQSeriesServer-V.R.0-0
    
    where V is the version number and R is the number of the Release.


What to do next

For further information on using RPM to install software packages, see the Linux documentation. Parent topic: Applying and removing maintenance on UNIX and Linux


Related tasks


Related information

Last updated: 2020-10-04