Author |
Message
|
vinayak |
Posted: Mon Apr 08, 2002 10:58 am Post subject: |
|
|
Novice
Joined: 07 Apr 2002 Posts: 17
|
Hi,
My name is Vinayak Shet and I am a programmer.
We are using MQseries 5.0 in our project. We had installed MQseries 5.0 on
Unix Sun Solaris machine. We wrote some sample programs for testing but we
are facing some problems with the same.
Here is the scenario.
We have 2 queue managers running on the same machine (Unix Box) and we are trying to
communicate
between these two QM's. But when we are sending message from source Q to
target Q the message is being written to the DeadLetter Q of target QM
instead of the target Q that we need to send the message to.
We tried everthing that we knew but are not able to resolve the problem
So can you please provide us some solution to the problem.
Here are the scripts that we used.
1.Entries in /etc/services file.
MQSeries1 1414/tcp # MQSeries
MQSeries2 1415/tcp # MQSeries
2.Entries in /et/inetd.conf file
MQSeries1 stream tcp nowait mqm /opt/mqm/bin/amqcrsta amqcrsta -m
brain.queue.manager
MQSeries2 stream tcp nowait mqm /opt/mqm/bin/amqcrsta amqcrsta -m
dtc_srvc.queue.manager
3.Source QM configuration file.
*****************************
* DO DAY Client Configuration
*****************************
* Transmission queue
DEFINE QLOCAL(DTC_SRVC.QUEUE.MANAGER) USAGE(XMITQ) +
DESCR('Transmission queue for DO_DAY messages') REPLACE
* Remote queue
DEFINE QREMOTE(DO.DAY.QUEUE) RQMNAME(DTC_SRVC.QUEUE.MANAGER) +
RNAME(DO.DAY.QUEUE) +
DESCR('Remote queue on DTC services QM') +
XMITQ(DTC_SRVC.QUEUE.MANAGER) REPLACE
* Dead letter queue
DEFINE QLOCAL(DO.DAY.DEAD.LETTER.QUEUE) USAGE(NORMAL) +
DESCR('Dead letter queue for DO_DAY messages') REPLACE
* Sender channel to DTC Services
DEFINE CHANNEL(TO.DTC_SRVC) CHLTYPE(SDR) +
CONNAME('brain.ny.jpmorgan.com(1415)') +
DESCR('Sender channel for DO_DAY messages') +
XMITQ(DTC_SRVC.QUEUE.MANAGER) REPLACE
4.Target QM configuration file.
*****************************
* DO DAY Server Configuration
*****************************
* Local target(inbound) queue
DEFINE QLOCAL(DO.DAY.QUEUE) USAGE(NORMAL) +
DESCR('Local queue for DO_DAY messages') REPLACE
* Dead letter queue
DEFINE QLOCAL(DO.DAY.DEAD.LETTER.QUEUE) USAGE(NORMAL) +
DESCR('Dead letter queue for DO_DAY messages') REPLACE
* Receiver channel from client
DEFINE CHANNEL(TO.DTC_SRVC) CHLTYPE(RCVR) +
DESCR('Receiver channel for DO_DAY messages') REPLACE
Here the 2 Q managers are BRAIN.QUEUE.MANAGER and DTC_SRVC.QUEUE.MANAGER and when we are sending message to DO.DAY.QUEUE on DTC_SRVC.QUEUE.MANAGER the message goes to DTC_SRVC.DEAD.LETTER.QUEUE instead of DO.DAY.QUEUE.
why is it so ???Also how can i see the contents in dead letter queue.
Please reply asap
Thanks,
Vinayak
[ This Message was edited by: vinayak on 2002-04-08 12:29 ] |
|
Back to top |
|
 |
mqonnet |
Posted: Mon Apr 08, 2002 11:02 am Post subject: |
|
|
 Grand Master
Joined: 18 Feb 2002 Posts: 1114 Location: Boston, Ma, Usa.
|
What is the return code of the message reaching the DLQ. Are there any error messages in the mqerror logs.
Cheers.
Kumar
_________________ IBM Certified WebSphere MQ V5.3 Developer
IBM Certified WebSphere MQ V5.3 Solution Designer
IBM Certified WebSphere MQ V5.3 System Administrator |
|
Back to top |
|
 |
vinayak |
Posted: Mon Apr 08, 2002 11:34 am Post subject: |
|
|
Novice
Joined: 07 Apr 2002 Posts: 17
|
Hi Kumar,
This is the message logged in MQseries log
04/05/02 12:02:21
AMQ9544: Messages not put to destination queue.
EXPLANATION:
During the processing of channel 'TO.DTC_SRVC' one or more messages could not
be put to the destination queue and attempts were made to put them to a
dead-letter queue. The location of the queue is 1, where 1 is the local
dead-letter queue and 2 is the remote dead-letter queue.
ACTION:
Examine the contents of the dead-letter queue. Each message is contained in a
structure that describes why the message was put to the queue, and to where it
was originally addressed. Also look at previous error messages to see if the
attempt to put messages to a dead-letter queue failed. The program identifier
(PID) of the processing program was '13808'. |
|
Back to top |
|
 |
mqonnet |
Posted: Mon Apr 08, 2002 11:50 am Post subject: |
|
|
 Grand Master
Joined: 18 Feb 2002 Posts: 1114 Location: Boston, Ma, Usa.
|
This means that something went wrong and the MCA was unable to put the message onto the local queue at remote QM. To know what happened, you have to figure out the Return/Reason/error code by looking at the message lying on your dead letter queue. You could browse this queue to look at the reason code. You cannot use Amqsbcg/Amqsget since the structre of DLQ is different. So, either you might have to compile one or find out one in forums like these. Please post the error code to move further.
Cheers.
Kumar
_________________ IBM Certified WebSphere MQ V5.3 Developer
IBM Certified WebSphere MQ V5.3 Solution Designer
IBM Certified WebSphere MQ V5.3 System Administrator |
|
Back to top |
|
 |
StefanSievert |
Posted: Mon Apr 08, 2002 1:50 pm Post subject: |
|
|
 Partisan
Joined: 28 Oct 2001 Posts: 333 Location: San Francisco
|
Vinayak,
please use amqsbcg to browse the dead letter queue (I can see no reason why you shouldn't be able to do that) on your target queue manager and post the first couple of lines from the hex dump.
BEFORE you do this I have to mention what I noticed in your definitions, though. In the inetd.conf file you wrote:
Quote: |
2.Entries in /et/inetd.conf file
MQSeries1 stream tcp nowait mqm /opt/mqm/bin/amqcrsta amqcrsta -m
brain.queue.manager
MQSeries2 stream tcp nowait mqm /opt/mqm/bin/amqcrsta amqcrsta -m
dtc_srvc.queue.manager
|
with your queue manager names all in lowercase. Your MQ object definitions have the queue manager names in uppercase (RQMNAME(DTC_SRVC.QUEUE.MANAGER)). Now, given this you shouldn't be able to bring up your channels at all, so I'm puzzled how you can get a message across, because the receiving message channel agent will try to connect to the lowercase queue manager and should fail, hence an unsuccessful channel startup.
Can you please verify the definitions exactly match in spelling and case?
Hope that helps,
Stefan
_________________
Stefan Sievert
IBM Certified * MQSeries
In the end everything is right. If not, it's not the end.
[ This Message was edited by: StefanSievert on 2002-04-08 14:50 ] |
|
Back to top |
|
 |
mqonnet |
Posted: Mon Apr 08, 2002 5:53 pm Post subject: |
|
|
 Grand Master
Joined: 18 Feb 2002 Posts: 1114 Location: Boston, Ma, Usa.
|
Stephan,
As far as i understand you CANNOT see a message on DLQ in the appropriate format. Reason. When a message is sent to DLQ, it has a DLQ header attached to it and the associated MD. And the actual message contains the MD and the message from the message which was destined to the specific queue. And hence to view the message in a DLQ, you need to read the DATA/MESSAGE bit of the message lying on DLQ and print it using the DLQ structures. AMQSBCG will only show the message on DLQ with DLQ headers and WILL NOT show the actual message and the reason code associated with the failure.
Cheers.
Kumar
_________________ IBM Certified WebSphere MQ V5.3 Developer
IBM Certified WebSphere MQ V5.3 Solution Designer
IBM Certified WebSphere MQ V5.3 System Administrator |
|
Back to top |
|
 |
vinayak |
Posted: Tue Apr 09, 2002 5:32 am Post subject: |
|
|
Novice
Joined: 07 Apr 2002 Posts: 17
|
Kumar,
The reason code that is returned is 2087 (MQRC_UNKNOWN_REMOTE_Q_MGR).
But as far as my definitions are concerned I checked them all and as stephan mentioned I changed the Q manager's name to lower case too. But still the same problem.
Thanks,
Vinayak |
|
Back to top |
|
 |
mqonnet |
Posted: Tue Apr 09, 2002 6:03 am Post subject: |
|
|
 Grand Master
Joined: 18 Feb 2002 Posts: 1114 Location: Boston, Ma, Usa.
|
This one sure got me. At the face of it, all the definitions look good. Unless they are different in actuality. Hmm....
Take a look at the conditions under which you would get this reason code in the Manuals and see if any of them go with what is in your environment. But otherwise, this is very basic and i myself dont remember how many times i have executed the scenario. Sure somthing very small is missing....
Cheers.
Kumar
_________________ IBM Certified WebSphere MQ V5.3 Developer
IBM Certified WebSphere MQ V5.3 Solution Designer
IBM Certified WebSphere MQ V5.3 System Administrator |
|
Back to top |
|
 |
oz1ccg |
Posted: Tue Apr 09, 2002 6:44 am Post subject: |
|
|
 Yatiri
Joined: 10 Feb 2002 Posts: 628 Location: Denmark
|
Hi
Is the server qmgr named: 'DTC_SRVC.QUEUE.MANAGER' all capital letters ?
That's what is stated in your QREMOTE definition, so what might have goen wrong is when createing the QueueManager is the mix of upper and lower case letters.
I hope this might help you forwards against the goal, getting it all to work.
_________________ Regards, Jørgen
Home of BlockIP2, the last free MQ Security exit ver. 3.00
Cert. on WMQ, WBIMB, SWIFT. |
|
Back to top |
|
 |
StefanSievert |
Posted: Tue Apr 09, 2002 9:48 am Post subject: |
|
|
 Partisan
Joined: 28 Oct 2001 Posts: 333 Location: San Francisco
|
Quote: |
On 2002-04-09 06:32, vinayak wrote:
Kumar,
The reason code that is returned is 2087 (MQRC_UNKNOWN_REMOTE_Q_MGR).
But as far as my definitions are concerned I checked them all and as stephan mentioned I changed the Q manager's name to lower case too. But still the same problem.
Thanks,
Vinayak
|
Vinayak,
the DLQ message will contain the unknown name that led to the 2087. Can you please post the hex dump for the related DLQ message that you got?
I am still supspecting that your object names do not match exactly, but the dead letter message will give you all the info you need.
Stefan
PS. Remember that all your names you specify in MQSC commands will be folded to uppercase unless you use quotes around them. Please verify that your target queue manager is actually named DTC_SRVC.QUEUE.MANAGER and not dtc_srvc.queue.manager...
_________________
Stefan Sievert
IBM Certified * MQSeries
In the end everything is right. If not, it's not the end.
[ This Message was edited by: StefanSievert on 2002-04-09 10:51 ] |
|
Back to top |
|
 |
vinayak |
Posted: Tue Apr 09, 2002 10:52 am Post subject: |
|
|
Novice
Joined: 07 Apr 2002 Posts: 17
|
stefan,
Is the entry in my inetd.conf file causing the problem
because in that file the entries are as follows
MQSeries1 stream tcp nowait mqm /opt/mqm/bin/amqcrsta amqcrsta -m brainqueue.manager
MQSeries2 stream tcp nowait mqm /opt/mqm/bin/amqcrsta amqcrsta -m
dtc_srvc.queue.manager
So do i need to change the QM names to uppercase in that file.
Thanks,
Vinayak |
|
Back to top |
|
 |
mqonnet |
Posted: Tue Apr 09, 2002 11:12 am Post subject: |
|
|
 Grand Master
Joined: 18 Feb 2002 Posts: 1114 Location: Boston, Ma, Usa.
|
Vinayak,
I dont think it is your inetd values that is causing any problem. As stefan pointed out earlier, if the lowercase names in this file were to cause the problem, they would have done much before. Which means that the channels would not be running. But since the channels are up and running, this means that these values are not the ones causing the problem. As pointed out earlier by stefan, you might want to check the names you are entering for QM. Also pasting the output from DLQ message would help.
Cheers.
Kumar
_________________ IBM Certified WebSphere MQ V5.3 Developer
IBM Certified WebSphere MQ V5.3 Solution Designer
IBM Certified WebSphere MQ V5.3 System Administrator |
|
Back to top |
|
 |
vinayak |
Posted: Tue Apr 09, 2002 11:48 am Post subject: |
|
|
Novice
Joined: 07 Apr 2002 Posts: 17
|
Kumar,
Here is the message from DLQ
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 : 273 CodedCharSetId : 819
Format : 'MQDEAD '
Priority : 0 Persistence : 0
MsgId : X'414D5120627261696E2E71756575652E3CB33FB600003013'
CorrelId : X'000000000000000000000000000000000000000000000000'
BackoutCount : 1
ReplyToQ : ' '
ReplyToQMgr : 'brain.queue.manager '
** Identity Context
UserIdentifier : 'dtc '
AccountingToken :
X'0434353837000000000000000000000000000000000000000000000000000000'
ApplIdentityData : ' '
** Origin Context
PutApplType : '6'
PutApplName : 'amqsput0 '
PutDate : '20020409' PutTime : '19313600'
ApplOriginData : ' '
GroupId : X'000000000000000000000000000000000000000000000000'
MsgSeqNumber : '1'
Offset : '0'
MsgFlags : '0'
OriginalLength : '176'
**** Message ****
length - 176 bytes
00000000: 444C 4820 0000 0001 0000 0827 444F 2E44 'DLH .......'DO.D'
00000010: 4159 2E51 5545 5545 2020 2020 2020 2020 'AY.QUEUE '
00000020: 2020 2020 2020 2020 2020 2020 2020 2020 ' '
00000030: 2020 2020 2020 2020 2020 2020 4454 435F ' DTC_'
00000040: 5352 5643 2E51 5545 5545 2E4D 414E 4147 'SRVC.QUEUE.MANAG'
00000050: 4552 2020 2020 2020 2020 2020 2020 2020 'ER '
00000060: 2020 2020 2020 2020 2020 2020 0000 0111 ' ....'
00000070: 0000 0333 4D51 5354 5220 2020 0000 0006 '...3MQSTR ....'
00000080: 616D 7163 7273 7461 5F64 2020 2020 2020 'amqcrsta_d '
00000090: 2020 2020 2020 2020 2020 2020 3230 3032 ' 2002'
000000A0: 3034 3039 3139 3331 3336 3031 7465 7374 '040919313601test'
No more messages
MQCLOSE
MQDISC
|
|
Back to top |
|
 |
mqonnet |
Posted: Tue Apr 09, 2002 12:00 pm Post subject: |
|
|
 Grand Master
Joined: 18 Feb 2002 Posts: 1114 Location: Boston, Ma, Usa.
|
Vinayak,
As i mentioned earlier, AMQSBCG would not get any useful information. Reason being, all the info including the Reason code, is within the "Message" bit of the Amqsbcg output. Hence, what you need to do is, either get a program to display the Dead letter queue "Message" in appropriate format, or modify the Amqsbcg program by yourself and display each value from the buffer after MQGET using MQDLH structure. This would give the clear picutre.
By the way, how did you figure out that the error was 2087. Not quite sure if it would be logged to the mqerror log. And sure it will not and does not appear on the amqsbcg output.
Cheers.
Kumar
_________________ IBM Certified WebSphere MQ V5.3 Developer
IBM Certified WebSphere MQ V5.3 Solution Designer
IBM Certified WebSphere MQ V5.3 System Administrator |
|
Back to top |
|
 |
vinayak |
Posted: Tue Apr 09, 2002 12:04 pm Post subject: |
|
|
Novice
Joined: 07 Apr 2002 Posts: 17
|
Kumar,
I got the reason code from another program which just reads
the header of the Dead letter Q and it is showing the same now too "
the famous "2087"
and i got the hex dump from amqbcg0.
This o/p from where i got the reason code might help u.
START OF MESSAGE NUMBER 1
MsgType = 8
Destination Queue Name = DO.DAY.QUEUE
Destination QMgr Name = DTC_SRVC.QUEUE.MANAGER
Sending Applicat Name = amqcrsta_d
Time Sent = 193136 (hhmmss)
Date Sent = 20020409 (yyyymmdd)
Delivery Failure Reason = 2087
DeadReplyQName =
DeadReplyQMgrName = brain.queue.manager
DeadFormat = MQDEAD
DeadPriority = 0
DeadPersistence = 0
DeadMsgType = 8
DeadMsgFlags = 0
DeadExpiry = -1
DeadMsgSeqNumber = 1
END OF MESSAGE 1
Thanks,
Vinayak
[ This Message was edited by: vinayak on 2002-04-09 13:19 ] |
|
Back to top |
|
 |
|