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 » MQRC_NOT_AUTHORIZED error for PUB/SUB in MB 7 with MQ 7

Post new topic  Reply to topic
 MQRC_NOT_AUTHORIZED error for PUB/SUB in MB 7 with MQ 7 « View previous topic :: View next topic » 
Author Message
nhcaccenture
PostPosted: Mon Jun 25, 2012 3:35 pm    Post subject: MQRC_NOT_AUTHORIZED error for PUB/SUB in MB 7 with MQ 7 Reply with quote

Newbie

Joined: 25 Jun 2012
Posts: 3

I am trying to create a topic by sending PCF message from messsage broker to WMQ. I have done below to accomplish this. I am testing the message flow with test message <tst>test</tst>. Flow completes with out any exceptions but I do not see any topic in MQ Explorer. And I am getting MQRC_NOT_AUTHORIZED error in SYSTEM.DEAD.LETTER.QUEUE. Any help would be greatly appreaciated. I can create the topic using MQExplorere. Why can't I create using Message Broker flow. I have also tried changing the MCA user to SYSTEM.BKR.CONFIG channel. That did not work either.

I have created a flow with MQINPUT--> Compute-->MQOutput-->MQREPLY.
I have set queue name as ‘SYSTEM.ADMIN.COMMAND.QUEUE’ for node MQ Output node.
Below is the code for compute node.


CREATE COMPUTE MODULE CreateTopicFlow_Compute
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
CALL CopyEntireMessage();

-- PCF header is following the MQMD header.
SET OutputRoot.MQMD.MsgType = MQMT_REQUEST;
SET OutputRoot.MQMD.Format = MQFMT_ADMIN;
SET OutputRoot.MQMD.ReplyToQ = 'REP_Q';
SET OutputRoot.MQMD.MsgSeqNumber = 1;
SET OutputRoot.MQMD.Encoding = 546;

--CREATE FIELD OutputRoot.MQPCF;
CREATE NEXTSIBLING OF OutputRoot.MQMD DOMAIN 'MQADMIN' NAME 'MQPCF';
DECLARE refRequest REFERENCE TO OutputRoot.MQPCF;
SET refRequest.Type = MQCFT_COMMAND;
SET refRequest.StrucLength = MQCFH_STRUC_LENGTH;
SET refRequest.Version = MQCFH_CURRENT_VERSION;
SET refRequest.Command = 172; --MQCMD_CREATE_TOPIC
SET refRequest.MsgSeqNumber = 1;
SET refRequest.Control = MQCFC_LAST;




--First parameter: Topic Name.
SET refRequest.Parameter[1] = 2092; --MQCA_TOPIC_NAME
SET refRequest.Parameter[1].* = 'PCFTestTopic1';


-- Second parameter: Topic name length.
SET refRequest.Parameter[2] = 48; --MQ_TOPIC_NAME_LENGTH
SET refRequest.Parameter[2].* = '100';

-- Third parameter: Topic String.
SET refRequest.Parameter[3] = 2094; --MQCA_TOPIC_STRING
SET refRequest.Parameter[3].* = 'PCFTestTopic1String';

SET OutputRoot.BLOB.BLOB = asbitstream(OutputRoot.MQPCF);
SET OutputRoot.MQPCF = null;
RETURN TRUE;
END;

CREATE PROCEDURE CopyMessageHeaders() BEGIN
DECLARE I INTEGER 1;
DECLARE J INTEGER;
SET J = CARDINALITY(InputRoot.*[]);
WHILE I < J DO
SET OutputRoot.*[I] = InputRoot.*[I];
SET I = I + 1;
END WHILE;
END;

CREATE PROCEDURE CopyEntireMessage() BEGIN
SET OutputRoot = InputRoot;
END;
END MODULE;
Back to top
View user's profile Send private message
bruce2359
PostPosted: Mon Jun 25, 2012 3:39 pm    Post subject: Re: MQRC_NOT_AUTHORIZED error for PUB/SUB in MB 7 with MQ 7 Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9469
Location: US: west coast, almost. Otherwise, enroute.

nhcaccenture wrote:
And I am getting MQRC_NOT_AUTHORIZED error in SYSTEM.DEAD.LETTER.QUEUE.

Two fundamental WMQ questions for you to research:
1) why would any message end up going to a dead letter queue?
2) what authority would be required to access a queue - including the dead letter queue?
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
nhcaccenture
PostPosted: Mon Jun 25, 2012 11:09 pm    Post subject: Reply with quote

Newbie

Joined: 25 Jun 2012
Posts: 3

I forgot to mention that both WMB 7.0 and WMQ 7.0 are in the same windows 7 system. I am logging in with domain\userid into this system and this particular domain\userid is listed in the mqm group. All users in mqm group have rights to acces all Queues, topics and other objects of WMQ. And for your first point, the mesage is ending in dead letter queue is just because I have not mentioned back out queue for my input queue.
Back to top
View user's profile Send private message
nhcaccenture
PostPosted: Mon Jun 25, 2012 11:58 pm    Post subject: Reply with quote

Newbie

Joined: 25 Jun 2012
Posts: 3

I really wonder if WMB is using SYSTEM>BROKER>CONFIG channel to communicate to WMQ or not. No matter if I leave MCA user empty or any other user id in mqm group, the fllow is still giving me the same error. How can I know what user id and channel that WMB is using to communicate to WMQ. I have tried creating the flow to use psc command like SET OutputRoot.MQRFH2.psc.Command = 'RegSub' as in link http://harishonsoa.blogspot.com/2011/12/publisher-subscriber-in-wmb-70.html . Even this is also giving me the same error. Now I am out of all ideas that I can try. I am very new to WMB/WMQ. I might be doing something fundamentally wrong too. Any help is greatly appreciated.
Back to top
View user's profile Send private message
exerk
PostPosted: Tue Jun 26, 2012 12:10 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

I wonder if Accenture as an organisation are happy for the world to see their name as part of someones moniker? You might want to think about anonymising yourself a bit more

As you are new to both WMQ and WMB is there no one within your (large) organisation that can help or mentor you?
_________________
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
mqjeff
PostPosted: Tue Jun 26, 2012 1:52 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Message Broker Runtime uses bindings connections to talk to broker queue managers.

Message Broker Toolkit and Message Broker Explorer use client connections to talk to broker queue managers.
Back to top
View user's profile Send private message
sebastia
PostPosted: Fri Mar 21, 2014 12:48 am    Post subject: Reply with quote

Grand Master

Joined: 07 Oct 2004
Posts: 1003

mr nhcaccenture - why are you using numeric values and not their names in your code ?

Code:
SET refRequest.Command = 172; --MQCMD_CREATE_TOPIC
SET refRequest.Parameter[1] = 2092; --MQCA_TOPIC_NAME
SET refRequest.Parameter[2] = 48; --MQ_TOPIC_NAME_LENGTH
SET refRequest.Parameter[3] = 2094; --MQCA_TOPIC_STRING


I am having problems using names ... see

>>> http://www.mqseries.net/phpBB2/viewtopic.php?p=372678#372678
Back to top
View user's profile Send private message Visit poster's website
zpat
PostPosted: Fri Mar 21, 2014 3:49 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

Running BlockIP2 in a simple logging mode is the easier way to see what is connecting.

Use parms like these

Code:
LogPath=/var/mqm/exits64;
LogFormat=N;
LogCount=8;
BlockMqmUsers=N;
AllowBlankUserID=Y;
LogFileName=ALL_LOG-;

_________________
Well, I don't think there is any question about it. It can only be attributable to human error. This sort of thing has cropped up before, and it has always been due to human error.
Back to top
View user's profile Send private message
sebastia
PostPosted: Fri Mar 21, 2014 4:26 am    Post subject: Reply with quote

Grand Master

Joined: 07 Oct 2004
Posts: 1003

I dont understand how BlockIP2 is related to MB constants ....
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Security » MQRC_NOT_AUTHORIZED error for PUB/SUB in MB 7 with MQ 7
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.