Author |
Message
|
simple |
Posted: Wed Jan 20, 2016 10:03 pm Post subject: DetailedJMSSecurityException: JMSWMQ0026 |
|
|
Newbie
Joined: 20 Jan 2016 Posts: 7
|
Hi all, kindly please help.
My config:
WBS MQ Server 7.5.0.1 running on Redhat 64bit machine
Java JMS client using WBS MQ client 7.5.0.1 lib, running on another Redhat 64bit machine.
When the client tries to subscribe to a topic, got the following error:
12-01-2016 17:49:40 ERROR SystemLogger:62 - com.ibm.msg.client.jms.DetailedJMSSecurityException: JMSWMQ0026: Failed to subscribe to topic 'MyTopic/System/Internal' with selector 'none' using MQSUB.
There may have been a problem creating the subscription due to it being used by another message consumer.
Make sure any message consumers using this subscription are closed before trying to create a new subscription under the same name. Please see the linked exception for more information.
When the client tries to publish to the same topic, got the following error:
12-01-2016 17:44:01 ERROR SystemLogger:56 - com.ibm.msg.client.jms.DetailedJMSSecurityException: JMSWMQ2006: Failed to open MQ topic 'MyTopic/System/Internal'.
JMS attempted to perform an MQOPEN, but WebSphere MQ reported an error.
Use the linked exception to determine the cause of this error. Check that the specified topic and queue manager are defined correctly.
Any idea? Thanks. |
|
Back to top |
|
 |
simple |
Posted: Wed Jan 20, 2016 10:05 pm Post subject: |
|
|
Newbie
Joined: 20 Jan 2016 Posts: 7
|
Detailed Stack Trace:
When the client tries to subscribe to a topic:
12-01-2016 17:49:40 ERROR SystemLogger:62 - com.ibm.msg.client.jms.DetailedJMSSecurityException: JMSWMQ0026: Failed to subscribe to topic 'MyTopic/System/Internal' with selector 'none' using MQSUB.
There may have been a problem creating the subscription due to it being used by another message consumer.
Make sure any message consumers using this subscription are closed before trying to create a new subscription under the same name. Please see the linked exception for more information.
Stack Trace: [
com.ibm.msg.client.wmq.common.internal.Reason.reasonToException(Reason.java:531)
com.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:215)
com.ibm.msg.client.wmq.internal.WMQMessageConsumer.checkJmqiCallSuccess(WMQMessageConsumer.java:213)
com.ibm.msg.client.wmq.internal.WMQMessageConsumer.checkJmqiCallSuccess(WMQMessageConsumer.java:113)
com.ibm.msg.client.wmq.internal.WMQConsumerShadow.initialize(WMQConsumerShadow.java:1034)
com.ibm.msg.client.wmq.internal.WMQSyncConsumerShadow.initialize(WMQSyncConsumerShadow.java:134)
com.ibm.msg.client.wmq.internal.WMQMessageConsumer.<init>(WMQMessageConsumer.java:471)
com.ibm.msg.client.wmq.internal.WMQSession.createConsumer(WMQSession.java:877)
com.ibm.msg.client.jms.internal.JmsSessionImpl.createConsumer(JmsSessionImpl.java:993)
com.ibm.msg.client.jms.internal.JmsSessionImpl.createConsumer(JmsSessionImpl.java:1052)
com.ibm.mq.jms.MQSession.createConsumer(MQSession.java:439)
...
When the client tries to publish to the same topic:
12-01-2016 17:44:01 ERROR SystemLogger:56 - com.ibm.msg.client.jms.DetailedJMSSecurityException: JMSWMQ2006: Failed to open MQ topic 'MyTopic/System/Internal'.
JMS attempted to perform an MQOPEN, but WebSphere MQ reported an error.
Use the linked exception to determine the cause of this error. Check that the specified topic and queue manager are defined correctly.
Stack Trace: [
com.ibm.msg.client.wmq.common.internal.Reason.reasonToException(Reason.java:531)
com.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:215)
com.ibm.msg.client.wmq.internal.WMQMessageProducer.checkJmqiCallSuccess(WMQMessageProducer.java:1248)
com.ibm.msg.client.wmq.internal.WMQMessageProducer.checkJmqiCallSuccess(WMQMessageProducer.java:1205)
com.ibm.msg.client.wmq.internal.WMQMessageProducer.access$800(WMQMessageProducer.java:75)
com.ibm.msg.client.wmq.internal.WMQMessageProducer$SpiIdentifiedProducerShadow.initialise(WMQMessageProducer.java:801)
com.ibm.msg.client.wmq.internal.WMQMessageProducer.<init>(WMQMessageProducer.java:1181)
com.ibm.msg.client.wmq.internal.WMQSession.createProducer(WMQSession.java:1077)
com.ibm.msg.client.jms.internal.JmsSessionImpl.createProducer(JmsSessionImpl.java:1465)
com.ibm.mq.jms.MQSession.createProducer(MQSession.java:661)
......
We have another program works fine with MQ queue. |
|
Back to top |
|
 |
simple |
Posted: Thu Jan 21, 2016 1:32 am Post subject: |
|
|
Newbie
Joined: 20 Jan 2016 Posts: 7
|
We checked Pub/sub status of the queue manger, it is enabled.
DISPLAY PUBSUB STATUS
AMQ8723: Display pub/sub status details.
QMNAME(TEST_QM) STATUS(ACTIVE) |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Jan 21, 2016 5:08 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Your stack trace is not worth the space its printed on.
You do not display the reason code, you do not display the linked exception.
When receiving a JMSException, always look for the linked Exception. It may be null and that's ok. However if it is populated, it will contain the provider's information, in this case (MQ) that would be the reason code that will tell us what is happening.
As for the subscription, remember that each subscriber should have its own and distinct user identifier (attribute of the connection factory)...
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Vitor |
Posted: Thu Jan 21, 2016 5:15 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
simple wrote: |
There may have been a problem creating the subscription due to it being used by another message consumer.
Make sure any message consumers using this subscription are closed before trying to create a new subscription under the same name. Please see the linked exception for more information.
...
Use the linked exception to determine the cause of this error. Check that the specified topic and queue manager are defined correctly. |
Have you read and followed any of the advice given in the error message?
simple wrote: |
We have another program works fine with MQ queue. |
Which proves what, and is relevant how to this problem? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
simple |
Posted: Thu Jan 21, 2016 7:47 pm Post subject: |
|
|
Newbie
Joined: 20 Jan 2016 Posts: 7
|
Vitor wrote: |
Have you read and followed any of the advice given in the error message? |
Tried to follow but feel that the error message given is somewhat misleading. For example, if I disable "Pub/Sub" on the queue manager, the program gives me the same message: "There may have been a problem creating the subscription due to it being used by another message consumer."
The topic was newly created and we encountered this problem when first time run the program. So quite sure that no one else is using this topic.
Vitor wrote: |
simple wrote: |
We have another program works fine with MQ queue. |
Which proves what, and is relevant how to this problem? |
What I want to say here is that, program works fine with queue under the same queue manager. Sorry for confusion caused.
Thanks. |
|
Back to top |
|
 |
simple |
Posted: Fri Jan 22, 2016 1:03 am Post subject: |
|
|
Newbie
Joined: 20 Jan 2016 Posts: 7
|
fjb_saper wrote: |
Your stack trace is not worth the space its printed on.
You do not display the reason code, you do not display the linked exception.
When receiving a JMSException, always look for the linked Exception. It may be null and that's ok. However if it is populated, it will contain the provider's information, in this case (MQ) that would be the reason code that will tell us what is happening.
As for the subscription, remember that each subscriber should have its own and distinct user identifier (attribute of the connection factory)...
Have fun  |
Many many thanks for pointing it out. As what my title tells, I am a newbie.
Following your advice, we printed more info about the captured exception in log file. You know what, it did give us some clues of what happened.
Problem finally solved. The newly created user has not been authorized to pub/sub on 'SYSTEM.BASE.TOPIC'.
 |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Jan 22, 2016 5:22 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Happy you solved it. I guess you had a 2035 as a reason code, and the detail for that exception was to be found in the MQ Error logs.
Thanks for the update.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
PeterPotkay |
Posted: Fri Jan 22, 2016 4:31 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
You should not authorize users to the SYSTEM.BASE.TOPIC.
Create a new topic object that represents this topic tree, and authorize only the people that need access to this tree only to this topic object. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
simple |
Posted: Sun Jan 24, 2016 5:48 pm Post subject: |
|
|
Newbie
Joined: 20 Jan 2016 Posts: 7
|
yes, exactly.
fjb_saper wrote: |
Happy you solved it. I guess you had a 2035 as a reason code, and the detail for that exception was to be found in the MQ Error logs.
Thanks for the update.  |
|
|
Back to top |
|
 |
simple |
Posted: Sun Jan 24, 2016 5:52 pm Post subject: |
|
|
Newbie
Joined: 20 Jan 2016 Posts: 7
|
very helpful !
Thanks.
PeterPotkay wrote: |
You should not authorize users to the SYSTEM.BASE.TOPIC.
Create a new topic object that represents this topic tree, and authorize only the people that need access to this tree only to this topic object. |
|
|
Back to top |
|
 |
|