|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
client connection with specified USERID to QMGR of user mqm |
« View previous topic :: View next topic » |
Author |
Message
|
peterw686 |
Posted: Fri Jan 23, 2004 10:52 am Post subject: client connection with specified USERID to QMGR of user mqm |
|
|
Acolyte
Joined: 26 Sep 2002 Posts: 73
|
Hi
I am using a client application connecting to a QMGR with user "mqm" on unix. When I tried to connect with user id other than 'null' (even'mqm' doesn't work), I got 2035 error.
The code use Java Client API:
Code: |
MQEnvironment.userID = user; |
I was told the default if MCAUSER is "", it allows all the user access.
Please correct me. |
|
Back to top |
|
 |
mqonnet |
Posted: Fri Jan 23, 2004 10:58 am Post subject: |
|
|
 Grand Master
Joined: 18 Feb 2002 Posts: 1114 Location: Boston, Ma, Usa.
|
Peter, i think you need to explain in detail (and ONLY in ONE thread) what exactly are you trying to do. You have opened up at least 3 or more threads with more or less the same issue. You need to explain in detail what your setup is and what you are trying to achieve and where the problem lies.
If you want an example, check the thread below.
http://www.mqseries.net/phpBB2/viewtopic.php?t=13049&highlight=
The answer to this question is also in most of my previous responses. You NEED A PRINCIPAL DEFINED WITH SAME USERID THAT YOU ARE LOGGED IN AS ON THE CLIENT MACHINE, DEFINED ON THE MACHINE WHERE YOUR QUEUE MANAGER IS.
Hope this helps.
Cheers
Kumar |
|
Back to top |
|
 |
peterw686 |
Posted: Fri Jan 23, 2004 11:08 am Post subject: |
|
|
Acolyte
Joined: 26 Sep 2002 Posts: 73
|
Hi Kumar,
Sorry for messed up.
The reason I put here (or put in seperate threads) because the questions I asked are not only for solving my current project problem, but also for my personal studying MQ and understanding it.
What confused me is that if I don't put user id (put it null), I can connect to the remote queue manager. why?  |
|
Back to top |
|
 |
mqonnet |
Posted: Fri Jan 23, 2004 11:15 am Post subject: |
|
|
 Grand Master
Joined: 18 Feb 2002 Posts: 1114 Location: Boston, Ma, Usa.
|
The answer again is in my previous post, even though not exact to your question.
"The answer to this question is also in most of my previous responses. You NEED A PRINCIPAL DEFINED WITH SAME USERID THAT YOU ARE LOGGED IN AS ON THE CLIENT MACHINE, DEFINED ON THE MACHINE WHERE YOUR QUEUE MANAGER IS.
"
So, to ans your q, there must be a userid/principal defined with the user that you are logged in as. And hence, without specifying any userid you are able to connect, but not when you put in a userid. Because that userid does not exist on the other side(QM3, i would assume).
Cheers
Kumar |
|
Back to top |
|
 |
peterw686 |
Posted: Fri Jan 23, 2004 11:53 am Post subject: |
|
|
Acolyte
Joined: 26 Sep 2002 Posts: 73
|
I understand most of it. Please check below to see if I understand wrong.
Environment:
QM1 is on Solaris Unix machine. The log in id is mqm under mqm group.
QM1 has one local queue Q1.
On that unix box, there is no any security setup yet.
Client App App1 is on win2000 platform, a Java client using MQ java class.
The win2000 log in ID is "peter".
Test case goal: connect to QM1 and send a message to Q1 by running App1 on win2000.
Case 1:
if the App1 doesn't sepecify user id in code.
Code: |
MQEnvironment.userID = null; |
, it can send message to Q1. This is because the MQ on unix doesn't have security setup.
Case 2:
Quote: |
MQEnvironment.userID = "peter" |
doesn't work because unix MQ has no such principal "peter" defined.
Case 3:
Quote: |
MQEnvironment.userID = "abc" |
doesn't work because unix MQ has no such principal "abc" defined.
Case 4:
Quote: |
MQEnvironment.userID = "mqm" |
works because unix MQ itself is user "mqm".
Are those correct? When I run the test case, both 2,3 throw "om.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2035".
Basic on the test cases, the MQ seems check the user id given in the MQEnvironment to see if the principal exists or not, not the client machine log in ID( in this case "peter"). |
|
Back to top |
|
 |
mqonnet |
Posted: Fri Jan 23, 2004 12:06 pm Post subject: |
|
|
 Grand Master
Joined: 18 Feb 2002 Posts: 1114 Location: Boston, Ma, Usa.
|
Ah!!! Peter you got it!!!!
As you pointed you, other users such as "peter" does not work because there is NO principal defined on the unix box. Once you define this userid/principal on unix and allocate authority to it as desired, you should be able to use even "peter" to connect to QM1 on unix.
Cheers
Kumar |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|