Author |
Message
|
kayou |
Posted: Sat Dec 09, 2006 4:28 pm Post subject: MQ V6 Broker problem |
|
|
Novice
Joined: 05 Aug 2006 Posts: 21
|
Hi,
I'm developping a WMQ application on Windows XP and Linux RHEL4. Application Server is C++, Application Clients are C# and C++. The two clients do exactly the same thing (sending a request to a shared queue - the queue is processed by the server and replies are sent to clients' TEMPDYN reply queues). WMQ Server and WMQ base broker are running on Linux RHEL4.
Result :
The two application clients (C++ and C#) are putting correctly their messages on the request queue. Server is eating messages. But Server's responses remain on SYSTEM.BROKER.DEFAULT.STREAM.
Questions :
1) Why broker does not eat publish messages ?
2) How could I find it out broker specific error messages ?
3) If I browse queue messages I find out that CCSIDs on messages are changed to 819 even if I put 1208 or MQCCSI_Q_MGR on messages ; even all (client, server, queue manager) have 1208 as CCSID setting value ?
Thanks in advance for any help.
Following lines is information that could help understand the problem.
===============================================
Locale setting on WMQ Server (Linux) :
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
Note that on client side (Windows), MQCCSID is assigned 1208.
===============================================
Queue Manager settings :
ALTER QMGR DEADQ(SYSTEM.DEAD.LETTER.QUEUE)
ALTER QMGR CCSID (1208)
===============================================
Message settings for Pub/Sub:
var_message.setPersistence(MQPER_PERSISTENCE_AS_Q_DEF);
var_message.setCharacterSet(MQCCSI_Q_MGR);
var_message.setFormat(MQFMT_RF_HEADER);
var_message.setEncoding(MQENC_NATIVE);
===============================================
TEMPDYN Queue settings (Reply Queues) :
DEFINE QMODEL('CADS6.TEMPDYN.MODEL.QUEUE') +
DEFTYPE(TEMPDYN) +
PUT(ENABLED) +
DEFPSIST(NO) +
GET(ENABLED) +
MAXDEPTH(1000000) +
MAXMSGL(10000000) +
SHARE +
DEFSOPT(SHARED) +
MSGDLVSQ(FIFO) +
USAGE(NORMAL)
===============================================
MQRFH PSC dump (for Publish) :
MQPSCommand Publish MQPSQMgrName QM_CADS6 MQPSPubOpts NoReg MQPSQName CADS6.QM_CADS6687.REQUEST.RP MQPSTopic /0/CADS6.QM_CADS6687.REQUEST.RP
===============================================
MQMD header attributes of the Publish Message :
Data Length :373
Format : MQHRF
CCSID : 819
Encoding : 273
===============================================
MQRFH header attributes of the Publish Message :
Header Length :173
Format : MQSTR
CCSID : 819
Encoding : 273
Flag : 0
===============================================
Message errors :
----- amqccita.c : 3224 -------------------------------------------------------
12/09/2006 06:09:20 PM - Process(3531.9) User(mqm) Program(amqrmppa)
AMQ6174: The dynamically loadable shared library '/var/mqm/exits//MQHRF_r' was
not found. The system returned error number '2' and error message 'No such file
or directory'. The queue manager will continue without this module.
EXPLANATION:
This message applies to UNIX systems. The shared library
'/var/mqm/exits//MQHRF_r' was not found.
ACTION:
Check that the file exists, and is either fully qualified or is in the
appropriate director, also check the file access permissions.
-------------------------------------------------------------------------------
12/09/2006 06:14:16 PM - Process(3531.11) User(mqm) Program(amqrmppa)
AMQ9208: Error on receive from host homehost (192.168.2.11).
EXPLANATION:
An error occurred receiving data from homehost (192.168.2.11) over TCP/IP. This
may be due to a communications failure.
ACTION:
The return code from the TCP/IP (read) call was 104 (X'68'). Record these
values and tell the systems administrator.
----- amqccita.c : 3224 ------------------------------------------------------- |
|
Back to top |
|
 |
Gaya3 |
Posted: Sat Dec 09, 2006 11:33 pm Post subject: |
|
|
 Jedi
Joined: 12 Sep 2006 Posts: 2493 Location: Boston, US
|
Hi
The below 2 errors
Message errors :
----- amqccita.c : 3224 -------------------------------------------------------
12/09/2006 06:09:20 PM - Process(3531.9) User(mqm) Program(amqrmppa)
AMQ6174: The dynamically loadable shared library '/var/mqm/exits//MQHRF_r' was
not found. The system returned error number '2' and error message 'No such file
or directory'. The queue manager will continue without this module.
EXPLANATION:
This message applies to UNIX systems. The shared library
'/var/mqm/exits//MQHRF_r' was not found.
ACTION:
Check that the file exists, and is either fully qualified or is in the
appropriate director, also check the file access permissions.
-------------------------------------------------------------------------------
The above one, plz check the corresponding directory that file is there
if it is there check the file permission, it must have to be 555, and under mqm group
*****************************
12/09/2006 06:14:16 PM - Process(3531.11) User(mqm) Program(amqrmppa)
AMQ9208: Error on receive from host homehost (192.168.2.11).
EXPLANATION:
An error occurred receiving data from homehost (192.168.2.11) over TCP/IP. This
may be due to a communications failure.
ACTION:
The return code from the TCP/IP (read) call was 104 (X'68'). Record these
values and tell the systems administrator.
----- amqccita.c : 3224 -------------------------------------------------------
This one, check the listener is running or not,
any firewall established or not. and it is mentioned its a communication failure
please let us know about the status
Thanks and Regards
Gayathri
_________________ Regards
Gayathri
-----------------------------------------------
Do Something Before you Die |
|
Back to top |
|
 |
fjb_saper |
Posted: Sun Dec 10, 2006 6:59 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Are you sure your format MQHRF is right? (see requests for an inexisting exit...)
Are you sure you want the topic to start with a "/". Read up on the pub sub manual. I thought I had seen somewhere that the top level should not be preceded by a "/"....
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
kayou |
Posted: Mon Dec 11, 2006 9:27 pm Post subject: |
|
|
Novice
Joined: 05 Aug 2006 Posts: 21
|
1) Answer to Gaya3.
- About /var/mqm/exits//MQHRF_r error.
Directory /var/mqm/exits is on the linux machine, but is empty.
- About security problem.
Listeners and channels are running. Port 1414 on server is enabled ; I use only that port for queue manager. Client is XP SP2 ; do I have to enable something with the XP SP2 firewall ? I don't think so ; because response ports for clients are not known in advance. They are chosen dynamically.
- Proof that client and server are having good communication.
I'm administering the queue manager by MQ Explorer. The MQ Explorer is running on XP (the clients machine) and queue manager is running on Linux machine.
2) Answer to fjb_saper
I tried to use topics not beginning with a "/". But, it semms not to change something.
3) Personal investigations.
- I found exactly what was causing the MQHRF_r error.
The two clients (C#, C++) seem not to have the same way of interpreting values MQCCSI_Q_MGR, MQENC_NATIVE, MQCCSI_INHERIT. I found it out by trying to browse broker queue (SYSTEM.BROKER.CONTROL.QUEUE) with Capitalware's MQ Visual Edit tool. If there is only C++ subscriptions, queue opens and shows that : MQMD header has values 819 and 273 for CCSID and Encoding, MQRFH header has values 1208 and 546 for CCSID and Encoding. But ; if there are a subscription message in the queue, MQ Visual Edit shows the error "2119 MQRC_NOT_CONVERTED" ; it opens the queue ; but does not show messages written on the queue by the C# application. At the same time, the famous /var/mqm/exits//MQHRF_r error message is written in the log file. The broker probably encounters this problem every time it tries to read subscription messages sent by the C# client. That explains the MQHRF_r error.
If I do not use MQCCSI_Q_MGR, MQENC_NATIVE, MQCCSI_INHERIT and puts everywhere (MQMD and MQHRF) explicitly values (1208 and 546) for CCSID, control queue is successfullu opened and MQHRF_r error does not appear in the log.
4) Global status of the problem.
- Broker is eating publish messages (If I explicitly put CCSID and Encoding values) ; but, it does not send them anywhere and does not put them on dead letter queue.
- If I apply the CCSID and Encoding workaround, the messages written in the log file are those below (192.168.2.11 is clients' API address).
----- amqccita.c : 3248 -------------------------------------------------------
12/11/2006 11:19:22 PM - Process(3531.116) User(mqm) Program(amqrmppa)
AMQ9208: Error on receive from host homehost (192.168.2.11).
EXPLANATION:
An error occurred receiving data from homehost (192.168.2.11) over TCP/IP. This
may be due to a communications failure.
ACTION:
The return code from the TCP/IP (read) call was 104 (X'68'). Record these
values and tell the systems administrator.
----- amqccita.c : 3224 -------------------------------------------------------
12/11/2006 11:21:16 PM - Process(3531.108) User(mqm) Program(amqrmppa)
AMQ9209: Connection to host 'homehost (192.168.2.11)' closed.
EXPLANATION:
An error occurred receiving data from 'homehost (192.168.2.11)' over TCP/IP.
The connection to the remote host has unexpectedly terminated.
ACTION:
Tell the systems administrator.
----- amqccita.c : 3248 ------------------------------------------------------- |
|
Back to top |
|
 |
kayou |
Posted: Fri Dec 15, 2006 2:22 am Post subject: |
|
|
Novice
Joined: 05 Aug 2006 Posts: 21
|
I have been able to make my pub/sub code work when changing the CCSID to en_US.iso88591. But, this does not give me answer to the following mysterious questions :
1) It seems WMQ base broker did not be able to read pub/sub commands when CCSID was en_US.UTF8, even the WMQ servers machine LC_* environment variables were all set to en_US.UTF8 ?
2) In fact, Broker tries to convert commands by an exit called MQHRF_r, but did not find that exit. Why I do not have that exit on my WMQ server Linux ?
3) The behaviour of MQCCSI_Q_MGR in C# seems not to be the same as in C++ ? I used MQCCSI_INHERIT (in both languages) where I was supposed to use MQCCSI_Q_MGR to have things working ? |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Dec 15, 2006 4:40 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
The base broker that comes with WMQ uses the MQRFH header. The pub/sub broker that comes with Event Broker and Message Broker uses the MQRFH2 header.
Both of these headers have specific restrictions on what things they can include, and what codepages those things can be in.
If you are manually building your MQRFH header (and not building an MQRFH2 header), and you are seeing conversion issues, then you are probably not specifying the header correctly - particular points of usual mistake are putting things in an unsupported code page and specifying the wrong value in MQMD.Format. You should *always* use constants for MQMD.Format, and never use literal values. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
kayou |
Posted: Fri Dec 15, 2006 11:39 am Post subject: |
|
|
Novice
Joined: 05 Aug 2006 Posts: 21
|
Thanks for your reply jefflowrey,
The broker "limitation" hint could be an interesting one for understanding the problem i'm having now.
1) I'm using MQRFH (version 1), because MQRFH2 is not supported by the base WMQ broker (Limitation number 1 !).
2) What do you mean by "constants" and "litteral" ? In my programmer's terminology there's no much difference between constant and litteral.
3) Anyway, I tried to do things simple. MQ Manager is running on a Linux server and is supposed to inherit his CCSID from that machine's "locale" settings. In my C++ and C# code, I never explicitly specify any specific value ; I worked with genric values : MQCCSI_INHERIT, MQCCSI_Q_MGR, MQENC_NATIVE.
4) MQMD.Format is always MQFMT_RF_HEADER. |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Dec 15, 2006 3:04 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
This may be a silly question but
have you looked at the XMS support pack?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
kayou |
Posted: Sat Dec 16, 2006 3:15 pm Post subject: |
|
|
Novice
Joined: 05 Aug 2006 Posts: 21
|
Thanks for hint ; was not silly.
Yes ; I could do with XMS what I'm doing with C# or C++ native Interface. XMS is a high-level API wrapping those interfaces and pub/sub (MQRFH) details.
But ; two facts :
1) More abstraction level reduces performance and, does not help understand low-level problems.
2) I'm not sure RFH (version 1) is supported by XMS ? |
|
Back to top |
|
 |
fjb_saper |
Posted: Sat Dec 16, 2006 10:31 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
kayou wrote: |
Thanks for hint ; was not silly.
Yes ; I could do with XMS what I'm doing with C# or C++ native Interface. XMS is a high-level API wrapping those interfaces and pub/sub (MQRFH) details.
But ; two facts :
1) More abstraction level reduces performance and, does not help understand low-level problems. |
I have looked at the APIs in java and JMS. The performance difference for a well written app is negligible unless you need a lot of volume with miliseconds response time... But still those would be extremes...
kayou wrote: |
2) I'm not sure RFH (version 1) is supported by XMS ? |
As XMS is the non java side of JMS it should support version 1 of the RFH header. Just make sure the version is set correctly on the Topic Connection Factory.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
saketr |
Posted: Sat Feb 24, 2007 10:07 am Post subject: |
|
|
Apprentice
Joined: 08 Feb 2006 Posts: 41
|
Quote: |
1) More abstraction level reduces performance and, does not help understand low-level problems.
|
True. But, would you program in assembly?
Quote: |
2) I'm not sure RFH (version 1) is supported by XMS ? |
Indeed it does.
--
a Hursley view on WebSphere MQ @ http://hursleyonwmq.wordpress.com [/quote] |
|
Back to top |
|
 |
|