MQ java process taking 100% of CPU - ibm-mq

Following process in our linux server is taking 100% of CPU
java -DMQJMS_LOG_DIR=/opt/hd/ca/mars/tmp/logs/log -DMQJMS_TRACE_DIR=/opt/hd/ca/mars/tmp/logs/trace -DMQJMS_INSTALL_PATH=/opt/isv/mqm/java com.ibm.mq.jms.admin.JMSAdmin -v -cfg /opt/hd/ca/mars/mqm/data/JMSAdmin.config
I forcibly killed the process and bounced MQ then i don't see this. What might be the reason for this to happen?

The java process com.ibm.mq.jms.admin.JMSAdmin is normally executed via the IBM MQ script /opt/mqm/java/bin/JMSAdmin.
The purpose of JMSAdmin is to create JNDI resources for connecting to IBM MQ, these are normally file based and stored in a file called .binding, the location of the .binding file would be found in configuration file that is passed to the command. In your output above the configuration file is /opt/hd/ca/mars/mqm/data/JMSAdmin.config.
JMSAdmin is an interactive process where you run commands such as:
DEFINE QCF(QueueConnectionFactory1) +
QMANAGER(XYZ) +
...
I would be unable to tell you why it was taking 100% CPU, but the process itself does not directly interact with or connect to the queue manager and it would be safe to kill off the process with out needing to restart the queue manager. The .binding file that JMSAdmin generates is used by JMS applications in some configurations to find details of how to connect to MQ and the names of queues and topics to access.
In July 2011 you would have been using IBM MQ v7.0 or lower all of which are out of support, if anyone should come across a similar issue with a recent supported version of MQ I would suggest you take a java thread dump and open a case with IBM to investigate why it is taking up 100% of the CPU.
*PS I know this is a 9 year old question, but I thought an answer may be helpful to someone who finds this when searching for a similar problem.

Related

Connect TIBCO EMS with bash

I try to write a bash script that can read and write to tibco ems server. Is it possible? What i need to do that ?
thanks
You would need to develop a utility able to write messages to a queue and read messages from a queue. This can be done using EMS Java API. Then this utility would be called from your script.
A good starting point would be to look at the samples provided with the product in the <TIBCO_HOME>/ems/8.6/samples/java directory (look at tibjmsMsgConsumer.java and tibjmsMsgProducer.java).

Rtrieve files from FTP Server

We have a Mainframe Batch job which runs every 15 mins and looks for a file on FTP server. If File is found job executes and retrieves the file. If file is not found then job gets cancelled. 90% of the time, job does not find any file on FTP server and gets cancelled.
Is there any way to avoid running job every 15 mins to check file on FTP server? Please provide suggestions. Non-Mainframe option is also open.
Thanks,
Rahul
This seems like an ideal situation for WebSphere MQ. Message queues ensure the data file is processed once and only once after it has been received. It has a richer security and much better performance than a solution involving FTP and programs cobbled around it. When the message is received (i.e. the file that you were trying to send), MQ can trigger a batch job to process the file.
Here's a COBOL example of how to get a message off the queue:
https://www.ibm.com/support/knowledgecenter/SSFKSJ_7.5.0/com.ibm.mq.ref.dev.doc/q089830_.htm
Here's a good article on configuring MQ to trigger the batch job:
http://thebigoldmainframe.blogspot.com/2012/09/mq-batch-triggering-process.html

Unknown Thread pools being created

We have spring boot micro service with several libraries as dependencies. e.g Jest (elastic search), Hikari, Spring-Rabbit, FasterXml and many more.
After analyzing thread dump we found that 2 unknown pools are being created. On the normal development machine, these pools contain 8 to 10 threads. But on prod environment, we observed each of the pool has 66 threads. Thread pool name is auto-generated like pool-7, pool-2 etc.
We want to find out which java class/library is creating this thread pool and spawning the threads. Tried with oracle flight recorder, but even there we could no see the origin for these threads.
Can someone pls suggest the way to find out who is creating these threads?
Thanks,
Smita
It's unfortunate that the Threat Start event in Flight Recorder doesn't record the stack trace from the Thread#start method. I will see if it can be added to a future JDK release. You should however be able to see the thread that starts new threads.
If you can't find other tools to help you, the only way I can think of is to instrument the java.lang.Thread#start method yourself. Either using bytecode instrumentation, or just clone OpenJDK, modify the source file for java.lang.Thread and build your own custom JDK. The last step may sound daunting, but it's not that hard if you are on JDK 8 or later.
hg clone http://hg.openjdk.java.net/jdk8/jdk8
cd jdk8
bash get_source.sh
bash configure
make images
When you clone, there is a README file in the root that will point you to further instructions, if you should run into problems.

MQ V7.5.3 can anyone please advise on taking dump of subscriptions which are created by MQ API

Thanks for going thru this question.
We have installed ITCAM agent on MQ V7.5.0.3. Currently we had a scenario to clean out all the MQ objects and recreate it. While configuring ITCAM agent on MQ, there were few auto-created Subscriptions on Qmgr.
While taking dmpmqcfg -m these subscriptions are not captured ( as per info center "The dmpmqcfg utility dumps only subscriptions of type MQSUBTYPE_ADMIN, that is, only subscriptions that are created using the MQSC command DEFINE SUB or its PCF equivalent. Subscriptions that are created by applications using the MQSUB MQI call of type MQSUBTYPE_API are not part of the queue manager configuration, even if durable, and so are not dumped by dmpmqcfg")
Can anyone please advise how to take dump of all the subscriptions irrespective of created by DEFINE SUB or by some API's.
Thank you
You can issue the command DISPLAY SUB(*) TYPE(API) ALL to see them all.
dmpmqcfg does not dump them out because replaying them as DEFINE SUB commands would create TYPE(ADMIN) subscriptions.

WebSphere MQ FTE Agent Directory does not exist?

When I tried to start an FTE agent in the command prompt , it displays the error message as "An internal error has occurred. Unable to complete the command because the agent directory does not exist".
What would be the reason for this? It was working fine until yesterday. And is there any way to start an agent in MQ FTE itself? I use fteStartAgent in command prompt each time to start an agent.
Kindly advise me on this....
There are a few possible reasons for this. It is possible that the default properties were changed and now point to an invalid location. This usually happens when the different components are installed and you select to provide the connection details again rather than to reuse the existing configuration.
Another possibility is that the default properties have been changed to point to a different Coordination QMgr. Sometimes people want to run Prod and Dev agents on the same host and set up connectivity to more than one Coordination QMgr. The result is that the default properties can point to only one at a time and so some agent directories are found while others are not. The trick to making this work is to use the -P option to select the proper Coordination QMgr.

Resources