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 » Broker command failed:MQRCCF_NOT_AUTHORIZED Reason code 3081

Post new topic  Reply to topic
 Broker command failed:MQRCCF_NOT_AUTHORIZED Reason code 3081 « View previous topic :: View next topic » 
Author Message
vopros
PostPosted: Mon Aug 22, 2005 6:30 am    Post subject: Broker command failed:MQRCCF_NOT_AUTHORIZED Reason code 3081 Reply with quote

Newbie

Joined: 12 Aug 2005
Posts: 7

Hi everybody,
I've already asked for help here http://www.mqseries.net/phpBB2/viewtopic.php?t=23723 , but got no solution.
Now I have developed a little java-program, that connects to MQ, publishes a message and then subscribes. Here is code:
Code:
        MQTopicConnectionFactory tcf = new MQTopicConnectionFactory();
        tcf.setTransportType(JMSC.MQJMS_TP_CLIENT_MQ_TCPIP);
        tcf.setQueueManager("xxxxx");
        tcf.setHostName("xxxxx");
        tcf.setPort(1415);
        tcf.setChannel("WAS.JMS.SVRCONN");
        Connection conn = tcf.createConnection();
        TopicSession sess = (TopicSession)conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
        Topic topic = sess.createTopic("com.xxxxx.ClusterTopic");

        TopicPublisher publisher = sess.createPublisher(topic);
        JMSTextMessage msg = (JMSTextMessage)sess.createTextMessage("Hello world!");
        publisher.publish(msg);

        TopicSubscriber subscriber = sess.createSubscriber(topic); // Exception in this line :(

I'm using Ma0C broker from SupportPac.
First of all, I'm surprised that I'm not asked of user/password or so. When i execute this code, publisher is successfully created and sends the message with no exception (to broker, message doesn't appear in WebSphere MQ Message Browser). Exception is thrown when subscriber is to be created (last line of listing). Here is exception:
Code:
com.ibm.mq.jms.BrokerCommandFailedException: Broker command failed: MQRCCF_NOT_AUTHORIZED Reason code 3081
   at com.ibm.mq.jms.MQBrokerSubscriptionEngine.openSubscription(MQBrokerSubscriptionEngine.java:348)
   at com.ibm.mq.jms.MQMigrateSubscriptionEngine.openSubscription(MQMigrateSubscriptionEngine.java:197)
   at com.ibm.mq.jms.MQSession.createTSubscriber(MQSession.java:4580)
   at com.ibm.mq.jms.MQTopicSession.createSubscriber(MQTopicSession.java:780)
   at Test2.tcfTest(Test2.java:47)

Broker is running on the server with sysadm as profile. sysadm is member of mqm and mqmbrkrs groups. (does sysadm in this case really need to be member of mqmbrkrs group?)
So I'm confused. Please anybody help me!
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Aug 22, 2005 6:45 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

If there isn't a registered subscriber for a topic (and a few other things), then broker will not publish a real message.

So try creating your subscriber first and see what happens.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Otvet
PostPosted: Mon Aug 22, 2005 6:46 am    Post subject: Hui tebe a ne otvet Reply with quote

Newbie

Joined: 22 Aug 2005
Posts: 1

[/url]
Back to top
View user's profile Send private message
vopros
PostPosted: Mon Aug 22, 2005 7:00 am    Post subject: Reply with quote

Newbie

Joined: 12 Aug 2005
Posts: 7

jefflowrey,
But I cannot create a subscriber because I'm getting MQRCCF_NOT_AUTHORIZED error
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Aug 22, 2005 7:12 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

vopros wrote:
jefflowrey,
But I cannot create a subscriber because I'm getting MQRCCF_NOT_AUTHORIZED error


Do you *still* get that if you try to create the subscriber *first*?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
vopros
PostPosted: Mon Aug 22, 2005 7:19 am    Post subject: Reply with quote

Newbie

Joined: 12 Aug 2005
Posts: 7

jefflowrey wrote:
Do you *still* get that if you try to create the subscriber *first*?

Yes, exception is thrown even if I try to create the subscriber first.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Aug 22, 2005 7:35 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Try explicitly giving the user the necessary rights to the SYSTEM.BROKER.DEFAULT.STREAM queue.

Also try
Code:
echo "refresh security"|runmqsc

_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
jsware
PostPosted: Wed Dec 21, 2005 5:13 am    Post subject: Reply with quote

Chevalier

Joined: 17 May 2001
Posts: 455

I had this response too when the PubSub broker was on a different machine that my JMS subscriber.

What I found was that if you try to register a subscription using JMS, the broker checks that the user ID you are using to register the subscription has the necessary authority to send a message. Thus for me I have missed allowing the subscriber's user ID authority to put messages onto the xmitq from the broker qmgr to my local qmgr hosting the JMS subscriber.

Thus I would guess that you need to check that the JMS subscriber application's user ID has authority to PUT messages onto the subscription queue (e.g. SYSTEM.JMS.ND.SUBSCRIBER.QUEUE) even though you only expect to get messages from it. It seems that the broker attempts to put the message using your subscriber user ID as alternative authority.
_________________
Regards
John
The pain of low quaility far outlasts the joy of low price.
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 » Broker command failed:MQRCCF_NOT_AUTHORIZED Reason code 3081
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.