Skip to content

Commit

Permalink
Merge pull request #6 from Appdynamics/v6.4.0
Browse files Browse the repository at this point in the history
v6.4.0
  • Loading branch information
kunalgupApDx authored Aug 22, 2017
2 parents a3a863e + 78d80f9 commit c1e17c3
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 12 deletions.
18 changes: 13 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -344,12 +344,20 @@ More Troubleshooting
---------------------

1. Error `Completion Code '2', Reason '2495'`
Normally this error occurs if the environment variables are not set up correctly for this extension to work MQ in Bindings Mode.

If you are seeing `Failed to load the WebSphere MQ native JNI library: 'mqjbnd'`, please add the following jvm argument when starting the MA.

-Djava.library.path=<path to lib64 directory> For eg. on Unix it could -Djava.library.path=/opt/mqm/java/lib64

Sometimes you also have run the setmqenv script before using the above jvm argument to start the machine agent.

. /opt/mqm/bin/setmqenv -s

For more details, please check this [doc](https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_7.1.0/com.ibm.mq.doc/zr00610_.htm)

This might occour due to various reasons ranging from incorrect installation to applying [ibm fix packs](http://www-01.ibm.com/support/docview.wss?uid=swg21410038) but most of the time it happens when you are trying to connect in `Bindings` mode and machine agent is not on the same machine on which WMQ server is running. If you want to connect to WMQ server from a remote machine then connect using `Client` mode.

You could also see this error on windows **MQJE001: Completion Code '2', Reason '2495'; The native JNI library 'mqjbnd' was not found.Can't load AMD 64-bit .dll on a IA 32-bit platform**
This issue can be resolved by setting the PATH variable to have the java/lib64 before the java/lib libraries. Please check the issue here https://www.ibm.com/support/knowledgecenter/SSFKSJ_7.5.0/com.ibm.mq.dev.doc/q031570_.htm
**You will have to restart the Windows Server for it to work.**


Another way to get around this issue is to avoid using the Bindings mode. Connect using CLIENT transport type from a remote box. Make sure to provide Windows admin username and password in the config.yaml.

3. Error `Completion Code '2', Reason '2035'`
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.appdynamics.wmqmonitor</groupId>
<artifactId>websphere-mq-monitoring-extension</artifactId>
<version>6.2.0</version>
<version>6.4.0</version>
<packaging>jar</packaging>
<name>websphere-mq-monitoring-extension</name>
<url>http://maven.apache.org</url>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,21 +122,25 @@ private void extractAndReportInternal(Hashtable env, Map<String, Map<String, WMQ
}
logger.debug("Connection initiated for queue manager {} in thread {}", queueManager.getName(), Thread.currentThread().getName());

agent = new PCFMessageAgent(ibmQueueManager);
if(!Strings.isNullOrEmpty(queueManager.getReplyQueuePrefix())){
if(!Strings.isNullOrEmpty(queueManager.getModelQueueName()) && !Strings.isNullOrEmpty(queueManager.getReplyQueuePrefix())){
logger.debug("Initializing the PCF agent for model queue and reply queue prefix.");
agent = new PCFMessageAgent();
agent.setModelQueueName(queueManager.getModelQueueName());
agent.setReplyQueuePrefix(queueManager.getReplyQueuePrefix());
logger.debug("Connecting to queue manager to set the modelQueueName and replyQueuePrefix.");
agent.connect(ibmQueueManager);
}
if(!Strings.isNullOrEmpty(queueManager.getModelQueueName())){
agent.setModelQueueName(queueManager.getModelQueueName());
else{
agent = new PCFMessageAgent(ibmQueueManager);
}

if(queueManager.getCcsid() != Integer.MIN_VALUE){
agent.setCharacterSet(queueManager.getCcsid());
}

if(queueManager.getEncoding() != Integer.MIN_VALUE){
agent.setEncoding(queueManager.getEncoding());
}

logger.debug("Intialized PCFMessageAgent for queue manager {} in thread {}", agent.getQManagerName(), Thread.currentThread().getName());

Map<String, WMQMetricOverride> qMgrMetricsToReport = metricsMap.get(Constants.METRIC_TYPE_QUEUE_MANAGER);
Expand Down
4 changes: 3 additions & 1 deletion src/main/resources/conf/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ queueManagers:
#Uncomment only if encryption of passwords is wanted.
#encryptedPassword: ""

#Uncomment this only if you know what you are doing.
#PCF requests are always sent to SYSTEM.ADMIN.COMMAND.QUEUE. The PCF responses to these requests are sent to the default reply-to queue called
#SYSTEM.DEFAULT.MODEL.QUEUE. However, you can override this behavior and send it to a temporary dynamic queue by changing the modelQueueName and replyQueuePrefix fields.
#For more details around this https://www.ibm.com/support/knowledgecenter/SSFKSJ_7.5.0/com.ibm.mq.ref.adm.doc/q083240_.htm & https://www.ibm.com/support/knowledgecenter/SSFKSJ_8.0.0/com.ibm.mq.adm.doc/q020010_.htm
#modelQueueName: ""
#replyQueuePrefix: ""

Expand Down

0 comments on commit c1e17c3

Please sign in to comment.