This document contains official content from the BMC Software Knowledge Base. It is automatically updated when the knowledge article is modified.
TrueSight Middleware Monitor
BMC Middleware and Transaction Management
BMC Middleware Management BMC Middleware Management - Performance and Availability BMC Middleware Management - Transaction Monitoring BMC Middleware Monitoring BMC TrueSight Middleware Monitor BMC TrueSight Middleware Transaction Monitor
WebSphere MQ monitoring and WebSphere MQ configuration does not work and log messages like the ones below can be found in qpcfg.log and qpmon.log.
load_library (libmqm.a(libmqm.o)) dlopen failed: 0509-022 Cannot load module libmqm.o.
0509-036 Cannot load program qpcfg because of the following errors: 0509-150 Dependent module /usr/mqm/lib64/libmqm.a(libmqm.o) could not be loaded.
0509-103 The module has an invalid magic number.
The errors above suggest that the WebSphere MQ monitoring extension (qpmon) and the WebSphere MQ configuration extension cannot load a WebSphere MQ shared object (library).
In TMTM 8, the default qpmon and qpcfg unix WMQ extensions are now 64-bit applications (Windows extensions are 32 bit). These programs need to be able to find the corresponding 64-bit WebSphere MQ libraries.
IMPORTANT: Ensure that this change does not conflict for other applications. For example, you may have 32-bit MQ applications on Linux that are started under the same user as the 64-bit qpmon and thus require the reverse order. In that case, you need to define a separate user profile under which to run qpmon/qpcfg.
[qpasa@clm-aus-007431 ~]$ dspmqinst InstName: Installation1 InstDesc: Identifier: 1 InstPath: /opt/mqm Version: 220.127.116.11 Primary: Yes State: AvailableCheck for the the value "primary". If any installation is primary, you do NOT need to set a default installation path or run setmqenv. Which means the only task you need be concerned with is setting the environment variables properly, and then you can skip both Option 1 and Option 2 below. If primary is not set, note the values for InstPath and InstName. These are the critical values we need to know later on.
Setting Environment Variables ProperlyMake sure you know what bit level of qpmon and qpcfg you are running. Use the unix file command to find out. In the output below, you can see that qpmon is a 64 bit program.
Extensions (qpmon/qpcfg) could fail to start if the library path (LIBPATH / LD_LIBRARY_PATH) includes the wrong directory order. To prevent an error, ensure that the library path is set correctly (the lib directory appear before the lib64 directory, or the reverse).
If you are running the 64-bit version of an extension, put the lib64 directory first. If you are running a 32-bit extension, put the lib directory first. You must keep both directories on the library path because WebSphere MQ programs still require a reference to both directories to run. The locations for the libraries must be consistent with the MQ installation you want to work with. These environment variable setting needs to be incorporated into the user profile so that they persist across sessions.
Setting the Installation Path
Proceed only if there is no primary installation configured. If a primary installation is configured, you are done!
Option 1: Set DefaultMQInstallationPath PreferenceUse agentpref to set the DefaultMQInstallationPath, using the value for InstPath we learned from running dspmqinst:
agentpref.sh --set "WebSphere MQ Monitor" DefaultMQInstallationPath /opt/mqm agentpref.sh --set "WebSphere MQ Configuration" DefaultMQInstallationPath /opt/mqmMore on how to use agentpref: BMC Middleware and Transaction Management: Introduction to Agentpref
This preference is only used if the extensions cannot locate and execute dspmq, which means if the MQ binaries are not in the PATH, then the extensions will look for dspmq using the value of DefaultMQInstallationPath.
Restart qpmon and qpcfg after making this change.
Option 2: Use setmqenv (IBM)
IMPORTANT: This option should only be considered if the user running qpmon is a dedicated user and does run any other MQ applications! For this reason, its use is discouraged in favor of option 1.
See the IBM WebSphere MQ documentation for more information on how to use this utility. Be careful to set the installation (-n) and bit level (-x) appropriately. Example command:
source setmqenv -n Installation1 -x 64Add the sourcing of setmqenv to your shell profile or startup script so the the MQ environment is set up every time qpmon and qpcfg are started.
Restart qpmon andf qpcfg after making this change.