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 Security » MQ API program throwing error 2035

Post new topic  Reply to topic
 MQ API program throwing error 2035 « View previous topic :: View next topic » 
Author Message
Nitgeek
PostPosted: Mon Dec 10, 2012 1:43 am    Post subject: MQ API program throwing error 2035 Reply with quote

Novice

Joined: 21 Feb 2012
Posts: 21

MQ API program throwing error 2035, but able to connect via RFHUTIL
I am using MQ API with JAVA on WMQ 7.0.1.8.

I am trying to post a PCF message to a Queue manager on a remote machine.
I am getting MQRC_NOT_AUTHORISED, error 2035 while doing so.


But, I am **able to successfully connect**, load names, write, read messages to the queue manager using **RFHUTILC** with SYSTEM.ADMIN.SVRCONN channel.

What special way does RFHUTILC uses if it doesn't uses PCF message for loading queue names?


Further, If I try to **PUT** a normal message to some queue on that queue manager, I am able to do this.
But when I try to **GET** that message, I get error **2059**.

I am using "SYSTEM.ADMIN.SVRCONN" channel for all connections.


I have the admin rights on the target queue manager.
Kindly, suggest some possible solutions to the problem.

Here is the code snippet if required:

Code:
PCF_CommonMethods pcfCM = new PCF_CommonMethods();
       String[] param=new String[3];
       param[0]=jTextField1.getText();
       param[1]=jComboBox1.getSelectedItem().toString();
       param[2]=jTextField6.getText();
       try {
       if (pcfCM.ParseParameters(param)) {
        pcfCM.CreateAgent(param.length);

        PCFMessage pcfCmd = new PCFMessage(MQConstants.MQCMD_INQUIRE_Q);

         // Add the inquire rules.
         // Queue name = wildcard.
          pcfCmd.addParameter(MQConstants.MQCA_Q_NAME, "*");

            // Queue type = LOCAL.
            pcfCmd.addParameter(MQConstants.MQIA_Q_TYPE, MQConstants.MQQT_LOCAL);
             try{
       
               PCFMessage[] pcfResponse = pcfCM.agent.send(pcfCmd);
   
   
               for (int index = pcfResponse.length-1; index > 0; index--) {
             PCFMessage response = pcfResponse[index];
             String q=(String)response.getParameterValue(MQConstants.MQCA_Q_NAME);
           
             jComboBox3.addItem(q);

           }
     
   
 

                }
          catch(Exception e){}
   
          pcfCM.DestroyAgent();
            }
        }
       catch (Exception e) {
         pcfCM.DisplayException(e);
       }





Queue Manager properties:

Quote:
DISPLAY QMGR ALL

QMNAME(T2MSBK02) ACCTCONO(DISABLED)
ACCTINT(1800) ACCTMQI(OFF)
ACCTQ(OFF) ACTIVREC(MSG)
ALTDATE(2012-10-16) ALTTIME(18.54.26)
AUTHOREV(DISABLED) CCSID(1208)
CHAD(DISABLED) CHADEV(DISABLED)
CHADEXIT( ) CHLEV(DISABLED)
CLWLDATA( ) CLWLEXIT( )
CLWLLEN(100) CLWLMRUC(999999999)
CLWLUSEQ(LOCAL) CMDEV(DISABLED)
CMDLEVEL(701) COMMANDQ(SYSTEM.ADMIN.COMMAND.QUEUE)
CONFIGEV(DISABLED) CRDATE(2008-10-21)
CRTIME(17.33.33) DEADQ(SYSTEM.DEAD.LETTER.QUEUE)
DEFXMITQ( )
DESCR(Qmgr Script Date: 6/14/2012 At 3:28:28 PM)
DISTL(YES) INHIBTEV(DISABLED)
IPADDRV(IPV4) LOCALEV(DISABLED)
LOGGEREV(DISABLED) MARKINT(5000)
MAXHANDS(512) MAXMSGL(104857600)
MAXPROPL(NOLIMIT) MAXPRTY(9)
MAXUMSGS(10000) MONACLS(QMGR)
MONCHL(LOW) MONQ(LOW)
PARENT( ) PERFMEV(ENABLED)
PLATFORM(UNIX) PSRTYCNT(5)
PSNPMSG(DISCARD) PSNPRES(NORMAL)
PSSYNCPT(IFPER) QMID(T2MSBK02_2008-10-21_17.33.33)
PSMODE(ENABLED) REMOTEEV(DISABLED)
REPOS( ) REPOSNL(MSINTERNAL)
ROUTEREC(MSG) SCHINIT(QMGR)
SCMDSERV(QMGR) SSLCRLNL( )
SSLCRYP( ) SSLEV(DISABLED)
SSLFIPS(NO)
SSLKEYR(/MQHA/T2MSBK02/data/qmgrs/T2MSBK02/ssl/key)
SSLRKEYC(0) STATACLS(QMGR)
STATCHL(HIGH) STATINT(1800)
STATMQI(ON) STATQ(ON)
STRSTPEV(ENABLED) SYNCPT
TREELIFE(1800) TRIGINT(999999999)
Back to top
View user's profile Send private message
exerk
PostPosted: Mon Dec 10, 2012 1:56 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

Nitgeek, please note that I've enclosed your code in 'Code' tags, and queue manager attributes in 'Quote' tags as it makes it easier to read.

Firstly, don't use SYSTEM.ADMIN.SVRCONN unless you are using it purely for administration purposes (and even then I prefer to use a differently-named channel as the above is pretty much a well known 'default' admin channel).

Secondly, what value are you using for the MCAUSER attribute in the SYSTEM.ADMIN.SVRCONN channel?

Lastly, what is giving the MQRC 2035 error, i.e. the CONN, the OPEN, or what? What do the queue manager logs state?

It helps us to help you if you are more explicit in your posts.
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
Nitgeek
PostPosted: Mon Dec 10, 2012 2:18 am    Post subject: MQ API program throwing error 2035 Reply with quote

Novice

Joined: 21 Feb 2012
Posts: 21

Thanks, exerk.

I'll take care of quoting from now on.


Quote:

Firstly, don't use SYSTEM.ADMIN.SVRCONN unless you are using it purely for administration purposes (and even then I prefer to use a differently-named channel as the above is pretty much a well known 'default' admin channel).


For PCF messages, can we use other SVRCONN channels?


Quote:
Secondly, what value are you using for the MCAUSER attribute in the SYSTEM.ADMIN.SVRCONN channel?



MCAUSER is "mqm".



Quote:
Lastly, what is giving the MQRC 2035 error, i.e. the CONN, the OPEN, or what?



I have mentioned in the question that I am able to put normal message. That means I am able to connect to queue manager, open the queue and put the message.

But when I try to get that message I am getting 2059 error response.

And when I send PCF message I get 2035 error.

This is the area of program I am getting the exception.

Code:
try{
       
               PCFMessage[] pcfResponse = pcfCM.agent.send(pcfCmd);
   
   
               for (int index = pcfResponse.length-1; index > 0; index--) {
             PCFMessage response = pcfResponse[index];
             String q=(String)response.getParameterValue(MQConstants.MQCA_Q_NAME);
           
             jComboBox3.addItem(q);

           }
Back to top
View user's profile Send private message
exerk
PostPosted: Mon Dec 10, 2012 2:46 am    Post subject: Re: MQ API program throwing error 2035 Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

Nitgeek wrote:
For PCF messages, can we use other SVRCONN channels?

You can create SVRCONN channels for specific purposes, i.e. to separate client applications from each other, and administrators; SYSTEM.ADMIN.SVRCONN is just a name, it could just as easily be something else.

Nitgeek wrote:
MCAUSER is "mqm".

So anyone connecting to that channel has full (and I mean full) control of your queue manager. How else have you locked it down, e.g. SSL?

Nitgeek wrote:
I have mentioned in the question that I am able to put normal message.

All messages are 'normal'...

Nitgeek wrote:
But when I try to get that message I am getting 2059 error response.

And when I send PCF message I get 2035 error.

So, non-PCF messages are OK when put to which queue? PCF messages are OK when put to which queue, but not OK when you try to get from which queue?

You might want to search the site and IBM's site for related errors/hits for your problem - I found quite a few.
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
Nitgeek
PostPosted: Mon Dec 10, 2012 3:29 am    Post subject: MQ API program throwing error 2035 Reply with quote

Novice

Joined: 21 Feb 2012
Posts: 21

exerk

For your reference, the channel properties:


Quote:
display channel(SYSTEM.ADMIN.SVRCONN) all
1 : display channel(SYSTEM.ADMIN.SVRCONN) all
AMQ8414: Display Channel details.
CHANNEL(SYSTEM.ADMIN.SVRCONN) CHLTYPE(SVRCONN)
ALTDATE(2012-05-21) ALTTIME(19.44.23)
COMPHDR(NONE) COMPMSG(NONE)
DESCR( ) HBINT(300)
KAINT(AUTO) MAXINST(999999999)
MAXINSTC(999999999) MAXMSGL(52428800)
MCAUSER(mqm) MONCHL(QMGR)
RCVDATA( ) RCVEXIT( )
SCYDATA( ) SCYEXIT( )
SENDDATA( ) SENDEXIT( )
SHARECNV(10) SSLCAUTH(REQUIRED)
SSLCIPH( ) SSLPEER( )
TRPTYPE(TCP)





Quote:

All messages are 'normal'


By normal message I meant, an object of MQMessage class.

Whereas a PCF message is an object of PCFMessage class which is completly different in properties from the "normal message".

I am not putting the PCF message to any queue.

I am enquiring the queue manager for all local queue names as you can see in the code.
Back to top
View user's profile Send private message
exerk
PostPosted: Mon Dec 10, 2012 3:45 am    Post subject: Re: MQ API program throwing error 2035 Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

Nitgeek wrote:
For your reference, the channel properties:

Quote:
display channel(SYSTEM.ADMIN.SVRCONN) all
1 : display channel(SYSTEM.ADMIN.SVRCONN) all
AMQ8414: Display Channel details.
CHANNEL(SYSTEM.ADMIN.SVRCONN) CHLTYPE(SVRCONN)
ALTDATE(2012-05-21) ALTTIME(19.44.23)
COMPHDR(NONE) COMPMSG(NONE)
DESCR( ) HBINT(300)
KAINT(AUTO) MAXINST(999999999)
MAXINSTC(999999999) MAXMSGL(52428800)
MCAUSER(mqm) MONCHL(QMGR)
RCVDATA( ) RCVEXIT( )
SCYDATA( ) SCYEXIT( )
SENDDATA( ) SENDEXIT( )
SHARECNV(10) SSLCAUTH(REQUIRED)
SSLCIPH( ) SSLPEER( )
TRPTYPE(TCP)

You have given the keys to the castle to all and sundry. Configurations like this have a bad tendency to develop into a habit - lock it, or lose it, especially in Dev/Test environments because if everyone can change something you will spend a lot of time chasing your tail.

Nitgeek wrote:
By normal message I meant, an object of MQMessage class.

Whereas a PCF message is an object of PCFMessage class which is completly different in properties from the "normal message".

Good, now we're getting a bit more specific.

Nitgeek wrote:
I am not putting the PCF message to any queue.

I am enquiring the queue manager for all local queue names as you can see in the code.

I'm no developer/programmer, but to get the results of PCF message requesting attributes of an object, you have to put a PCF message requesting it? (I'm desperately trying to remember what's in the supplied sample application which does this sort of thing, but I don't have access to an installation with them installed at the moment).
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Dec 10, 2012 9:32 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

As additional literature look for (retired) support pack MS0B.
However be aware that at this level of the product (7.0.1. you will also need to consult the infocenter and that the support pack is now part of the product (reason why it was retired).
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Security » MQ API program throwing error 2035
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.