Author |
Message
|
pfarrel |
Posted: Fri May 17, 2013 7:22 am Post subject: MA01 with MQ 7.5 |
|
|
Centurion
Joined: 16 Mar 2004 Posts: 120 Location: Kansas City
|
Support pack MA01 is a very useful program that can be used to move/copy messages from one queue to another, create test data, perform load testing, etc. I have been having trouble getting it to work with MQ version 7.5. It gets 2059 return code. Has anyone run into this problem ?
Here is the output when running it on an AIX system using local bindings:
mqm@aktv1infa47:/mqwork $ q -mWMBUXBX3 -oPETERR
MQSeries Q Program by Paul Clarke [ V6.0.0 Build:May 2 2012 ]
Connecting ...failed.
MQCONN on object 'WMBUXBX3' returned 2059 QMgr not available..
The queue manager is up and running, it is at version 7.5 and is part of Installation1. I am running as user mqm and the setmqenv has been issued to switch to Installation1. I am able to run other programs with local bindings ( e.g. amqsput ), but not MA01. Could the "q" program be doing something special on the MQCONN call ? Is there a way I can make it work ? |
|
Back to top |
|
 |
Vitor |
Posted: Fri May 17, 2013 7:25 am Post subject: Re: MA01 with MQ 7.5 |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
pfarrel wrote: |
Could the "q" program be doing something special on the MQCONN call ? Is there a way I can make it work ? |
Could it be trying to establish a client connection where you WMQv7.5 default settings have been left in place & such connections are refused? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
pfarrel |
Posted: Fri May 17, 2013 9:00 am Post subject: Q |
|
|
Centurion
Joined: 16 Mar 2004 Posts: 120 Location: Kansas City
|
Here is an example of running the same utility on another lpar which has MQ v 7.0.1.7 installed. The version of the program "q" is the same. The queue manager is a different name. It works fine on this lpar.
mqm@aktc1infa12a:/mqwork $ q -mWMBUXBT1 -oPETERR -q -p1
MQSeries Q Program by Paul Clarke [ V6.0.0 Build:May 2 2012 ]
Connecting ...connected to 'WMBUXBT1'.
>#!10000/-2000/15 TEST2
mqm@aktc1infa12a:/mqwork $
I think that it has something to do with the version of MQ that is causing it to fail. Something about MQ v 7.5. |
|
Back to top |
|
 |
pfarrel |
Posted: Fri May 17, 2013 9:03 am Post subject: |
|
|
Centurion
Joined: 16 Mar 2004 Posts: 120 Location: Kansas City
|
Let me also say that you can run the "q" program with client bindings, but that's not what I am doing here. ( If you need a client connection you have to supply additional parameters when invoking the program ). |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri May 17, 2013 8:42 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
pfarrel wrote: |
Let me also say that you can run the "q" program with client bindings, but that's not what I am doing here. ( If you need a client connection you have to supply additional parameters when invoking the program ). |
What does
Code: |
env | grep -i MQServer |
return? _________________ MQ & Broker admin |
|
Back to top |
|
 |
pfarrel |
Posted: Sun May 19, 2013 7:24 am Post subject: |
|
|
Centurion
Joined: 16 Mar 2004 Posts: 120 Location: Kansas City
|
It doesn't return anything.
aktv1infa47:/ # env | grep -i MQServer
aktv1infa47:/ # |
|
Back to top |
|
 |
pfarrel |
Posted: Sun May 19, 2013 7:31 am Post subject: |
|
|
Centurion
Joined: 16 Mar 2004 Posts: 120 Location: Kansas City
|
I have tried running the MA01 program as if it were connecting via client bindings, but it still gets the same result.
In the example below I first try to run it using local bindings, which is the way I have always run it before ( on previous versions of MQ ), then I set MQSERVER and tried again.
aktv1infa47:/ # su - mqm
MQ_JAVA_INSTALL_PATH is /usr/mqm/java
MQ_JAVA_DATA_PATH is /var/mqm
MQ_JAVA_LIB_PATH is /usr/mqm/java/lib64
CLASSPATH is :/usr/mqm/java/lib/com.ibm.mq.jar:/usr/mqm/java/lib/com.ibm.mqjms.jar:/usr/mqm/samp/jms/samples:/usr/mqm/samp/wmqjava/samples
mqm@aktv1infa47:/home/mqm $ cd /mqwork
mqm@aktv1infa47:/mqwork $ q -mWMBUXBX3 -oPETERR -q -p1
MQSeries Q Program by Paul Clarke [ V6.0.0 Build:May 2 2012 ]
Connecting ...failed.
MQCONN on object 'WMBUXBX3' returned 2059 QMgr not available..
mqm@aktv1infa47:/mqwork $ export MQSERVER=SYSTEM.ADMIN.SVRCONN/TCP/AKTV1INFA47\(1423\)
mqm@aktv1infa47:/mqwork $ echo $MQSERVER
SYSTEM.ADMIN.SVRCONN/TCP/AKTV1INFA47(1423)
mqm@aktv1infa47:/mqwork $ q -mWMBUXBX3 -oPETERR -q -p1
MQSeries Q Program by Paul Clarke [ V6.0.0 Build:May 2 2012 ]
Connecting ...failed.
MQCONN on object 'WMBUXBX3' returned 2059 QMgr not available..
mqm@aktv1infa47:/mqwork $ |
|
Back to top |
|
 |
pfarrel |
Posted: Sun May 19, 2013 7:34 am Post subject: |
|
|
Centurion
Joined: 16 Mar 2004 Posts: 120 Location: Kansas City
|
Here I try to run it from another lpar, setting up MQSERVER to point to the v7.5 queue manager. I don't think it is designed to work this way without additional parameters being set when calling the program.
aktc1infa12b:/ # su - mqm
MQ_JAVA_INSTALL_PATH is /usr/mqm/java
MQ_JAVA_DATA_PATH is /var/mqm
MQ_JAVA_LIB_PATH is /usr/mqm/java/lib64
CLASSPATH is :/usr/mqm/java/lib/com.ibm.mq.jar:/usr/mqm/java/lib/com.ibm.mqjms.jar:/usr/mqm/samp/jms/samples:/usr/mqm/samp/wmqjava/samples
[YOU HAVE NEW MAIL]
mqm@aktc1infa12b:/home/mqm $ export MQSERVER=SYSTEM.ADMIN.SVRCONN/TCP/AKTV1INFA47\(1423\)
mqm@aktc1infa12b:/home/mqm $ echo $MQSERVER
SYSTEM.ADMIN.SVRCONN/TCP/AKTV1INFA47(1423)
mqm@aktc1infa12b:/home/mqm $ cd /mqwork
mqm@aktc1infa12b:/mqwork $ q -mWMBUXBX3 -oPETERR -q -p1
MQSeries Q Program by Paul Clarke [ V6.0.0 Build:May 2 2012 ]
Connecting ...failed.
MQCONN on object 'WMBUXBX3' returned 2058 QMgr name error..
mqm@aktc1infa12b:/mqwork $ |
|
Back to top |
|
 |
pfarrel |
Posted: Sun May 19, 2013 7:37 am Post subject: |
|
|
Centurion
Joined: 16 Mar 2004 Posts: 120 Location: Kansas City
|
Here finally I run it on a different lpar where MQ is at version 7.0.1.
The queue manager is a local queue manager, and MQSERVER is not set. Success !
It works here, but fails when doing the same thing on version 7.5.
aktc1infa12a:/mqwork # su - mqm
MQ_JAVA_INSTALL_PATH is /usr/mqm/java
MQ_JAVA_DATA_PATH is /var/mqm
MQ_JAVA_LIB_PATH is /usr/mqm/java/lib64
CLASSPATH is :/usr/mqm/java/lib/com.ibm.mq.jar:/usr/mqm/java/lib/com.ibm.mqjms.jar:/usr/mqm/samp/jms/samples:/usr/mqm/samp/wmqjava/samples
[YOU HAVE NEW MAIL]
mqm@aktc1infa12a:/home/mqm $ cd /mqwork
mqm@aktc1infa12a:/mqwork $ q -mWMBUXBT1 -oPETERR -q -p1
MQSeries Q Program by Paul Clarke [ V6.0.0 Build:May 2 2012 ]
Connecting ...connected to 'WMBUXBT1'.
> |
|
Back to top |
|
 |
fjb_saper |
Posted: Sun May 19, 2013 12:54 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Completely working as designed! you need to review the 7.5 security guidelines. In this new version you cannot use system channels or admin access without changing the channel authorization records. If you search the net there are 3 interesting articles written by Morag(IBM)  _________________ MQ & Broker admin |
|
Back to top |
|
 |
pfarrel |
Posted: Wed May 22, 2013 1:40 am Post subject: |
|
|
Centurion
Joined: 16 Mar 2004 Posts: 120 Location: Kansas City
|
For anyone who might be interested, I have a solution to this problem.
( this solution is thanks to Mark Taylor ).
The MA01 program ( program name "q" ) has an environment variable all of its own, and if you set it then the program works with MQ version 7.5.
Here is what I set ( on an AIX system ).
export MQM_DLL_PATH=/wmq/usr/mqm/lib
( where the path /wmq/usr/mqm/lib is the location that I chose to install MQ version 7.5. Note that MQ version 7.0.1 is also installed on this lpar at /usr/mqm ).
Set this variable just prior to calling the "q" program, and it works. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed May 22, 2013 11:59 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
I would have thought that calling the v75 binary
Code: |
setmqenv -m <QMGRNAME> |
just before calling the q program would have worked just as well?
Maybe I am mistaken...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
pfarrel |
Posted: Thu May 23, 2013 7:48 am Post subject: |
|
|
Centurion
Joined: 16 Mar 2004 Posts: 120 Location: Kansas City
|
I did try that, and I got a 2059 ( QMGR not available ).
I have set up my mqm .profile to issue the setmqenv command so that it is ready for v7.5 as soon as you su to mqm.
I have this in the .profile
. /wmq/usr/mqm/bin/setmqenv -n Installation1
I also tried your suggestion by using this
. /wmq/usr/mqm/bin/setmqenv -m WMBUXBX3
I have not been able to get it to work without setting the environment variable MQM_DLL_PATH.
Without this setting I have always gotten a 2059. |
|
Back to top |
|
 |
|