Author |
Message
|
hughson |
Posted: Tue May 21, 2019 6:29 am Post subject: |
|
|
 Padawan
Joined: 09 May 2013 Posts: 1959 Location: Bay of Plenty, New Zealand
|
I suspect @fjb_saper was suggesting that ReverseDNS lookup could be the thing taking the time.
Try turning it off with the following command to see whether this makes any difference.
Code: |
ALTER QMGR REVDNS(DISABLED) |
Did you get anywhere with trace?
Cheers,
Morag _________________ Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software |
|
Back to top |
|
 |
modulo2 |
Posted: Wed May 22, 2019 11:14 am Post subject: |
|
|
Novice
Joined: 05 May 2007 Posts: 18
|
I believe the tracing will lead to know the issue, I'm working on it trying to get it working. _________________ Thanks |
|
Back to top |
|
 |
modulo2 |
Posted: Thu May 23, 2019 5:44 am Post subject: |
|
|
Novice
Joined: 05 May 2007 Posts: 18
|
I have opened service request in Oracle support trying to enable the log, and provided step by step guide for reproducing the issue, I'm waiting for their reply.
I have done another test on my environment ( multiple calls to the send and forget ), I find that only the first call takes long time of 40 secs, the remaining calls in milliseconds. Does this indicate something regarding Connection pool?
The problem is that from Linux level it doesn't takes that time at all, and previous release of IBM MQ v7 never behaved like this. _________________ Thanks |
|
Back to top |
|
 |
modulo2 |
Posted: Mon May 27, 2019 2:18 am Post subject: |
|
|
Novice
Joined: 05 May 2007 Posts: 18
|
More updates & I really appreciate help
Oracle JVM always runs with a security manager, so after reading this article that is mentioned how to enable Logging in Oracle JVM https://docs.oracle.com/database/121/JJDEV/chtwo.htm#JJDEV02043
I have added java.util.logging.* to my (2) Java Stored procedure and Oracle was able to log my entries in files based on my specification, but IBM MQ java classes were not able to do so
After some investigation, I found this article from IBM v9.1.x ( Not v9.x )
https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_9.1.0/com.ibm.mq.dev.doc/q030650_.htm
Please scroll down the page till the yellow Important notice
Quote: |
The IBM MQ classes for Java trace facility requires further permissions as it performs additional querying of system properties, and also further file system operations.
A suitable template security policy file for running under a security manager with tracing enabled is provided in the samples/wmqjava directory of the IBM MQ installation as example.security.policy. |
I can't get this file to know the permission required, does anyone have such files or direction to enable MQ trace under the Java Security Manager ? _________________ Thanks |
|
Back to top |
|
 |
hughson |
Posted: Mon May 27, 2019 9:50 am Post subject: |
|
|
 Padawan
Joined: 09 May 2013 Posts: 1959 Location: Bay of Plenty, New Zealand
|
modulo2 wrote: |
After some investigation, I found this article from IBM v9.1.x ( Not v9.x )
https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_9.1.0/com.ibm.mq.dev.doc/q030650_.htm
Please scroll down the page till the yellow Important notice
Quote: |
The IBM MQ classes for Java trace facility requires further permissions as it performs additional querying of system properties, and also further file system operations.
A suitable template security policy file for running under a security manager with tracing enabled is provided in the samples/wmqjava directory of the IBM MQ installation as example.security.policy. |
I can't get this file to know the permission required, does anyone have such files or direction to enable MQ trace under the Java Security Manager ? |
I just installed MQ V9.1.1 on an Intel Linux machine and I do not see any such file. Also couldn't find it on Windows.
Anyone else got it?
Cheers,
Morag _________________ Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue May 28, 2019 12:11 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
only found 2 policy files. in jre/lib/security...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
modulo2 |
Posted: Tue May 28, 2019 1:24 am Post subject: |
|
|
Novice
Joined: 05 May 2007 Posts: 18
|
I have opened a service request with IBM to get the details of this link.
But actually guys, I'm getting support & understanding from you far better than either official IBM or Oracle support
Returning back to original question, the delay that is caused, it seems because of connection pool as it is clear when I initiate the first call it takes very loing time while remaining calls executes in only 2millisecond each.
Let me clarify,
As example I have like a PL/SQL job looping on table ( lets say contains 100 records ) that I need to send corresponding 100 MQ messages, only the first call takes very long time ( 41 secs ) but the remaining 99 calls everyone takes 2 millisecond each.
Is there a way to optimize the connection pool from Java code? Or is there any ideas what might be the issue? _________________ Thanks |
|
Back to top |
|
 |
hughson |
Posted: Tue May 28, 2019 12:00 pm Post subject: |
|
|
 Padawan
Joined: 09 May 2013 Posts: 1959 Location: Bay of Plenty, New Zealand
|
modulo2 wrote: |
Or is there any ideas what might be the issue? |
As I suggested in an earlier reply, the length of the delay sounds like a network timeout - 20 seconds is a common TCP connect timeout.
Cheers,
Morag _________________ Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software |
|
Back to top |
|
 |
modulo2 |
Posted: Tue May 28, 2019 12:04 pm Post subject: |
|
|
Novice
Joined: 05 May 2007 Posts: 18
|
Sorry, maybe I missed this post.
Can you please elaborate more about this timeout? On which level on the network itself or specified in the client?
Appreciate more details. _________________ Thanks |
|
Back to top |
|
 |
hughson |
Posted: Tue May 28, 2019 12:09 pm Post subject: |
|
|
 Padawan
Joined: 09 May 2013 Posts: 1959 Location: Bay of Plenty, New Zealand
|
It's the default value for the TCP level timeout on the socket. The fact that after this timeout you don't fail to connect suggests that your connection is able to try somewhere else which then succeeds, hence my original guess about comma-separated connames before you gave us any information about your set up.
It's still just a guess though. Trace would help rule it in or out.
Cheers,
Morag _________________ Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software |
|
Back to top |
|
 |
modulo2 |
Posted: Tue May 28, 2019 12:17 pm Post subject: |
|
|
Novice
Joined: 05 May 2007 Posts: 18
|
I think if it reaches 41 seconds without throwing exception, it means it didn't start establishing the connection and the time is spent in something else.
My guess is more to memory and resources consumed in establishing connection pool, as this justifies the remaining calls executes in 2 milliseconds.
I had a talk with IBM account manager, because of long delay in replying to service request, and he requested me to raise the severity to 1.
I will try it just when I reach work at least to get the permission for the MQ trace.
Reaslly thanks for your help  _________________ Thanks |
|
Back to top |
|
 |
modulo2 |
Posted: Wed May 29, 2019 5:47 am Post subject: |
|
|
Novice
Joined: 05 May 2007 Posts: 18
|
|
Back to top |
|
 |
modulo2 |
Posted: Mon Jun 03, 2019 4:10 am Post subject: |
|
|
Novice
Joined: 05 May 2007 Posts: 18
|
Thanks God, It is working now First connection takes 2 seconds and remaining connections in same session in milliseconds.
Once the MQ trace or logs appeared in console, lots has been unvieled, and problem was determined and solved. It took IBM service request severity 1 to get intouch with Level 3 support who guided me to alternatives to MQ trace.
Below are the details:
First the link for permission of v9.1.2 important note has wrong documentation and they will solve it. https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_9.1.0/com.ibm.mq.dev.doc/q030650_.htm
The actual permissions that is required to write to logs should be by two permissions(As per the L3 support) as follows:
Code: |
permission java.io.FilePermission "/xyz/log","read,write";
permission java.io.FilePermission "/xyz/log/*","read,write"; |
This also didn't work for me & I will tell you now shortly:
They provided another system property that write to environment log file which solved the issue, as it written to Oracle trace files where I could know what was the issue. The system property is
Code: |
com.ibm.msg.client.commonservices.trace.startup=true |
When I found the traces in the Oracle trace file, I found ClassNotFoundException then when traced, it needs jms.jar, provider.jar, fscontext.jar as well to the relocatable jars, when I added these jars as well I still got dependency on JSON objects from IBM that was not in the CD of IBM MQ as well
After contacting them again, they told me they are aware of the issue and solved this in later releases to 9.0.0.4 (Which I was using), and it is better for me to upgarde to v9.1.2 client, I have done the upgrade to 9.1.2 and updated the jar files accordingly (They are all mentioned in allclient.jar manifest file classpath) I found different dependency to org.json.jar than previous IBM json.
Anyway, I did all the imports and everything is fine now.
Regarding the MQ trace was not being generated also appeard from Oracle traces, it is because NumberFormatException was thrown when trying to parse the PID, as I found Oracle passses it in something like this "PID=1234&SID=FIS2" that's why it was always throwing this exception.
Thanks very much for your support during the last period, you were very helpful in guiding me to know the issue  _________________ Thanks |
|
Back to top |
|
 |
hughson |
Posted: Mon Jun 03, 2019 8:27 pm Post subject: |
|
|
 Padawan
Joined: 09 May 2013 Posts: 1959 Location: Bay of Plenty, New Zealand
|
I am happy to hear that you were able to get traces successfully (that's always useful!) and that you also got to the bottom of the issue.
Cheers,
Morag _________________ Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software |
|
Back to top |
|
 |
|