ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » Reason Code 2035 by running PCFAgent example

Post new topic  Reply to topic
 Reason Code 2035 by running PCFAgent example « View previous topic :: View next topic » 
Author Message
thomas2004
PostPosted: Thu Nov 13, 2008 7:06 am    Post subject: Reason Code 2035 by running PCFAgent example Reply with quote

Novice

Joined: 13 Nov 2008
Posts: 16

Hi all,

As I try to run the following example, I got Reason code of 2035. Someone can help?
Code:

PCFAgent   agent = new PCFAgent ("localhost", 1414, "CLIENT");
   MQMessage []   responses;
   PCFParameter [] parameters =
       {
         new MQCFST (CMQC.MQCA_Q_NAME, "*"),
         new MQCFIN (CMQC.MQIA_Q_TYPE, MQC.MQQT_LOCAL)
       };
   MQCFH     cfh;
   MQCFSL     cfsl;
 
   responses = agent.send (CMQCFC.MQCMD_INQUIRE_Q_NAMES, parameters);
 
   cfh = new MQCFH (responses [0]);
 
   if (cfh.reason == 0)
   {
     cfsl = new MQCFSL (responses [0]);
 
     for (int i = 0; i < cfsl.strings.length; i++)
     {
       System.out.println ("Queue: " + cfsl.strings [i]);
     }
   }
   else
   {
     throw new MQException (cfh.compCode, cfh.reason, agent);
   }



According to the manual, it seems I don't have the priority, i.e. username and password for accessing the queue manager. But as when I use the following code to open to access the MQQueueManager, it is successful:
Code:

...
MQEnvironment.hostname = "localhost");
MQEnvironment.channel = "CLIENT";
MQEnvironment.port = 1414;
MQEnvironment.localAddressSetting = java.net.InetAddress.getLocalHost().getHostAddress();
// Bind MQQueueManager
MQQueueManager qMgr = new MQQueueManager("MQPT");  // MQPT is the MQ-Manager name
...
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Nov 13, 2008 8:02 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Maybe the userid you're using has authority to connect to the queue manager, but doesn't have enough authority to issue PCF commands and/or use the command queues.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
thomas2004
PostPosted: Thu Nov 13, 2008 12:49 pm    Post subject: Reply with quote

Novice

Joined: 13 Nov 2008
Posts: 16

I haven't used any userId. I gues a default userId was used.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Nov 13, 2008 2:16 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

thomas2004 wrote:
I haven't used any userId. I gues a default userId was used.


You were not signed onto the box in any way? At all? How can you not use any userid?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
thomas2004
PostPosted: Fri Nov 14, 2008 3:33 am    Post subject: Reply with quote

Novice

Joined: 13 Nov 2008
Posts: 16

Vitor wrote:


You were not signed onto the box in any way? At all? How can you not use any userid?


I wonder as well. As one can see, my program is shown in my first post above. I can connect to the MQ-manager and open the queue to send message.

But as I try to use the PCF to get more information, I got the error of authentication.



[/code]
Back to top
View user's profile Send private message
atheek
PostPosted: Fri Nov 14, 2008 4:58 am    Post subject: Reply with quote

Partisan

Joined: 01 Jun 2006
Posts: 327
Location: Sydney

What platform is the queue manager?
If windows you will get detailed authorisation error messages in AMQ** error logs like what privelege to what object by what user id resulted in 2035.

If unix turn on authiorisation events and monitor the queue manager event queue
Back to top
View user's profile Send private message
thomas2004
PostPosted: Fri Nov 14, 2008 5:04 am    Post subject: - Reply with quote

Novice

Joined: 13 Nov 2008
Posts: 16

atheek wrote:
What platform is the queue manager?
If windows you will get detailed authorisation error messages in AMQ** error logs like what privelege to what object by what user id resulted in 2035.

If unix turn on authiorisation events and monitor the queu manager event queue


Here is the information I get from the MQ-Manager. My program runs on Windows XP. The Queue is on IBM Mainframe.


Code:

[ INFO] 13:50:52 massage.monitor.MonitorManagerAndQueue - MQQueueManager is connected
[ INFO] 13:50:52 massage.monitor.MonitorManagerAndQueue - MQQueueManager is open
[ INFO] 13:50:52 massage.monitor.MonitorManagerAndQueue - MQQueueManager=com.ibm.mq.MQQueueManager@c7b00c
[ INFO] 13:50:52 massage.monitor.MonitorManagerAndQueue - MQQueueManager.CommandInputQueueName=SYSTEM.COMMAND.INPUT                           
[ INFO] 13:50:52 massage.monitor.MonitorManagerAndQueue - MQQueueManager.CommandLevel=600
[ INFO] 13:50:52 massage.monitor.MonitorManagerAndQueue - MQQueueManager.Description=IBM WebSphere MQ for z/OS - V6.0                               
[ INFO] 13:50:52 massage.monitor.MonitorManagerAndQueue - MQQueueManager.MaximumMessageLength=4194304
[ INFO] 13:50:52 massage.monitor.MonitorManagerAndQueue - MQQueueManager.MaximumPriority=9
[ INFO] 13:50:52 massage.monitor.MonitorManagerAndQueue - MQQueueManager.SyncpointAvailability=1
[ INFO] 13:50:52 massage.monitor.MonitorManagerAndQueue - MQQueueManager.CharacterSet=819
[ INFO] 13:50:52 massage.monitor.MonitorManagerAndQueue - MQQueueManager.DistributionListCapable=false
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Reason Code 2035 by running PCFAgent example
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.