Author |
Message
|
kiranraj |
Posted: Thu Mar 16, 2006 3:41 am Post subject: MQJE011: Socket connection attempt refused |
|
|
Novice
Joined: 19 Sep 2005 Posts: 12
|
Hi All,
When i try to connect to MQ from my WSAD(on another machine), i get the following exception.
How do i know if the request reached the MQ machine. I dont see any traces in the MQ server logs.
The code looks like:
QueueConnectionFactory factory = JMSUtil.getConnectionFactory(WQCF);
queueConnection = factory.createQueueConnection();
session = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
Queue queue = (Queue) JMSUtil.getQueue(WReq);
receiver = session.createReceiver(queue);
MessageListener wListener = new MessageListener();
receiver.setMessageListener(wListener);
queueConnection.start();
The exception:
[3/16/06 15:56:32:648 IST] 4c6b4e69 SystemOut O 2006-03-16 15:56:32,648 ERROR [Thread-1] common.Initializer (ApplicationLog.java:122) - startWListener: Error while invoking listner -
[3/16/06 15:56:33:616 IST] 4c6b4e69 SystemErr R javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for 'itl-hw-30064a:SE_PUNAPPL'
[3/16/06 15:56:33:616 IST] 4c6b4e69 SystemErr R at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:556)
[3/16/06 15:56:33:616 IST] 4c6b4e69 SystemErr R at com.ibm.mq.jms.MQConnection.createQM(MQConnection.java:1736)
[3/16/06 15:56:33:616 IST] 4c6b4e69 SystemErr R at com.ibm.mq.jms.MQConnection.createQMNonXA(MQConnection.java:1129)
[3/16/06 15:56:33:616 IST] 4c6b4e69 SystemErr R at com.ibm.mq.jms.MQQueueConnection.<init>(MQQueueConnection.java:170)
[3/16/06 15:56:33:616 IST] 4c6b4e69 SystemErr R at com.ibm.mq.jms.MQQueueConnection.<init>(MQQueueConnection.java:80)
[3/16/06 15:56:33:616 IST] 4c6b4e69 SystemErr R at com.ibm.mq.jms.MQQueueConnectionFactory.createQueueConnection(MQQueueConnectionFactory.java:145)
[3/16/06 15:56:33:616 IST] 4c6b4e69 SystemErr R at javax.servlet.GenericServlet.init(GenericServlet.java:258)
[3/16/06 15:56:33:616 IST] 4c6b4e69 SystemErr R at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doInit(StrictServletInstance.java:82)
[3/16/06 15:56:33:616 IST] 4c6b4e69 SystemErr R at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._init(StrictLifecycleServlet.java:147)
[3/16/06 15:56:33:616 IST] 4c6b4e69 SystemErr R at com.ibm.ws.webcontainer.servlet.PreInitializedServletState.init(StrictLifecycleServlet.java:270)
[3/16/06 15:56:33:616 IST] 4c6b4e69 SystemErr R at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.init(StrictLifecycleServlet.java:113)
[3/16/06 15:56:33:616 IST] 4c6b4e69 SystemErr R at com.ibm.ws.webcontainer.servlet.ServletInstance.init(ServletInstance.java:189)
[3/16/06 15:56:33:616 IST] 4c6b4e69 SystemErr R at javax.servlet.GenericServlet.init(GenericServlet.java:258)
[3/16/06 15:56:33:616 IST] 4c6b4e69 SystemErr R at com.ibm.ws.webcontainer.webapp.WebAppServletManager.addServlet(WebAppServletManager.java:870)
[3/16/06 15:56:33:616 IST] 4c6b4e69 SystemErr R at com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadServlet(WebAppServletManager.java:224)
[3/16/06 15:56:33:616 IST] 4c6b4e69 SystemErr R at com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadAutoLoadServlets(WebAppServletManager.java:542)
[3/16/06 15:56:33:616 IST] 4c6b4e69 SystemErr R at com.ibm.ws.webcontainer.webapp.WebApp.loadServletManager(WebApp.java:1270)
[3/16/06 15:56:33:616 IST] 4c6b4e69 SystemErr R at com.ibm.ws.webcontainer.webapp.WebApp.init(WebApp.java:277)
[3/16/06 15:56:33:616 IST] 4c6b4e69 SystemErr R at com.ibm.ws.webcontainer.srt.WebGroup.loadWebApp(WebGroup.java:396)
[3/16/06 15:56:33:616 IST] 4c6b4e69 SystemErr R at com.ibm.ws.webcontainer.srt.WebGroup.init(WebGroup.java:216)
[3/16/06 15:56:33:616 IST] 4c6b4e69 SystemErr R at com.ibm.ws.webcontainer.WebContainer.addWebApplication(WebContainer.java:984)
[3/16/06 15:56:33:616 IST] 4c6b4e69 SystemErr R at com.ibm.ws.runtime.component.WebContainerImpl.install(WebContainerImpl.java:136)
[3/16/06 15:56:33:616 IST] 4c6b4e69 SystemErr R at com.ibm.ws.runtime.component.WebContainerImpl.start(WebContainerImpl.java:356)
[3/16/06 15:56:33:616 IST] 4c6b4e69 SystemErr R at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:415)
[3/16/06 15:56:33:616 IST] 4c6b4e69 SystemErr R at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:787)
[3/16/06 15:56:33:616 IST] 4c6b4e69 SystemErr R at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:351)
[3/16/06 15:56:33:616 IST] 4c6b4e69 SystemErr R at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:575)
[3/16/06 15:56:33:632 IST] 4c6b4e69 SystemErr R at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:268)
[3/16/06 15:56:33:632 IST] 4c6b4e69 SystemErr R at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:246)
[3/16/06 15:56:33:632 IST] 4c6b4e69 SystemErr R at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:543)
[3/16/06 15:56:33:632 IST] 4c6b4e69 SystemErr R at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:418)
[3/16/06 15:56:33:632 IST] 4c6b4e69 SystemErr R at com.ibm.ws.runtime.component.ApplicationServerImpl.start(ApplicationServerImpl.java:117)
[3/16/06 15:56:33:632 IST] 4c6b4e69 SystemErr R at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:543)
[3/16/06 15:56:33:632 IST] 4c6b4e69 SystemErr R at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:418)
[3/16/06 15:56:33:632 IST] 4c6b4e69 SystemErr R at com.ibm.ws.runtime.component.ServerImpl.start(ServerImpl.java:183)
[3/16/06 15:56:33:632 IST] 4c6b4e69 SystemErr R at com.ibm.ws.runtime.WsServer.start(WsServer.java:128)
[3/16/06 15:56:33:632 IST] 4c6b4e69 SystemErr R at com.ibm.ws.runtime.WsServer.main(WsServer.java:225)
[3/16/06 15:56:33:632 IST] 4c6b4e69 SystemErr R at java.lang.reflect.Method.invoke(Native Method)
[3/16/06 15:56:33:632 IST] 4c6b4e69 SystemErr R at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:94)
[3/16/06 15:56:33:632 IST] 4c6b4e69 SystemErr R at com.ibm.etools.websphere.tools.runner.api.ServerRunnerV5$1.run(ServerRunnerV5.java:97)2006-03-16 15:56:33,632 ERROR [Thread-1]
Please help. _________________ Thanks. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Mar 16, 2006 3:45 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Can you show us the code for the MessageListener class ?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
kiranraj |
Posted: Thu Mar 16, 2006 4:35 am Post subject: Listener code |
|
|
Novice
Joined: 19 Sep 2005 Posts: 12
|
The code in the listener class is:
String myQmgr = SE_PUNAPPL;
String myQname = WCQ;
MQEnvironment.properties.put(MQC.TRANSPORT_PROPERTY,MQC.TRANSPORT_MQSERIES);
sendQmgr = new MQQueueManager(myQmgr);
int openOptions = MQC.MQOO_OUTPUT + MQC.MQOO_SET_IDENTITY_CONTEXT;
sendQ = sendQmgr.accessQueue(myQname, openOptions, null, null, null);
Please let me know if you need anything else.
Thanks. _________________ Thanks. |
|
Back to top |
|
 |
kiranraj |
Posted: Thu Mar 16, 2006 4:52 am Post subject: Code snippet |
|
|
Novice
Joined: 19 Sep 2005 Posts: 12
|
Hi,
The actual code looks like:
connectionFactoryJNDIname = connectionfactory;
QueueConnectionFactory queueConFactory = JMSUtil.getConnectionFactory(connectionFactoryJNDIname);
queueCon = queueConFactory.createQueueConnection();
ImportSession = queueCon.createQueueSession(false,Session.AUTO_ACKNOWLEDGE);
ImportQueueJNDI = importqueue;
ImportQueue = (Queue)JMSUtil.getQueue(ImportQueueJNDI); ImportReceiver = ImportSession.createReceiver(ImportQueue); ImportMessageListener MessageListener = new ImportMessageListener();
ImportReceiver.setMessageListener(ImportMessageListener);
AND THE LISTENER CODE IS :
onMessage(Message message)
{
Message = (MessageDVO)((ObjectMessage)message).getObject();
blah blah blah.
}
We use a bindings file during the server startup.
Any help?
Thanks. _________________ Thanks. |
|
Back to top |
|
 |
mvic |
Posted: Thu Mar 16, 2006 5:49 am Post subject: Re: MQJE011: Socket connection attempt refused |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
kiranraj wrote: |
[3/16/06 15:56:32:648 IST] 4c6b4e69 SystemOut O 2006-03-16 15:56:32,648 ERROR [Thread-1] common.Initializer (ApplicationLog.java:122) - startWListener: Error while invoking listner -
[3/16/06 15:56:33:616 IST] 4c6b4e69 SystemErr R javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for 'itl-hw-30064a:SE_PUNAPPL'
[3/16/06 15:56:33:616 IST] 4c6b4e69 SystemErr R at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:556)
[3/16/06 15:56:33:616 IST] 4c6b4e69 SystemErr R at com.ibm.mq.jms.MQConnection.createQM(MQConnection.java:1736)
[3/16/06 15:56:33:616 IST] 4c6b4e69 SystemErr R at com.ibm.mq.jms.MQConnection.createQMNonXA(MQConnection.java:1129) |
There should be a reason code associated with a failure to connect to a queue manager. Is this somehow hidden or otherwise not dumped out into SystemErr? I'd be looking for something like 2035 which indicates an authorization failure, or 2009 which often indicates a network problem.
Perhaps you could post the catch() block that is in use for writing out this exception? |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Mar 16, 2006 2:06 pm Post subject: Re: Code snippet |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
kiranraj wrote: |
Hi,
The actual code looks like:
connectionFactoryJNDIname = connectionfactory;
QueueConnectionFactory queueConFactory = JMSUtil.getConnectionFactory(connectionFactoryJNDIname);
queueCon = queueConFactory.createQueueConnection();
ImportSession = queueCon.createQueueSession(false,Session.AUTO_ACKNOWLEDGE);
ImportQueueJNDI = importqueue;
ImportQueue = (Queue)JMSUtil.getQueue(ImportQueueJNDI); ImportReceiver = ImportSession.createReceiver(ImportQueue); ImportMessageListener MessageListener = new ImportMessageListener();
ImportReceiver.setMessageListener(ImportMessageListener);
AND THE LISTENER CODE IS :
onMessage(Message message)
{
Message = (MessageDVO)((ObjectMessage)message).getObject();
blah blah blah.
}
We use a bindings file during the server startup.
Any help?
Thanks. |
I would expect something of the type :
Code: |
connectionFactoryJNDIname = "myjndiqcfname"; //note the String type
// and for the listener
public class Mylistener implements javax.jms.MessageListener {
public void onMessage() {
//whatever
}//end onMessage
}//end class
|
So I really don't know if you have dotted all the i and crossed all the ts.
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
chandrak |
Posted: Fri Mar 17, 2006 5:43 am Post subject: |
|
|
Newbie
Joined: 17 Mar 2006 Posts: 1
|
try passing username and password like this
connection = factory.createQueueConnection("user","password");
adminstrator might have created a username on the server.use that and password.u will definitely get connected to the server.
-Chandra |
|
Back to top |
|
 |
kiranraj |
Posted: Mon Mar 20, 2006 9:50 pm Post subject: |
|
|
Novice
Joined: 19 Sep 2005 Posts: 12
|
Thanks a lot for the help. There was an ip clash in our network and hence the request didnt reach the server. Now its solved. Thanks again. _________________ Thanks. |
|
Back to top |
|
 |
Clediomar |
Posted: Wed Apr 12, 2006 6:15 pm Post subject: |
|
|
Newbie
Joined: 12 Apr 2006 Posts: 1 Location: Brasil
|
I have the following problem:
When the use the clause MQEnvironment.hostname = " IP of the host " the application of the the mistake below:
MQJE016
When I comment the line / / MQEnvironment.hostname = " IP of the host " usually works.
somebody can me to help
javascript:emoticon(' ')
javascript:emoticon(' ') _________________ Em busca |
|
Back to top |
|
 |
Kelvin |
Posted: Fri Aug 25, 2006 9:55 pm Post subject: |
|
|
Novice
Joined: 25 Aug 2006 Posts: 10 Location: Hong Kong
|
Dear all
I got the same problem
Posted: Wed Apr 12, 2006 6:15 pm Post subject:
--------------------------------------------------------------------------------
I have the following problem in below. How can I solve it?
When the use the clause MQEnvironment.hostname = " IP of the host " the application of the the mistake below:
MQJE016
When I comment the line / / MQEnvironment.hostname = " IP of the host " usually works.
Please reply to kelvin.ho@cigna.com or kelvinho2000@yahoo.com
Rgs
Kelvin Ho |
|
Back to top |
|
 |
fjb_saper |
Posted: Sat Aug 26, 2006 6:19 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
We need more context information... _________________ MQ & Broker admin |
|
Back to top |
|
 |
garonne |
Posted: Mon Aug 28, 2006 5:50 am Post subject: |
|
|
Acolyte
Joined: 26 Jan 2006 Posts: 59
|
Clediomar wrote: |
I have the following problem:
When the use the clause MQEnvironment.hostname = " IP of the host " the application of the the mistake below:
MQJE016
When I comment the line / / MQEnvironment.hostname = " IP of the host " usually works.
somebody can me to help
javascript:emoticon(' ')
javascript:emoticon(' ') |
Your application and QueueManager works in binding or client mode ? |
|
Back to top |
|
 |
Kelvin |
Posted: Mon Aug 28, 2006 7:13 am Post subject: |
|
|
Novice
Joined: 25 Aug 2006 Posts: 10 Location: Hong Kong
|
1) If your MQ client and server is in same machine, if you are not specify the ip address, then you are using bind mode.
If you specify ip address, then you are using Client mode.
2) MQJE016 may happened, if your channel type is sender or request.
Please try to server-connection mode for your channel setting.
Kel Ho |
|
Back to top |
|
 |
|