Author |
Message
|
satya_jammy |
Posted: Thu Oct 01, 2009 2:25 pm Post subject: Accounting Token and Corelation ID not getting populated |
|
|
Acolyte
Joined: 01 Oct 2009 Posts: 66
|
Hi Gurus,
Firstly ,i am not well aware at MQ message headers and its fuctionality in transmission.
One of client deployed a new JMS Application and passing datagram messages to the target application using MQ.
Initially the user XXX got unauthorized error while connecting to the QM which is resolved by adding his ID as part of mqm group
The client App is now able to connect using SYSTEM.DEF.SVRCONN channel to connect to the QM using an User ID XXX.
Now we had an new issue the messages which are getting posted by the JMS App is not getting processed by the Target Application. when i checked the messages we found Correlation ID is not getting set in the messages. even the Accounting Token is not getting Generated.
In The test environment the transactions are happening successfully. The developer says that he is using the same code which they tested successfully. Now they are asking me to check from the MQ server side for the reason why CO-Relation and Accounting Token Id are not populating. Both the test and Production are identical only difference is in test these messages are getting posted using mqm and in prod it is getting posted using xxx id
Can any of you give some light why Accounting token is not getting genarated in the message, is their any conditions which set Accounting token and co-relation ID to all 000000....
i am using the MQVersion: 530.7 CSD07
Here is the message which is been posting by JMS App
A VER 2
A RPT 0
A MST 8
A EXP -1
A FDB 0
A ENC 273
A CCS 819
A FMT MQHRF2
A PRI 4
A PER 1
A MSI 414D5120574353434D512020202020204A86D6B522F4DE05
A COI 000000000000000000000000000000000000000000000000
A BOC 0
A RTQ
A RTM WCSCMQ
A USR xxx
A ACC 0000000000000000000000000000000000000000000000000000000000000000
A AID
A PAT 28
A PAN WebSphere MQ Client for Java
A PTD 20090930
A PTT 09341748
A AOD
A GRP 000000000000000000000000000000000000000000000000
A MSQ 1
A OFF 0
A MSF 0
A ORL -1
S "RFH "
X 00000002000000A000000111000004B8
S " "
X 00000000000004B8000000
S " <mcd><Msd>jms_bytes</Msd></mcd> "
X 000000
S "T<jms><Dst>queue://WCSCMQ/ITRD.OUT</Dst><Tms>125"
S "4303257483</Tms><Dlv>2</Dlv></jms> 5002"
X 00
S "ALRM"
X 0000
S "135.169.128.178"
X 00
S "WCSCMQ"
X 00000000000000000000
S "wcscmq"
X 00000000000000000000
S "AFM"
X 0000000000000000000000000000
S "J"
X C3
S "&"
X 18
S "6032013"
X 0000000000
S "2000030690"
X 00
S "(000)643-3009"
X 0000
S "J"
X C3
S "&"
X 1800000000 |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Oct 01, 2009 3:04 pm Post subject: Re: Accounting Token and Corelation ID not getting populated |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
satya_jammy wrote: |
Hi Gurus,
Firstly ,i am not well aware at MQ message headers and its fuctionality in transmission.
One of client deployed a new JMS Application and passing datagram messages to the target application using MQ.
Initially the user XXX got unauthorized error while connecting to the QM which is resolved by adding his ID as part of mqm group |
Bad practice. Create real authorization groups and set up authorization as needed
Quote: |
The client App is now able to connect using SYSTEM.DEF.SVRCONN channel to connect to the QM using an User ID XXX. |
Again bad practice. Anybody can now connect to your QMGR with mqm authority as you so helpfully set it on the channel.
Do not use SYSTEM.XXX objects for your applications. Create real channels.
Quote: |
Now we had an new issue the messages which are getting posted by the JMS App is not getting processed by the Target Application. when i checked the messages we found Correlation ID is not getting set in the messages. even the Accounting Token is not getting Generated.
In The test environment the transactions are happening successfully. The developer says that he is using the same code which they tested successfully. Now they are asking me to check from the MQ server side for the reason why CO-Relation and Accounting Token Id are not populating. Both the test and Production are identical only difference is in test these messages are getting posted using mqm and in prod it is getting posted using xxx id
Can any of you give some light why Accounting token is not getting genarated in the message, is their any conditions which set Accounting token and co-relation ID to all 000000....
i am using the MQVersion: 530.7 CSD07
Here is the message which is been posting by JMS App
A VER 2
A RPT 0
A MST 8
A EXP -1
A FDB 0
A ENC 273
A CCS 819
A FMT MQHRF2
A PRI 4
A PER 1
A MSI 414D5120574353434D512020202020204A86D6B522F4DE05
A COI 000000000000000000000000000000000000000000000000
A BOC 0
A RTQ
A RTM WCSCMQ
A USR xxx
A ACC 0000000000000000000000000000000000000000000000000000000000000000
A AID
A PAT 28
A PAN WebSphere MQ Client for Java
A PTD 20090930
A PTT 09341748
A AOD
A GRP 000000000000000000000000000000000000000000000000
A MSQ 1
A OFF 0
A MSF 0
A ORL -1
S "RFH "
X 00000002000000A000000111000004B8
S " "
X 00000000000004B8000000
S " <mcd><Msd>jms_bytes</Msd></mcd> "
X 000000
S "T<jms><Dst>queue://WCSCMQ/ITRD.OUT</Dst><Tms>125"
S "4303257483</Tms><Dlv>2</Dlv></jms> 5002"
X 00
S "ALRM"
X 0000
S "135.169.128.178"
X 00
S "WCSCMQ"
X 00000000000000000000
S "wcscmq"
X 00000000000000000000
S "AFM"
X 0000000000000000000000000000
S "J"
X C3
S "&"
X 18
S "6032013"
X 0000000000
S "2000030690"
X 00
S "(000)643-3009"
X 0000
S "J"
X C3
S "&"
X 1800000000 |
Well you did not specify if the application posting the messages had /was using the same settings.
You can choose to generate / omit to post an RFH header, the same way you can request the qmgr to generate a correlation id or omit to do so. Don't know enough about the accounting token. Guess it depends on the sender:
accounting token long info
accounting token short info
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Vitor |
Posted: Thu Oct 01, 2009 3:11 pm Post subject: Re: Accounting Token and Corelation ID not getting populated |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
satya_jammy wrote: |
Initially the user XXX got unauthorized error while connecting to the QM which is resolved by adding his ID as part of mqm group |
That's not resolving the problem; that's bypassing the problem by punching a giant hole in your security. No application should connect or use an id that's part of the mqm group; this gives anyone who knows this id total access to your queue manager, and carte blanche to do what they want including add spurious or malicious messages.
What you should have done is authorised user XXX to do what it needs to. And no more.
satya_jammy wrote: |
The client App is now able to connect using SYSTEM.DEF.SVRCONN channel to connect to the QM using an User ID XXX. |
Applications should not use SYSTEM objects. Define a SVRCONN for the application to use; this will help with the security issue I mentioned above.
satya_jammy wrote: |
Both the test and Production are identical only difference is in test these messages are getting posted using mqm and in prod it is getting posted using xxx id |
Yes, so you've spotted the problem.
satya_jammy wrote: |
Can any of you give some light why Accounting token is not getting genarated in the message, is their any conditions which set Accounting token and co-relation ID to all 000000.... |
Because your set up is very odd. Also:
satya_jammy wrote: |
i am using the MQVersion: 530.7 CSD07 |
Not only is this out-of-support, it's an old verions of v5.3 that wasn't all that when it was new. Apply maintenance. Also spend some time with the Java, Security and Application Programming Guides. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
shashivarungupta |
Posted: Thu Oct 01, 2009 3:54 pm Post subject: |
|
|
 Grand Master
Joined: 24 Feb 2009 Posts: 1343 Location: Floating in space on a round rock.
|
NOTE:
Hope you are aware of the concepts of Message ID and Correlation ID.
Whenever a message is being put by the application to the queue, in the MQMD header a unique ID is being generated for that message that is known as Message ID.
In the Request Reply scenario ( or in Synchronous systems) the Correlation ID value of Reply message is being assigned by the value of the Message ID of the Request Message. {whereas the Value of the Correlation ID of the Request Message would be 0 as you got '000000000000000000000000000000000000000000000000' }.
Message ID and Correlation ID values are just to make sure that the 'A1' reply message is the response of 'A' request message.
Application A ('A' msg) (Msg Id=1, Corrl Id=0)--------------->Application B
Application A ('A1' msg) (Msg Id=2, Corrl Id=1)<--------------Application B _________________ *Life will beat you down, you need to decide to fight back or leave it. |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Oct 01, 2009 5:57 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
shashivarungupta wrote: |
Whenever a message is being put by the application to the queue, in the MQMD header a unique ID is being generated for that message that is known as Message ID. |
If and only IF the application putting the message does the RIGHT thing and REQUESTS a unique id be created.
The Application has full control, if it wants to, over every field in the MQMD. |
|
Back to top |
|
 |
shashivarungupta |
Posted: Fri Oct 02, 2009 9:58 am Post subject: |
|
|
 Grand Master
Joined: 24 Feb 2009 Posts: 1343 Location: Floating in space on a round rock.
|
mqjeff wrote: |
shashivarungupta wrote: |
Whenever a message is being put by the application to the queue, in the MQMD header a unique ID is being generated for that message that is known as Message ID. |
If and only IF the application putting the message does the RIGHT thing and REQUESTS a unique id be created.
The Application has full control, if it wants to, over every field in the MQMD. |
Ya !!
Message ID got to be unique and applications (say java jms appli.) got to take care while putting msg id into the correl id. Its important for the client application that is expecting the reply msg and its a responsibility of the target appl. to do the correct and responsible assignments. _________________ *Life will beat you down, you need to decide to fight back or leave it. |
|
Back to top |
|
 |
satya_jammy |
Posted: Fri Oct 02, 2009 11:06 pm Post subject: |
|
|
Acolyte
Joined: 01 Oct 2009 Posts: 66
|
Hi All
Thanks for all your suggestions. Those are really valid.
BTW the issue with the CO-RRelation ID got fixed. Developer identified that he is using new set of jars in the class path in the newly deployed app. he reverted the jars to the old set of jars which are compatable for my version of MQ series. |
|
Back to top |
|
 |
fjb_saper |
Posted: Sat Oct 03, 2009 1:15 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
satya_jammy wrote: |
Hi All
Thanks for all your suggestions. Those are really valid.
BTW the issue with the CO-RRelation ID got fixed. Developer identified that he is using new set of jars in the class path in the newly deployed app. he reverted the jars to the old set of jars which are compatable for my version of MQ series. |
There should not be any "new set of jars' vs "old set of jars"
There should be the "jars in the MQ Client installation path"  _________________ MQ & Broker admin |
|
Back to top |
|
 |
shashivarungupta |
Posted: Sun Oct 04, 2009 12:29 am Post subject: |
|
|
 Grand Master
Joined: 24 Feb 2009 Posts: 1343 Location: Floating in space on a round rock.
|
satya_jammy wrote: |
... old set of jars which are compatable for my version of MQ series.... |
Please put some light on this.
Versions (of your... MQ Series, Hosting Application Software etc. etc. ) ?
* BTW MQ series is no more known as MQ series.  _________________ *Life will beat you down, you need to decide to fight back or leave it. |
|
Back to top |
|
 |
|