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 Installation/Configuration Support » JBoss communication problem with Websphere MQ

Post new topic  Reply to topic
 JBoss communication problem with Websphere MQ « View previous topic :: View next topic » 
Author Message
iand2
PostPosted: Fri Sep 30, 2005 9:44 am    Post subject: JBoss communication problem with Websphere MQ Reply with quote

Novice

Joined: 08 Jun 2005
Posts: 10

Hello,

I have posted this in the JBoss forums as I think strictly it is more a JBoss related question but if appropriate I hope someone might have some suggestions. MQ version is 5.3, with fix pack 5, on SuSE 9.2 (I have LD_ASSUME_KERNEL set ok too).

I have set up the JMS queue bindings changed the JMS provider our own MQSeriesProvider class. I also have the MQ java libraries in the jboss user's path. Everything starts ok but I just can't get it to talk to MQ. JBoss runs as its own user and this user can write directly to my configured queues so no problem there. Just after JBoss starts I get the following ad contact admin:

2005-09-30 18:19:32,189 Reconnected to JMS provider
2005-09-30 18:19:32,189 JMS provider failure detected:
javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for ''
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.jboss.ejb.plugins.jms.DLQHandler.createService(DLQHandler.java:155)
at org.jboss.system.ServiceMBeanSupport.create(ServiceMBeanSupport.java:158)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker.innerCreate(JMSContainerInvoker.java:458)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker.startService(JMSContainerInvoker.java:674)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker$ExceptionListenerImpl.onException(JMSContainerInvoker.java:1173)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker$1.run(JMSContainerInvoker.java:686)
2005-09-30 18:19:32,191 Trying to reconnect to JMS provider
2005-09-30 18:19:42,199 Initialization failed
javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for ''
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.jboss.ejb.plugins.jms.DLQHandler.createService(DLQHandler.java:155)
at org.jboss.system.ServiceMBeanSupport.create(ServiceMBeanSupport.java:158)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker.innerCreate(JMSContainerInvoker.java:458)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker.startService(JMSContainerInvoker.java:674)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker$ExceptionListenerImpl.onException(JMSContainerInvoker.java:1173)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker$1.run(JMSContainerInvoker.java:686)
.................... etc ................
.................... etc ................
.................... etc ................

The interesting thing is that the queue manager is blank in the exception - it should at least be failed to create MQQueueManager for 'some_queue_manager'.

Thanks for any ideas
Ian
Back to top
View user's profile Send private message
kevinf2349
PostPosted: Fri Sep 30, 2005 10:07 am    Post subject: Reply with quote

Grand Master

Joined: 28 Feb 2003
Posts: 1311
Location: USA

Quote:
The interesting thing is that the queue manager is blank in the exception - it should at least be failed to create MQQueueManager for 'some_queue_manager'.


Unless it is just trying to connect to the default queue manager on the box, then '' would be OK I think.

Is the default queue manager running?
Back to top
View user's profile Send private message
iand2
PostPosted: Fri Sep 30, 2005 11:29 am    Post subject: Reply with quote

Novice

Joined: 08 Jun 2005
Posts: 10

It is yes, and it's the only queue manager configured.
Back to top
View user's profile Send private message
iand2
PostPosted: Fri Sep 30, 2005 11:47 am    Post subject: Reply with quote

Novice

Joined: 08 Jun 2005
Posts: 10

Just some more info.

I have a Java command line utility that can insert messages into a queue. It's interesting that when I stop the queue manager, and use this utility (as the jboss user), I get:

jboss@juuri-5:~/mqutils> java -cp .:/opt/jboss/client/jbossall-client.jar:/opt/mqm/java/lib/com.ibm.mqjms.jar:/opt/mqm/java/lib/com.ibm.mq.jar QPut Q_INPUT /tmp/foo.txt
30/09/05 20:35:20 AMQ9508: Program cannot connect to the queue manager.
30/09/05 20:35:20 AMQ9999: Channel program ended abnormally.
[b]javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for 'localhost:'[/b]
at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:556)
at com.ibm.mq.jms.MQConnection.createQM(MQConnection.java:1775)
at com.ibm.mq.jms.MQConnection.createQMNonXA(MQConnection.java:1168)
at com.ibm.mq.jms.MQQueueConnection.<init>(MQQueueConnection.java:170)
at com.ibm.mq.jms.MQQueueConnection.<init>(MQQueueConnection.java:80)
at com.ibm.mq.jms.MQQueueConnectionFactory.createQueueConnection(MQQueueConnectionFactory.java:145)
at QPut.main(QPut.java:33)

In this case of course we explicitly "cannot connect to the queue manager" but at least it mentions localhost whereas the JBoss error mentions nothing. When I start the queue manager again the utility works fine as expected.

Maybe that offers some clue?

Ian


[/b]
Back to top
View user's profile Send private message
iand2
PostPosted: Mon Oct 03, 2005 3:56 pm    Post subject: Reply with quote

Novice

Joined: 08 Jun 2005
Posts: 10

Comparing all this to a machine I know works, I supposed it was to do with the MQ installation. I can insert into and retrieve messages from a test queue using the amqsput and amqsget samples ok on both machines. Both machines have just one queue manager (so, the default) which is running and so are the runmqlsr and runmqchi processes.

Running "display chstatus(*)" in runmqsc on the machine that works gives me 4 instances of

AMQ8417: Display Channel Status details.
CHANNEL(SYSTEM.DEF.SVRCONN) XMITQ( )
CONNAME(10.0.0.21) CURRENT
CHLTYPE(SVRCONN) STATUS(RUNNING)
RQMNAME( )

but on the problem machine I just get

AMQ8420: Channel Status not found.

So I guessed this was because the channel wasn't running so I used "start channel(SYSTEM.DEF.SVRCONN)" and that returns

AMQ8018: Start WebSphere MQ channel accepted.

which sounds positive but doesn't seem to change anything.

At this stage I'm probably suffering from lack of understanding of the fundamentals - am I on the right track at all?

Any suggestions much appreciated
Cheers
Ian
Back to top
View user's profile Send private message
EddieA
PostPosted: Tue Oct 04, 2005 9:36 am    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

Quote:
I can insert into and retrieve messages from a test queue using the amqsput and amqsget samples ok

Those programs are using server bindings to connect to the QM, so will not use the SYSTEM.DEF.SVRCONN channel. Although they do show that the listener is running correctly. Did you use them with just a Queue name, or did you use Queue and Queue Manager.
Quote:
AMQ8420: Channel Status not found

Quite normal is no channels are currently active.
Quote:
I used "start channel(SYSTEM.DEF.SVRCONN)"

Unfortunately, you can't start a ServerConn channel like that. It only "starts" when the application using it connects to the QM.

I would suspect the JBoss configuration.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
JT
PostPosted: Tue Oct 04, 2005 11:31 am    Post subject: Reply with quote

Padawan

Joined: 27 Mar 2003
Posts: 1564
Location: Hartford, CT.

Just to clarify your statement:
Quote:
Both machines have just one queue manager (so, the default)

That's not an accurate assumption.

Just because it's the only queue manager on the server doesn't make it the default queue manager.

On a UNIX platform, you have to explicitly make it the default by including a DefaultQueueManager stanza in the mqsi.ini configuration file. I believe the same holds true for the Windows platform, just a different mechanism is used to make it the default.
Back to top
View user's profile Send private message
iand2
PostPosted: Tue Oct 04, 2005 1:33 pm    Post subject: Reply with quote

Novice

Joined: 08 Jun 2005
Posts: 10

Ok, JBoss starts without the [failed to create MQQueueManager for ''] exception if I set

export LD_ASSUME_KERNEL=2.4.19

in the jboss user's environment. I realised this when I tried starting JBoss as the mqm user and it worked. I did already have the variable set in the mqm user's environment, and set when installing the RPMs as root, as is required if the kernel is newer. I didn't set it anywhere else because I couldn't see why it would be needed for anything else except Websphere MQ. For example, why change the kernel threading model for everything else aswell? I guess as a compromise I could set it in the script that starts JBoss rather than set it as an environment variable.

Does this make sense to anyone?
Back to top
View user's profile Send private message
iand2
PostPosted: Wed Oct 05, 2005 4:29 am    Post subject: Reply with quote

Novice

Joined: 08 Jun 2005
Posts: 10

Hi again,

after doing some more digging it appears that, as long as you have PTF5 or later, using

export AMQ_THREADMODEL_RESET=1

for the jboss user will be enough as this sets LD_ASSUME_KERNEL=2.4.19 but has the advantage that the LD_ASSUME_KERNEL variable is only defined for MQ processes and so other applications are unaffected and can run with the new posix thread model...
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 Installation/Configuration Support » JBoss communication problem with Websphere 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.