|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
Help needed: amqsailq |
« View previous topic :: View next topic » |
Author |
Message
|
ktg |
Posted: Wed Jan 18, 2006 11:34 pm Post subject: Help needed: amqsailq |
|
|
Centurion
Joined: 09 Jan 2006 Posts: 138 Location: India
|
Why I am getting this error?
Call to get queue attributes failed: Completion Code = 1 : Reason = 3008
Error returned by the command server: Completion Code = 0 : Reason = 0
It is not logging any thing to AMQERROR log file.
I am running as non mqm user on solaris.
what are authorisations needed to execute the binary?
Thanks in advance,
hvk |
|
Back to top |
|
 |
wschutz |
Posted: Thu Jan 19, 2006 3:09 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
I'd start by running it from a user that is in the "mqm" group.
(if you add a user to the mqm group, make sure you "refresh security" before trying again) _________________ -wayne |
|
Back to top |
|
 |
mvic |
Posted: Thu Jan 19, 2006 3:22 am Post subject: Re: Help needed: amqsailq |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
User wrote: |
Why I am getting this error?
...
Reason = 3008
...
what are authorisations needed to execute the binary? |
3008 0x00000bc0 MQRCCF_COMMAND_FAILED
I don't understand why 3008 is thought to be an authorization error. If you need to run this app as a non-mqm user, then I would recommend continuing to develop as a non-mqm user. Look into what 3008 is, and the MQI call it is coming out of, and inspect the inputs to that MQI call, in case they are in error. The source (amqsailq.c) is published, from what I can see, so this can be inspected. |
|
Back to top |
|
 |
ktg |
Posted: Thu Jan 19, 2006 3:23 am Post subject: problem not yet solved |
|
|
Centurion
Joined: 09 Jan 2006 Posts: 138 Location: India
|
After i add the user id to mqm group and refreshed security of queue manager, amqsailq works fine. What should I do for a user id which does not belong to mqm group?  |
|
Back to top |
|
 |
ktg |
Posted: Thu Jan 19, 2006 3:35 am Post subject: Re: Help needed: amqsailq |
|
|
Centurion
Joined: 09 Jan 2006 Posts: 138 Location: India
|
[quote="mvic"]
User wrote: |
I don't understand why 3008 is thought to be an authorization error. If you need to run this app as a non-mqm user, then I would recommend continuing to develop as a non-mqm user. Look into what 3008 is, and the MQI call it is coming out of, and inspect the inputs to that MQI call, in case they are in error. The source (amqsailq.c) is published, from what I can see, so this can be inspected. |
If i run as mqm or user id belongs to mqm, it works fine.... so I thought like that. The above said problem(Error returned by the command server: Completion Code = 0 : Reason = 0 ) is with mq 5.3 on solaris.
but on MQV6 on solaris, though i have given all authorities i am getting
Quote: |
$
Display current depths of local queues
Call to get queue attributes failed: Completion Code = 1 : Reason = 3008
Error returned by the command server: Completion Code = 2 : Reason = 2035
$
|
The setmqaut command on both MQV5.3 and MQV6 ( queue manager name is different)
Quote: |
$ setmqaut -m MQTKQMGR -t q -n '**' -p kal +all +allmqi +alladm
The setmqaut command completed successfully.
$ setmqaut -m MQTKQMGR -t qmgr -p kal +all +allmqi +alladm
The setmqaut command completed successfully.
|
|
|
Back to top |
|
 |
wschutz |
Posted: Thu Jan 19, 2006 3:42 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
I think it will only run from a "mqm" user. It does an inquire on all queues, and you are not allowed to inquire on SYSTEM.AUTH.DATA.QUEUE unless you are in the mqm group.
See discussion here: http://www.mqseries.net/phpBB2/viewtopic.php?t=24279. _________________ -wayne |
|
Back to top |
|
 |
ktg |
Posted: Fri Jan 20, 2006 12:49 am Post subject: |
|
|
Centurion
Joined: 09 Jan 2006 Posts: 138 Location: India
|
I saw the link....actually, we have programs with MQAI and are working fine with MQV5.3. for non mqm users...... So, I have posted new topic regarding this:
(http://www.mqseries.net/phpBB2/viewtopic.php?t=26670) |
|
Back to top |
|
 |
Yogesh |
Posted: Fri Jan 20, 2006 1:44 am Post subject: Non MQM user |
|
|
Newbie
Joined: 26 Dec 2005 Posts: 8
|
Hi,
I dont know for solaris, but for HP-UX v5.3 non mqm users can execute an application by setting MCA user field in SVRCONN for client server communication. |
|
Back to top |
|
 |
ktg |
Posted: Fri Jan 20, 2006 2:18 am Post subject: Re: Non MQM user |
|
|
Centurion
Joined: 09 Jan 2006 Posts: 138 Location: India
|
Yogesh wrote: |
Hi,
I dont know for solaris, but for HP-UX v5.3 non mqm users can execute an application by setting MCA user field in SVRCONN for client server communication. |
but what to do for server utilities?.... if mca user of SVRCONN is set to a user id which does not belongs to mqm group, problem arises. Though, mca user id have all the authorities. |
|
Back to top |
|
 |
ktg |
Posted: Fri Jan 20, 2006 2:28 am Post subject: |
|
|
Centurion
Joined: 09 Jan 2006 Posts: 138 Location: India
|
As in both MQV5.3 and MQV6 "Nobody, absolutely nobody is allowed access to SYSTEM.AUTH.DATA.QUEUE except for mqm" , (but) MQAI calls will work with MQV5.3, and the same calls won't work with MQV6 so, can i conclude that
user ids which does not belong to mqm group can not use MQAI at all? (difficult to belive!!!!!!) |
|
Back to top |
|
 |
wschutz |
Posted: Fri Jan 20, 2006 4:07 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
Quote: |
So, I have posted new topic regarding this:
(http://www.mqseries.net/phpBB2/viewtopic.php?t=26670) |
Please don't, can I ask you to delete that new thread?
Quote: |
so, can i conclude that
user ids which does not belong to mqm group can not use MQAI at all? ( |
You should be able to use MQAI to query a single queue or a group of queues that don't include SYSTEM.AUTH.DATA.QUEUE, and even create / alter / delete those provided you have the right OAM authorization. _________________ -wayne |
|
Back to top |
|
 |
ktg |
Posted: Fri Jan 20, 2006 5:04 am Post subject: |
|
|
Centurion
Joined: 09 Jan 2006 Posts: 138 Location: India
|
wschutz wrote: |
Quote: |
So, I have posted new topic regarding this:
(http://www.mqseries.net/phpBB2/viewtopic.php?t=26670) |
Please don't, can I ask you to delete that new thread?
Quote: |
so, can i conclude that
user ids which does not belong to mqm group can not use MQAI at all? ( |
You should be able to use MQAI to query a single queue or a group of queues that don't include SYSTEM.AUTH.DATA.QUEUE, and even create / alter / delete those provided you have the right OAM authorization. |
Thanks for the reply. I deleted the thread. I got the point. We have a program to get number of queues in the queue manager. For that we were using MQAI. Now we need find alternative way for that. thanks again....
Code snippet:
Quote: |
mqCreateBag( MQCBO_ADMIN_BAG, &m_hAdminBag, &m_nCC, &m_nRC );
if (m_nCC == MQCC_FAILED)
{
printf("mqCreateBag m_nCC %d Reason %d", m_nCC, m_nRC );
exit( (int)m_nCC);
}
/* Create a Response bag */
mqCreateBag( MQCBO_ADMIN_BAG, &m_hResponseBag, &m_nCC, &m_nRC );
if (m_nCC == MQCC_FAILED)
{
printf("mqCreateBag m_nCC %d Reason %d", m_nCC, m_nRC );
exit( (int)m_nCC);
}
mqAddString( m_hAdminBag, MQCA_Q_NAME, MQBL_NULL_TERMINATED,
( char * ) "*", &m_nCC, &m_nRC );
if (m_nCC == MQCC_FAILED)
{
printf("mqAddString m_nCC %d Reason %d", m_nCC, m_nRC );
exit( m_nCC);
}
mqAddInteger( m_hAdminBag, MQIA_Q_TYPE, MQQT_LOCAL, &m_nCC, &m_nRC );
if (m_nCC == MQCC_FAILED)
{
printf("mqAddString m_nCC %d Reason %d", m_nCC, m_nRC );
exit( m_nCC);
}
mqExecute( m_pConn, MQCMD_INQUIRE_Q_NAMES, MQHB_NONE,
m_hAdminBag, m_hResponseBag, MQHO_NONE, MQHO_NONE, &m_nCC,
&m_nRC );
if (m_nCC == MQCC_FAILED)
{
printf("mqExecute m_nCC %d Reason %d \n", m_nCC, m_nRC );
if( m_nRC == MQRCCF_COMMAND_FAILED )
{
mqInquireBag( m_hResponseBag, MQHA_BAG_HANDLE, 0,
&m_hErrorBag, &m_nCC, &m_nRC );
/* Check for the Error, if fail return from here */
mqInquireInteger( m_hErrorBag, MQIASY_COMP_CODE, MQIND_NONE,
&m_nExecuteCC, &m_nCC, &m_nRC );
/* Check for the Error, if fail return from here */
mqInquireInteger( m_hErrorBag, MQIASY_REASON, MQIND_NONE,
&m_nExecuteRC, &m_nCC, &m_nRC );
m_nCC = m_nExecuteCC;
m_nRC = m_nExecuteRC;
}
printf("Command server m_nCC %d Reason %d", m_nCC, m_nRC );
exit( m_nCC);
}
if( MQCC_OK == m_nCC ) {
/* Read from response bag */
mqInquireBag( m_hResponseBag, MQHA_BAG_HANDLE, 0, &m_hAttrsBag, &m_nCC,
&m_nRC );
if (m_nCC == MQCC_FAILED)
{
printf("mqInquireBag m_nCC %d Reason %d", m_nCC, m_nRC );
exit( m_nCC);
}
/* Get the no.of items */
mqCountItems( m_hAttrsBag, MQSEL_ALL_USER_SELECTORS, &m_nNumberBags,
&m_nCC, &m_nRC );
/* Check for the Error, if fail return from here */
if (m_nCC == MQCC_FAILED)
{
printf("mqInquireBag m_nCC %d Reason %d", m_nCC, m_nRC );
exit( m_nCC);
}
else {
if( m_nRC == MQRCCF_COMMAND_FAILED )
{
mqInquireBag( m_hResponseBag, MQHA_BAG_HANDLE, 0,
&m_hErrorBag, &m_nCC, &m_nRC );
printf("\n!!!before %d %d", m_nExecuteRC, m_nExecuteCC );
mqInquireInteger( m_hErrorBag, MQIASY_COMP_CODE, MQIND_NONE,
&m_nExecuteCC, &m_nCC, &m_nRC );
mqInquireInteger( m_hErrorBag, MQIASY_REASON, MQIND_NONE,
&m_nExecuteRC, &m_nCC, &m_nRC );
printf("\n!!!after %d %d", m_nExecuteRC, m_nExecuteCC );
m_nCC = m_nExecuteCC;
m_nRC = m_nExecuteRC;
}
printf (" \n!!! number of items %d !!! \n", m_nNumberBags);
}
} |
|
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Jan 20, 2006 7:58 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I guess I don't understand why it's important to programatically determine the number of queues on a queue manager. Hopefully it doesn't change that often, except in properly managed ways.
Also, I can't imagine what good this number is on it's own.
Your other choices aside from MQAI are PCF, runmqsc, and counting folders in the mq filesystems. None of these work on z/OS at the v5.3 level, only PCF works on z/OS qms at the v6 level. And OS/400 is an entirely different beast as well. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
ktg |
Posted: Sun Jan 22, 2006 9:34 pm Post subject: |
|
|
Centurion
Joined: 09 Jan 2006 Posts: 138 Location: India
|
jefflowrey wrote: |
I guess I don't understand why it's important to programatically determine the number of queues on a queue manager. Hopefully it doesn't change that often, except in properly managed ways.
Also, I can't imagine what good this number is on it's own.
Your other choices aside from MQAI are PCF, runmqsc, and counting folders in the mq filesystems. None of these work on z/OS at the v5.3 level, only PCF works on z/OS qms at the v6 level. And OS/400 is an entirely different beast as well. |
We have some programs to assist developers in testing..... The application will perform required action on specified queues....as the applications are supporting wild cards for queue names, similar to runmqsc prompt, we need to construct a list of queues before processing queues specified by user. So, we need this information. |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Jan 23, 2006 5:01 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You need a list of queue names.
That's completely different than needing to know the number of queues on a queue manager.
There are many reasons why one might need a list of queue names.
I can't think of any good reasons why one would need to know the number of queues. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|
|
 |
Goto page 1, 2 Next |
Page 1 of 2 |
|
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
|
|
|
|