Author |
Message
|
AlphaOmega |
Posted: Tue Nov 14, 2006 7:40 am Post subject: 2035 Error Using IVTRun And JMS In Client Mode |
|
|
Newbie
Joined: 05 May 2006 Posts: 9
|
Hello:
I have set up a local queue and a remote queue definition on an MQ server, and am trying to access them using JMS in client mode. Now I am able to access and do an MQPUT on the remote queue definition, but when attempting to access the local queue in order to create a "queue receiver" object for it, I get a 2035, not authorized, when attempting to open it.
Here are the authorizations:
setmqaut -m QUEUEMGR -t qmgr -g accnt +connect +setall +inq
setmqaut -m QUEUEMGR -n REMOTE.QUEUE -t queue -p accnt +put +setall
setmqaut -m QUEUEMGR -n LOCAL.QUEUE -t queue -p accnt +get +setall
The parameters for IVTRUN:
host: QUEUEMGR.DNSNAME.COM
queue manager: QUEUEMGR
channel: QUEUEMGR.APPLICATION
username: accnt
password: null
queue: LOCAL.QUEUE
This is the exception received:
javax.jms.JMSSecurityException: MQJMS2008: failed to open MQ queue
at com.ibm.mq.jms.MQQueueServices.getQueueOpenException(MQQueueServices.java:423)
at com.ibm.mq.jms.JMSServicesMgr.getQueueOpenException(JMSServicesMgr.java:120)
at com.ibm.mq.jms.MQSession.createQReceiver(MQSession.java:6046)
at com.ibm.mq.jms.MQQueueSession.createReceiver(MQQueueSession.java:276)
at com.ibm.mq.jms.MQQueueSession.createReceiver(MQQueueSession.java:254)
at com.wspan.xmlota.IHG.webservice.OTAHotelResNotifImpl.main(OTAHotelResNotifImpl.java:466)
This is the linked exception I see when I step into the code and trap it when it throws the exception:
com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2035
I'm able to open REMOTE.QUEUE and put a message to it using all the same information mentioned above.
Can anyone explain the error and provide a resolution? Thank you. |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Nov 14, 2006 7:43 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Add +inq and +dsp to QUEUE.LOCAL _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
AlphaOmega |
Posted: Tue Nov 14, 2006 8:31 am Post subject: +inq and +dsp to On Local Queues |
|
|
Newbie
Joined: 05 May 2006 Posts: 9
|
Do I need +inq and +dsp on the remote queue definitions as well? |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Nov 14, 2006 2:58 pm Post subject: Re: +inq and +dsp to On Local Queues |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
AlphaOmega wrote: |
Do I need +inq and +dsp on the remote queue definitions as well? |
Don't know but JMS has a tendency to dislike it when inq is missing...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Nov 14, 2006 3:11 pm Post subject: Re: +inq and +dsp to On Local Queues |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
fjb_saper wrote: |
AlphaOmega wrote: |
Do I need +inq and +dsp on the remote queue definitions as well? |
Don't know but JMS has a tendency to dislike it when inq is missing...  |
I'd see it more as that JMS has a tendancy to try and Inquire in far more situations than are strictly necessary....  _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
AlphaOmega |
Posted: Tue Nov 14, 2006 4:10 pm Post subject: Unfortunately It Did Not Work; Received The Same Error |
|
|
Newbie
Joined: 05 May 2006 Posts: 9
|
This is the main method of the class that I'm using to test mq
connectivity from my Windows JMS client to the AIX MQ server.
public static void main(String[] args) {
try {
MQQueueConnectionFactory m_factory = new MQQueueConnectionFactory();
m_factory.setTransportType(JMSC.MQJMS_TP_CLIENT_MQ_TCPIP);
m_factory.setHostName("QUEUEMGR.DNSNAME.COM ");
m_factory.setQueueManager("QUEUEMGR");
m_factory.setChannel("QUEUEMGR.APPLICATION ");
QueueConnection m_connection = m_factory.createQueueConnection("accnt",
null);
QueueSession m_session = m_connection.createQueueSession(false,
Session.AUTO_ACKNOWLEDGE);
Queue m_RequestQ = m_session.createQueue("LOCAL.QUEUE");
Queue m_ResponseQ = m_session.createQueue("REMOTE.QUEUE");
QueueReceiver m_queueReceiver = m_session.createReceiver(m_RequestQ);
QueueSender m_queueSender = m_session.createSender(m_ResponseQ);
m_connection.start();
TextMessage tm = m_session.createTextMessage();
tm.setText("TESTING 1 2 3");
m_queueSender.send(tm);
System.out.println("SUCCESS!!");
}
catch (JMSException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
} |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Nov 14, 2006 4:25 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
There's nothing wrong with your code.
This is a permissions issue.
You need to set the permissions like this for the local queue (receive):
Code: |
setmqaut -m QUEUEMGR -n LOCAL.QUEUE -t queue -p accnt +get +setall +inq +disp |
I usually use this and subtract whatever permissions I want to remove:
Code: |
setmqaut -m QUEUEMGR -n LOCAL.QUEUE -t queue -g group +allmqi |
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
AlphaOmega |
Posted: Wed Nov 15, 2006 8:05 am Post subject: ALLMQI Worked, Thanks! |
|
|
Newbie
Joined: 05 May 2006 Posts: 9
|
|
Back to top |
|
 |
tof.1976 |
Posted: Mon Dec 04, 2006 5:43 am Post subject: same security/authority issue with Hermes |
|
|
Newbie
Joined: 04 Dec 2006 Posts: 1
|
Hello
I think I have a similar issue here.
I am using Hermes JMS on a WinXP desktop to access Websphere MQ 6.0(fix pack included) QManagers on on AIX/HPUX servers.
PCF Command server is running for the Qmanagers involved.
Desktop JVM is SUN JRE 1.5.
I managed to discover all queues on my queueManager but any other operation ends up in '2035' not authorized , along with JMS exceptions :
MQJMS2013 : provided authentication is not valid
MQJE001 : MQException completion code 2 reason code 2035
MQJE036 : QueueManager rejected the connection request
I did the setmqaut commands with allmqi privileges to queue manager and all queues, but still the same 2035 return code...
any ideas of where else i could check ? |
|
Back to top |
|
 |
|