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 » MQJMS2005 - User error connecting remotely to MQ

Post new topic  Reply to topic Goto page 1, 2  Next
 MQJMS2005 - User error connecting remotely to MQ « View previous topic :: View next topic » 
Author Message
rmh
PostPosted: Mon Mar 03, 2008 5:50 am    Post subject: MQJMS2005 - User error connecting remotely to MQ Reply with quote

Newbie

Joined: 03 Mar 2008
Posts: 5

Hi All,

I am currently trying to send a message to a queue via JMS using a tool called JMeter (Apache open source performance test tool) and I am receiving a 2005 error:

2008/03/03 13:29:25 WARN - jmeter.protocol.jms.sampler.JMSSampler: MQJMS2005: failed to create MQQueueManager for 'NSP005_QM' javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for 'NSP005_QM'
at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:569)
at com.ibm.mq.jms.MQConnection.createQM(MQConnection.java:2321)
at com.ibm.mq.jms.MQConnection.createQMNonXA(MQConnection.java:1749)


- I have been able to send messages to another local machine without any problems, and I believe this is because the MQ on the first machine that is not allowing the connection is restricted to the mqm user, so when JMeter attempts to connect to the QM remotely it is not the allowed user - the second machine that does recieve the message has an open MQ setup where any user can connect.


Is there anyway a user ID can be defined when sending a message over JMS to MQ? For those of you not familiar with JMeter there are options to add multiple JMS Properties or JNDI properties (for example, I used the JNDI properties to declare/define java.naming.provider.url, so I was hoping there was another similar java property I could set for user)

Thanks in advance!

Rob
Back to top
View user's profile Send private message
rmh
PostPosted: Mon Mar 03, 2008 5:58 am    Post subject: Reply with quote

Newbie

Joined: 03 Mar 2008
Posts: 5

Also, just to clarify, I have been able to confirm that the queues are working correctly - I have been able to use another java tool that is running on the server in question and that successfully sends and recieves messages from all the queues on the QMgr/Box...
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Mar 03, 2008 6:03 am    Post subject: Re: MQJMS2005 - User error connecting remotely to MQ Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

rmh wrote:
I am currently trying to send a message to a queue via JMS using a tool called JMeter (Apache open source performance test tool) and I am receiving a 2005 error:


This is less useful than you think. You need to obtain the linked exception to find the actual reason code being returned by MQ, and hence the underlying problem.

rmh wrote:
- I have been able to send messages to another local machine without any problems, and I believe this is because the MQ on the first machine that is not allowing the connection is restricted to the mqm user, so when JMeter attempts to connect to the QM remotely it is not the allowed user - the second machine that does recieve the message has an open MQ setup where any user can connect.


Or it could be that one machine has the client set up correctly and the other does not. Without the reason code it's impossible to say.

rmh wrote:
Is there anyway a user ID can be defined when sending a message over JMS to MQ? For those of you not familiar with JMeter there are options to add multiple JMS Properties or JNDI properties (for example, I used the JNDI properties to declare/define java.naming.provider.url, so I was hoping there was another similar java property I could set for user)


There are any number of ways alternative user credentials can be supplied, if that is indeed your problem. First confirm this by obtaining the linked exception, then look through this forum and the Using Java documentation for a wealth of discussion on how to use such methods.

On a related point, much of the forum discussion is on how to stop Java applications presenting themselves as mqm. There are very few reasons why any application-level code should want or need administrative access.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Mar 03, 2008 6:09 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

rmh wrote:
Also, just to clarify, I have been able to confirm that the queues are working correctly


Queues never work. The hosting queue manager works, or does not work, or fails to accept connections. Queues are data files.

Pedantic but possibly important problem diagnostic distinction.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Mar 03, 2008 6:11 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Vitor wrote:
Queues never work.




Queues always work.

Sometimes the qmgr doesn't.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Mar 03, 2008 6:17 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

jefflowrey wrote:
Vitor wrote:
Queues never work.




Queues always work.

Sometimes the qmgr doesn't.


If it's not executable code, it never works. It's just always accessable.

(Is it me, or is this corner getting smaller every time I move my paint brush? )
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
rmh
PostPosted: Mon Mar 03, 2008 7:40 am    Post subject: Reply with quote

Newbie

Joined: 03 Mar 2008
Posts: 5

Thanks guys, and apologies if this is a stupid question, but could either of you advise on how i can find the linked exception/reason code? all that i get in the jmeter log is as follows:

2008/03/03 15:33:24 WARN - jmeter.protocol.jms.sampler.JMSSampler: MQJMS2005: failed to create MQQueueManager for 'NSP005_QM' javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for 'NSP005_QM'
at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:569)
at com.ibm.mq.jms.MQConnection.createQM(MQConnection.java:2321)
at com.ibm.mq.jms.MQConnection.createQMNonXA(MQConnection.java:1749)
at com.ibm.mq.jms.MQQueueConnection.<init>(MQQueueConnection.java:144)
at com.ibm.mq.jms.MQQueueConnection.<init>(MQQueueConnection.java:54)
at com.ibm.mq.jms.MQQueueConnectionFactory.createQueueConnection(MQQueueConnectionFactory.java:106)
at org.apache.jmeter.protocol.jms.sampler.Receiver.<init>(Receiver.java:45)
at org.apache.jmeter.protocol.jms.sampler.Receiver.createReceiver(Receiver.java:60)
at org.apache.jmeter.protocol.jms.sampler.JMSSampler.threadStarted(JMSSampler.java:294)
at org.apache.jmeter.threads.JMeterThread$ThreadListenerTraverser.addNode(JMeterThread.java:476)
at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:972)
at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:973)
at org.apache.jorphan.collections.HashTree.traverse(HashTree.java:956)
at org.apache.jmeter.threads.JMeterThread.threadStarted(JMeterThread.java:448)
at org.apache.jmeter.threads.JMeterThread.initRun(JMeterThread.java:440)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:245)
at java.lang.Thread.run(Thread.java:803)

2008/03/03 15:33:24 DEBUG - jmeter.control.GenericController: Calling next on: org.apache.jmeter.control.LoopController


and none of the logs in my /var/mqm/logs seem to be getting updated - is there anyother way I could get hold of these?

Thanks again
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Mar 03, 2008 7:42 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You'll have to ask jmeter for help.

Or patch the jmeter code yourself (it is open source, you've said) so that it reports a LinkedException if one is available.

Or you can turn on MQ client tracing.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Mar 03, 2008 7:51 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

jefflowrey wrote:
You'll have to ask jmeter for help.

Or patch the jmeter code yourself (it is open source, you've said) so that it reports a LinkedException if one is available.

Or you can turn on MQ client tracing.


FWIW my experience is that the LinkedException method is easier if you have access to the source code. At least, that's what the Java people claimed when we were discussing it.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Mar 03, 2008 7:59 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Oh, sure. MQ Client tracing is complicated and confusing to read.

Adding a System.err.println for getLinkedException is pretty simple.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Mar 03, 2008 8:05 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

jefflowrey wrote:
Adding a System.err.println for getLinkedException is pretty simple.


They said something like that!

Only piece of Java code I almost understood.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Mar 03, 2008 9:11 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Vitor wrote:
Only piece of Java code I almost understood.


It's the same as fprintf(stderr...)
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Mar 03, 2008 9:18 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

jefflowrey wrote:
Vitor wrote:
Only piece of Java code I almost understood.


It's the same as fprintf(stderr...)


And that's why I understood it!
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
JLRowe
PostPosted: Mon Mar 03, 2008 9:38 am    Post subject: Reply with quote

Yatiri

Joined: 25 May 2002
Posts: 664
Location: South East London

jefflowrey wrote:
You'll have to ask jmeter for help.

Or patch the jmeter code yourself (it is open source, you've said) so that it reports a LinkedException if one is available.

Or you can turn on MQ client tracing.


Or write a hacky little java program to connect, hopefully fail and output the linked exception.
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Mon Mar 03, 2008 11:28 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Can I bring this very kind posting to your attention:

http://www.mqseries.net/phpBB2/viewtopic.php?t=42149&highlight=
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » IBM MQ Java / JMS » MQJMS2005 - User error connecting remotely to MQ
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.