Author |
Message
|
rajesh_avrs |
Posted: Fri Oct 12, 2001 7:39 am Post subject: |
|
|
Apprentice
Joined: 18 May 2001 Posts: 31
|
We have a japanese version of MQI Client set up in Windows 2000.This
connects to the unix machine having English OS.
When we try to connect from the japanese OS to the Queue Manager in
the English OS, error is returned saying that the given queue manager
is not available.But when we run from an English version OS, it is
able to connect. Any ideas as to what the problem could be?
_________________ ****************
MQSeries is cool
**************** |
|
Back to top |
|
 |
Tibor |
Posted: Sat Oct 13, 2001 2:41 pm Post subject: |
|
|
 Grand Master
Joined: 20 May 2001 Posts: 1033 Location: Hungary
|
You have to set MQCCSID global environment variable. Recommended values 850, 1252 or 819.
I know this problem, we are working on hungarian WinNT/2K...
|
|
Back to top |
|
 |
wangquanyong |
Posted: Wed Jan 23, 2002 4:49 am Post subject: |
|
|
Novice
Joined: 22 Jan 2002 Posts: 17 Location: China
|
I had set MQCCSID global environment variable. Recommended values 850, 1252 or 819. And then retried it, but an reasoncode of 2035 came back.
What shall I do to resolve it? |
|
Back to top |
|
 |
Tibor |
Posted: Wed Jan 23, 2002 4:59 am Post subject: |
|
|
 Grand Master
Joined: 20 May 2001 Posts: 1033 Location: Hungary
|
ReasonCode 2035 says you have not authorized for some MQ object (qmgr, queue).
|
|
Back to top |
|
 |
wangquanyong |
Posted: Wed Jan 23, 2002 5:39 am Post subject: |
|
|
Novice
Joined: 22 Jan 2002 Posts: 17 Location: China
|
But use Java, I simply connect to the same MQManager, put/get messages from it without user and password.
Why? |
|
Back to top |
|
 |
StefanSievert |
Posted: Wed Jan 23, 2002 12:06 pm Post subject: |
|
|
 Partisan
Joined: 28 Oct 2001 Posts: 333 Location: San Francisco
|
Quote: |
On 2002-01-23 05:39, wangquanyong wrote:
But use Java, I simply connect to the same MQManager, put/get messages from it without user and password.
Why?
|
You are accessing a queue manager on a UNIX system through a client connection channel. The corresponding server connection channel has an attribute called MCAUSER (Message Channel Agent User). This is set to blanks by default, meaning that MQ takes the userId that gets shipped over from the client. As this UserId (your Windows userId) is - most likely - not defined on your Unix box, MQ rejects your connection attempt with a 2035(MQRC_NOT_AUTHORIZED). You have two options:
1/ Change your server connection channel and specify MCAUSER('xxx') where 'xxx' is a valid userid on the UNIX box and is either a member of the group 'mqm' or has been given appropriate authority through the 'setmqaut' command (see System Administration Guide)
2/ define your windows userid on the unix box and make it either a member of the group 'mqm' or give it appropriate authority through the 'setmqaut' command (see System Administration Guide)
Another option is writing a security exit, but you probably don't want to go there unless you are forced to.
Good luck,
Stefan
_________________ Stefan Sievert
IBM Certified * WebSphere MQ |
|
Back to top |
|
 |
wangquanyong |
Posted: Wed Jan 23, 2002 6:06 pm Post subject: |
|
|
Novice
Joined: 22 Jan 2002 Posts: 17 Location: China
|
Thank you StefanSievert for your advices. I will try it.
But I still want to know why Java code dosn't need userid and password to connect with the same QueueManager.(I ran Java code on the same environment)
Would you give me any explanation? |
|
Back to top |
|
 |
StefanSievert |
Posted: Thu Jan 24, 2002 11:48 am Post subject: |
|
|
 Partisan
Joined: 28 Oct 2001 Posts: 333 Location: San Francisco
|
It looks like we have two different threads mixed up here. The original question had to do with an MQSeries Java client. It looks like you are talking about the server bindings. Even a Java application runs under a certain userID. If this userId has no permissions to access MQSeries objects, no matter if on a local or remote server, you will get a 2035.
Please clarify what exactly your environment looks like so we can stop muddying the waters.
Stefan
_________________ Stefan Sievert
IBM Certified * WebSphere MQ |
|
Back to top |
|
 |
wangquanyong |
Posted: Thu Jan 24, 2002 6:52 pm Post subject: |
|
|
Novice
Joined: 22 Jan 2002 Posts: 17 Location: China
|
Perhaps I have not explained the problem clearly.
I mean that:
I want to connect from a MQClient(Win2K-Japanese,the codepage is 932) to a MQServer(HP-Unix,the default codepage is 1051). I wrote a Java program, just by setting the class MQEnvironment.CCSID to 1051, and succeeded to connect a MQManager for put&get messages from a queue. I never set the userid&password.
But, I failed(got reasoncode 2059) at trying the command of amqsputc.exe which MQSeries Client provides. Even after I set the system environment varible MQCCSID to 1051, it also failed with reasoncode 2035(MQRC_NOT_AUTHORIZED).
I did them at the same MQClient(Win2K-Japanese,the codepage is 932) and MQServer(HP-Unix,the default codepage is 1051), using the same queue,queue manager and channel.
Why Java code does not need to set userid&password? |
|
Back to top |
|
 |
StefanSievert |
Posted: Fri Jan 25, 2002 1:45 am Post subject: |
|
|
 Partisan
Joined: 28 Oct 2001 Posts: 333 Location: San Francisco
|
Do you use the same client connection channel for both, the java program and the amqsputc command line sample??
_________________ Stefan Sievert
IBM Certified * WebSphere MQ |
|
Back to top |
|
 |
wangquanyong |
Posted: Sun Jan 27, 2002 7:19 pm Post subject: |
|
|
Novice
Joined: 22 Jan 2002 Posts: 17 Location: China
|
|
Back to top |
|
 |
dnaren |
Posted: Wed Feb 12, 2003 9:52 pm Post subject: |
|
|
 Apprentice
Joined: 10 Aug 2001 Posts: 45 Location: Charlotte, NC
|
You are NOT correct.
Java programs connect through "SERVER CONNECTION" channel only. Your java program is not using client connection channel.
 |
|
Back to top |
|
 |
PeterPotkay |
Posted: Tue Feb 18, 2003 5:03 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
I went through this confusion just a couple of weeks ago!
http://www.mqseries.net/phpBB/viewtopic.php?t=7382&highlight=
Some more detail:
When they do, and they do not set the UserId property of the Environment class, and there are no system Environment variables set on the Client machine to set the MQ User ID, and there is no Security exit to set the ID, then for JAVA clients, no ID is flowed.
So what happens instead is that the ID of process that started the channel (the MCA) is attached to the message. This ID (probably mqm or MUSER_MQADMIN; not sure which. I'm at home and can't check for sure, but it is one of the 2) is in the MQM group, so you connect in.
Use a client with a different language (like C) and then the ID of the Client machine is used.
Set the the ID in the JAVA Client app via the MQEnvironment class, and then that ID is used, instead of the MCA's ID.
Set the MQUSERID attribute of the SVRCONN channel, and then that value overrides everything that is being sent by the client, regardless of how it got set.
You can prove all this by trying to put the message by various ways and then checking the UserID attribute of the message once it is on the queue (assumming all the different IDs actually have authority).
Most of this is explained in Chapter 7 of the Client Manual.
http://publibfp.boulder.ibm.com/epubs/html/csqzaf07/csqzaf07tfrm.htm _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
|