Author |
Message
|
mquser925 |
Posted: Wed May 28, 2008 4:05 am Post subject: Connecting to a cluster through a gateway |
|
|
Acolyte
Joined: 22 Apr 2008 Posts: 61
|
I am trying to connect to a cluster through a gateway QM using a Queue Alias.
I have one QM installed on machine A and it connects to the cluster through the gateway on GATEWAY on machine B which should then distribute the messages between QM1 and QM2 on machine B evenly. I put a message on SOURCE and it completes successfully. But the message never makes it to QM1 or QM2, I checked the log for GATEWAY and it says the message was placed on the DLQ. Am I missing a connection point between the gateway and QM1/QM2?
SOURCE
Code: |
#mq script
crtmqm -u SYSTEM.DEAD.LETTER.QUEUE SOURCE
strmqm SOURCE
runmqsc SOURCE << EOF
DEFINE QLOCAL(GATEWAY) USAGE(XMITQ)
DEFINE CHANNEL ('SOURCE.TO.GATEWAY') CHLTYPE(SDR) CONNAME('xx.xxx.x.15(2187)') XMITQ('GATEWAY') TRPTYPE(TCP)
DEFINE QREMOTE(1.Q) RNAME(1.Q) RQMNAME(ANY.CLUSTER) XMITQ(GATEWAY)
START CHANNEL ('SOURCE.TO.GATEWAY')
EOF
|
GATEWAY
Code: |
#mq script
crtmqm -u SYSTEM.DEAD.LETTER.QUEUE GATEWAY
strmqm GATEWAY
runmqsc GATEWAY << EOF
ALTER QMGR REPOS('DEMO') CLWLUSEQ(ANY)
DEFINE QREMOTE(ANY.CLUSTER) RNAME(' ') RQMNAME(' ')
DEFINE CHANNEL ('SOURCE.TO.GATEWAY') CHLTYPE(RCVR) TRPTYPE(TCP)
DEFINE LISTENER('GATEWAY') TRPTYPE(TCP) CONTROL(QMGR) PORT(2187) REPLACE
DEFINE CHANNEL(TO.GATEWAY) CHLTYPE(CLUSRCVR) TRPTYPE(TCP) CONNAME('xx.xxx.x.15(2187)') CLUSTER('DEMO') DESCR('TCP Cluster-receiver channel for queue manager GATEWAY') REPLACE
DEFINE CHANNEL(TO.QM1) CHLTYPE(CLUSSDR) TRPTYPE(TCP) CONNAME('xx.xxx.x.15(2188)') CLUSTER('DEMO') DESCR('TCP Cluster-sender channel from GATEWAY to repository at QM1') REPLACE
START LISTENER ('GATEWAY')
START CHANNEL (TO.GATEWAY)
START CHANNEL ('SOURCE.TO.GATEWAY')
START CHANNEL ('TO.QM1')
EOF
|
QM1
Code: |
#mq script
crtmqm -u SYSTEM.DEAD.LETTER.QUEUE QM1
strmqm QM1
runmqsc QM1 << EOF
ALTER QMGR REPOS('DEMO')
DEFINE CHANNEL(TO.QM1) CHLTYPE(CLUSRCVR) TRPTYPE(TCP) CONNAME('xx.xxx.x.15(2188)') CLUSTER('DEMO') DESCR('TCP Cluster-receiver channel for queue manager QM1') REPLACE
DEFINE CHANNEL(TO.QM2) CHLTYPE(CLUSSDR) TRPTYPE(TCP) CONNAME('xx.xxx.x.15(2189)') CLUSTER('DEMO') DESCR('TCP Cluster-sender channel from QM1 to repository at QM2') REPLACE
DEFINE QLOCAL(1.Q) CLUSTER('DEMO') PROCESS (QM1.PROCESS) DEFPSIST(YES) INITQ(QM1.INIT.QUEUE) TRIGGER TRIGTYPE(EVERY) REPLACE
DEFINE QLOCAL(QM1.INIT.QUEUE) GET(ENABLED)
DEFINE PROCESS(QM1.PROCESS) APPLTYPE(UNIX) APPLICID('java helloworld')
DEFINE LISTENER (QM1.LISTENER) TRPTYPE(TCP) CONTROL(QMGR) PORT(2188)
START LISTENER(QM1.LISTENER)
EOF
runmqtrm -m QM1 -q QM1.INIT.QUEUE &
|
QM2
Code: |
#mq script
crtmqm -u SYSTEM.DEAD.LETTER.QUEUE QM2
strmqm QM2
runmqsc QM2 << EOF
ALTER QMGR REPOS('DEMO')
DEFINE CHANNEL(TO.QM2) CHLTYPE(CLUSRCVR) TRPTYPE(TCP) CONNAME('xx.xxx.x.15(2189)') CLUSTER('DEMO') DESCR('TCP Cluster-receiver channel for queue manager QM2') REPLACE
DEFINE CHANNEL(TO.QM1) CHLTYPE(CLUSSDR) TRPTYPE(TCP) CONNAME('xx.xxx.x.15(2188)') CLUSTER('DEMO') DESCR('TCP Cluster-sender channel from QM2 to repository at QM1') REPLACE
DEFINE QLOCAL(1.Q) CLUSTER('DEMO') PROCESS (QM2.PROCESS) DEFPSIST(YES) INITQ(QM2.INIT.QUEUE) TRIGGER TRIGTYPE(EVERY) REPLACE
DEFINE QLOCAL(QM2.INIT.QUEUE) GET(ENABLED)
DEFINE PROCESS(QM2.PROCESS) APPLTYPE(UNIX) APPLICID('java helloworld')
DEFINE LISTENER (QM2.LISTENER) TRPTYPE(TCP) CONTROL(QMGR) PORT(2189)
START LISTENER(QM2.LISTENER)
EOF
runmqtrm -m QM2 -q QM2.INIT.QUEUE &
|
|
|
Back to top |
|
 |
exerk |
Posted: Wed May 28, 2008 4:36 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
What was the Reason Code given in the dead-letter header? _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
mquser925 |
Posted: Wed May 28, 2008 4:40 am Post subject: |
|
|
Acolyte
Joined: 22 Apr 2008 Posts: 61
|
Thats another problem, the log says the message was placed on the DLQ but I am unable to retrieve it. I am trying to use the sample amqsget to retrieve the msg from the DLQ but I get a 2080 error, (buffer too small) which I don't understand. |
|
Back to top |
|
 |
exerk |
Posted: Wed May 28, 2008 4:44 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
Use amqsbcg to browse the messages. If there are a lot of messages, pipe the output to a file. _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
Gaya3 |
Posted: Wed May 28, 2008 4:44 am Post subject: |
|
|
 Jedi
Joined: 12 Sep 2006 Posts: 2493 Location: Boston, US
|
2080 error is related to your amqsget, as the buffer of that program is not enough to hold the data.
use RFHUTIL to browse the DLQ queue and find out whats the reason code for that...
Regards
Gayathri _________________ Regards
Gayathri
-----------------------------------------------
Do Something Before you Die |
|
Back to top |
|
 |
mquser925 |
Posted: Wed May 28, 2008 4:58 am Post subject: |
|
|
Acolyte
Joined: 22 Apr 2008 Posts: 61
|
exerk wrote: |
Use amqsbcg to browse the messages. If there are a lot of messages, pipe the output to a file. |
I used amqsbcg and there is only one message, I don't see an error code though.
Code: |
AMQSBCG0 - starts here
**********************
MQOPEN - 'SYSTEM.DEAD.LETTER.QUEUE'
MQGET of message number 1
****Message descriptor****
StrucId : 'MD ' Version : 2
Report : 0 MsgType : 8
Expiry : -1 Feedback : 0
Encoding : 546 CodedCharSetId : 1208
Format : 'MQDEAD '
Priority : 0 Persistence : 0
MsgId : X'414D5120534F555243452020202020201B4F3D4803070020'
CorrelId : X'000000000000000000000000000000000000000000000000'
BackoutCount : 0
ReplyToQ : ' '
ReplyToQMgr : 'SOURCE '
** Identity Context
UserIdentifier : 'mqm '
AccountingToken :
X'0431333330000000000000000000000000000000000000000000000000000006'
ApplIdentityData : ' '
** Origin Context
PutApplType : '6'
PutApplName : 'amqsput '
PutDate : '20080528' PutTime : '12252023'
ApplOriginData : ' '
GroupId : X'000000000000000000000000000000000000000000000000'
MsgSeqNumber : '1'
Offset : '0'
MsgFlags : '0'
OriginalLength : '-1'
**** Message ****
length - 174 bytes
00000000: 444C 4820 0100 0000 2508 0000 312E 5120 'DLH ....%...1.Q '
00000010: 2020 2020 2020 2020 2020 2020 2020 2020 ' '
00000020: 2020 2020 2020 2020 2020 2020 2020 2020 ' '
00000030: 2020 2020 2020 2020 2020 2020 414E 592E ' ANY.'
00000040: 434C 5553 5445 5220 2020 2020 2020 2020 'CLUSTER '
00000050: 2020 2020 2020 2020 2020 2020 2020 2020 ' '
00000060: 2020 2020 2020 2020 2020 2020 2202 0000 ' "...'
00000070: B804 0000 4D51 5354 5220 2020 0600 0000 '....MQSTR ....'
00000080: 616D 7172 6D70 7061 2020 2020 2020 2020 'amqrmppa '
00000090: 2020 2020 2020 2020 2020 2020 3230 3038 ' 2008'
000000A0: 3035 3238 3132 3235 3137 3237 6F67 '052812251727og '
No more messages
MQCLOSE
MQDISC
|
I don't have RFHUTIL and I am unable to install it. (It would probably take 6 weeks to get it approved) |
|
Back to top |
|
 |
exerk |
Posted: Wed May 28, 2008 5:24 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
|
Back to top |
|
 |
mquser925 |
Posted: Wed May 28, 2008 5:37 am Post subject: |
|
|
Acolyte
Joined: 22 Apr 2008 Posts: 61
|
Code: |
AMQSBCG0 - starts here
**********************
MQOPEN - 'SYSTEM.DEAD.LETTER.QUEUE'
MQGET of message number 1
****Message descriptor****
StrucId : 'MD ' Version : 2
Report : 0 MsgType : 8
Expiry : -1 Feedback : 0
Encoding : 546 CodedCharSetId : 1208
Format : 'MQDEAD '
Priority : 0 Persistence : 0
MsgId : X'414D5120534F555243452020202020201B4F3D4803070020'
CorrelId : X'000000000000000000000000000000000000000000000000'
BackoutCount : 0
ReplyToQ : ' '
ReplyToQMgr : 'SOURCE '
** Identity Context
UserIdentifier : 'mqm '
AccountingToken :
X'0431333330000000000000000000000000000000000000000000000000000006'
ApplIdentityData : ' '
** Origin Context
PutApplType : '6'
PutApplName : 'amqsput '
PutDate : '20080528' PutTime : '12252023'
ApplOriginData : ' '
GroupId : X'000000000000000000000000000000000000000000000000'
MsgSeqNumber : '1'
Offset : '0'
MsgFlags : '0'
OriginalLength : '-1'
**** Message ****
length - 174 bytes
00000000: 444C 4820 0100 0000 2508 0000 312E 5120 'DLH ....%...1.Q '
00000010: 2020 2020 2020 2020 2020 2020 2020 2020 ' '
00000020: 2020 2020 2020 2020 2020 2020 2020 2020 ' '
00000030: 2020 2020 2020 2020 2020 2020 414E 592E ' ANY.'
00000040: 434C 5553 5445 5220 2020 2020 2020 2020 'CLUSTER '
00000050: 2020 2020 2020 2020 2020 2020 2020 2020 ' '
00000060: 2020 2020 2020 2020 2020 2020 2202 0000 ' "...'
00000070: B804 0000 4D51 5354 5220 2020 0600 0000 '....MQSTR ....'
00000080: 616D 7172 6D70 7061 2020 2020 2020 2020 'amqrmppa '
00000090: 2020 2020 2020 2020 2020 2020 3230 3038 ' 2008'
000000A0: 3035 3238 3132 3235 3137 3237 6F67 '052812251727og '
No more messages
MQCLOSE
MQDISC
|
So it says the error code is the third word before DLH. So that would be the 2508 0000 but if you convert that from hex to decimal, it is 621281280 which makes no sense. |
|
Back to top |
|
 |
exerk |
Posted: Wed May 28, 2008 5:43 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
Been having a problem with that myself!
Are you able to use the dead-letter handler to forward the message to somewhere you can use MQExplorer to view it? _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed May 28, 2008 5:46 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
mquser925 wrote: |
So it says the error code is the third word before DLH. So that would be the 2508 0000 but if you convert that from hex to decimal, it is 621281280 which makes no sense. |
Byte Order.
Endian.
2085 (X'0825')
MQRC_UNKNOWN_OBJECT_NAME _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
exerk |
Posted: Wed May 28, 2008 5:47 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
Doh!
And I've just noticed you've made all three queue managers in the cluster Full Repositories - lots of discussion on the board about that being a 'bad thing'. _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Last edited by exerk on Wed May 28, 2008 5:52 am; edited 1 time in total |
|
Back to top |
|
 |
Gaya3 |
Posted: Wed May 28, 2008 5:48 am Post subject: |
|
|
 Jedi
Joined: 12 Sep 2006 Posts: 2493 Location: Boston, US
|
cool Jeff
Regards
Gayathri _________________ Regards
Gayathri
-----------------------------------------------
Do Something Before you Die |
|
Back to top |
|
 |
mquser925 |
Posted: Wed May 28, 2008 6:03 am Post subject: |
|
|
Acolyte
Joined: 22 Apr 2008 Posts: 61
|
So I'm assuming that the unknown object it is referring to is ANY.CLUSTER. The QM does not know where to redirect the msg? I tried defining the remote queue as a cluster queue but that did not work either.
Code: |
DEFINE QREMOTE(ANY.CLUSTER) RNAME(' ') RQMNAME(' ') CLUSTER('DEMO') |
I pulled this from the cluster manual in the example using queue aliases to balance workload from out side the cluster. Am I missing a definition? |
|
Back to top |
|
 |
exerk |
Posted: Wed May 28, 2008 6:18 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
Try an amqsput to the ANY.CLUSTER queue - expect a failure other than UNKNOWN OBJECT. _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
mquser925 |
Posted: Wed May 28, 2008 6:42 am Post subject: |
|
|
Acolyte
Joined: 22 Apr 2008 Posts: 61
|
exerk wrote: |
Try an amqsput to the ANY.CLUSTER queue - expect a failure other than UNKNOWN OBJECT. |
I tried amqsput ANY.CLUSTER GATEWAY and I got an error that the qremote did not have a queue defined to forward the message to.
According to the Cluster manual as long as I have defined the remote queue outside the cluster:
Code: |
DEFINE QREMOTE(1.Q) RNAME(1.Q) RQMNAME(ANY.CLUSTER) XMITQ(GATEWAY) |
and I have defined the remote queue
Code: |
DEFINE QREMOTE(ANY.CLUSTER) RNAME(' ') RQMNAME(' ') |
causes any response to the queue manager ANY.CLUSTER to null which means that messages go to GATEWAY initially and from there are routed to any queue manager in the cluster thats hosts the cluster queue 1.Q. But the message is not being routed, am I missing something or is the manual wrong? |
|
Back to top |
|
 |
|