| Author | Message | 
		
		  | gappodi | 
			  
				|  Posted: Sun Oct 12, 2014 11:36 pm    Post subject: Unable to execute message flows having MQInput/MQOutput node |   |  | 
		
		  |  Voyager
 
 
 Joined: 05 Sep 2014Posts: 76
 
 
 | 
			  
				| I have a message flow that starts with an MQInput. When I run this flow I get the following exception. 
 312  [main] DEBUG com.sterlingcommerce.bpn.tools.emb.EMBConnectionManager  - Con
 necting to queue manager at localhost:2414/IB9QMGR/SYSTEM.BKR.CONFIG ...
 1420 [main] WARN  com.sterlingcommerce.bpn.tools.emb.EMBConnectionManager  - Una
 ble to create a connection to the queue manager
 com.ibm.mq.MQException: MQJE001: An MQException occurred: Completion Code 2, Rea
 son 2059
 MQJE011: Socket connection attempt refused
 at com.ibm.mq.MQManagedConnectionJ11.<init>(MQManagedConnectionJ11.java:
 268)
 at com.ibm.mq.MQClientManagedConnectionFactoryJ11._createManagedConnecti
 on(MQClientManagedConnectionFactoryJ11.java:318)
 at com.ibm.mq.MQClientManagedConnectionFactoryJ11.createManagedConnectio
 n(MQClientManagedConnectionFactoryJ11.java:338)
 at com.ibm.mq.StoredManagedConnection.<init>(StoredManagedConnection.jav
 a:84)
 at com.ibm.mq.MQSimpleConnectionManager.allocateConnection(MQSimpleConne
 ctionManager.java:168)
 at com.ibm.mq.MQQueueManagerFactory.obtainBaseMQQueueManager(MQQueueMana
 gerFactory.java:774)
 at com.ibm.mq.MQQueueManagerFactory.procure(MQQueueManagerFactory.java:6
 90)
 at com.ibm.mq.MQQueueManagerFactory.constructQueueManager(MQQueueManager
 Factory.java:646)
 at com.ibm.mq.MQQueueManagerFactory.createQueueManager(MQQueueManagerFac
 tory.java:153)
 at com.ibm.mq.MQQueueManager.<init>(MQQueueManager.java:546)
 at com.sterlingcommerce.bpn.tools.emb.EMBConnectionManager.connectToQueu
 eManager(EMBConnectionManager.java:313)
 at com.sterlingcommerce.bpn.tools.emb.EMBConnectionManager.connectToQueu
 eManager(EMBConnectionManager.java:272)
 at com.sterlingcommerce.bpn.tools.emb.EMBConnectionManager.connectToQueu
 eManager(EMBConnectionManager.java:266)
 at com.sterlingcommerce.bpn.utility.EMBTester.main(EMBTester.java:119)
 Caused by: com.ibm.mqservices.MQInternalException: MQJE001: An MQException occur
 red: Completion Code 2, Reason 2059
 MQJE011: Socket connection attempt refused
 at com.ibm.mq.MQInternalCommunications.createSocketConnection(MQInternal
 Communications.java:2366)
 at com.ibm.mq.MQv6InternalCommunications$1.run(MQv6InternalCommunication
 s.java:167)
 at java.security.AccessController.doPrivileged(Native Method)
 at com.ibm.mq.MQv6InternalCommunications.initialize(MQv6InternalCommunic
 ations.java:164)
 at com.ibm.mq.MQv6InternalCommunications.<init>(MQv6InternalCommunicatio
 ns.java:112)
 at com.ibm.mq.MQSESSIONClient.MQCONNX(MQSESSIONClient.java:1348)
 at com.ibm.mq.MQSESSIONClient.MQCONN(MQSESSIONClient.java:1257)
 at com.ibm.mq.MQManagedConnectionJ11.<init>(MQManagedConnectionJ11.java:
 240)
 
 What could be the possible reason for this weird behavior ?
 My WebSphere MQ is up and running. Please provide help here.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | smdavies99 | 
			  
				|  Posted: Sun Oct 12, 2014 11:57 pm    Post subject: |   |  | 
		
		  |  Jedi Council
 
 
 Joined: 10 Feb 2003Posts: 6076
 Location: Somewhere over the Rainbow this side of Never-never land.
 
 | 
			  
				| Are you using any JMS or Sterling nodes in your flow? _________________
 WMQ User since 1999
 MQSI/WBI/WMB/'Thingy' User since 2002
 Linux user since 1995
 
 Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | gappodi | 
			  
				|  Posted: Mon Oct 13, 2014 12:49 am    Post subject: |   |  | 
		
		  |  Voyager
 
 
 Joined: 05 Sep 2014Posts: 76
 
 
 | 
			  
				| I am not using any JMS nodes or Sterling nodes. |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | zpat | 
			  
				|  Posted: Mon Oct 13, 2014 12:55 am    Post subject: |   |  | 
		
		  |  Jedi Council
 
 
 Joined: 19 May 2001Posts: 5867
 Location: UK
 
 | 
			  
				| What nodes are you using? _________________
 Well, I don't think there is any question about it. It can only be attributable to human error. This sort of thing has cropped up before, and it has always been due to human error.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | gappodi | 
			  
				|  Posted: Mon Oct 13, 2014 1:10 am    Post subject: |   |  | 
		
		  |  Voyager
 
 
 Joined: 05 Sep 2014Posts: 76
 
 
 | 
			  
				| My flow starts with an MQ Input node and has many nodes like Java Compute node, ESQL Compute node, ESQL Filter, etc. |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | smdavies99 | 
			  
				|  Posted: Mon Oct 13, 2014 1:32 am    Post subject: |   |  | 
		
		  |  Jedi Council
 
 
 Joined: 10 Feb 2003Posts: 6076
 Location: Somewhere over the Rainbow this side of Never-never land.
 
 | 
			  
				| And to ask the blindingly obvious 
 Is your QMGR listener configured and running on port 2414?
 
 I also wonder as you appear to have the IIB 9 Default configuration that the listener might not be set to startup with the QMGR.
 
 That said, if you aren't using and JMS or Sterling nodes where all those java related errors are coming from.
 
 Are you in your Java compute node trying to use JMS by any chance?
 _________________
 WMQ User since 1999
 MQSI/WBI/WMB/'Thingy' User since 2002
 Linux user since 1995
 
 Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | gappodi | 
			  
				|  Posted: Mon Oct 13, 2014 2:03 am    Post subject: |   |  | 
		
		  |  Voyager
 
 
 Joined: 05 Sep 2014Posts: 76
 
 
 | 
			  
				| Those java related errors appear to be coming from the MQ input node itself. Also, I am not using JMS related thing anywhere in my message flow, Java compute node or anywhere else.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | zpat | 
			  
				|  Posted: Mon Oct 13, 2014 2:13 am    Post subject: |   |  | 
		
		  |  Jedi Council
 
 
 Joined: 19 May 2001Posts: 5867
 Location: UK
 
 | 
			  
				| Do you use connect direct nodes? 
 What is in your JCN nodes? Do you use any other JAR files?
 _________________
 Well, I don't think there is any question about it. It can only be attributable to human error. This sort of thing has cropped up before, and it has always been due to human error.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | stoney | 
			  
				|  Posted: Mon Oct 13, 2014 5:11 am    Post subject: |   |  | 
		
		  | Centurion
 
 
 Joined: 03 Apr 2013Posts: 140
 
 
 | 
			  
				| 
   
	| gappodi wrote: |  
	| Those java related errors appear to be coming from the MQ input node itself. Also, I am not using JMS related thing anywhere in my message flow, Java compute node or anywhere else.
 |  
 That's not possible - the MQ Input node is written in C++, and only uses the MQ C/C++ APIs.
 I suspect these Java errors are coming from user supplied Java code being invoked by a Java compute node, ESQL calling Java, or a mapping node calling a custom Java transformation.
 
 The stack trace you have provided shows classes in the com.sterlingcommerce.bpn.tools.emb package trying to connect to a queue manager on port 2414.
 Do you own these classes? These classes are not supplied with the product.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | gappodi | 
			  
				|  Posted: Mon Oct 13, 2014 11:50 pm    Post subject: |   |  | 
		
		  |  Voyager
 
 
 Joined: 05 Sep 2014Posts: 76
 
 
 | 
			  
				| I realized what smdavies99 had pointed out initially turned out to be the root cause. My QMGR listener was not configured at all and hence not running. I had to configure one and then run it. It resolved my problem. 
 However, When I remember that when I had installed MQ last time I really did not have to configure the listeners and all. After the installation I assumed it to be in the same shape as it was earlier ( and hence expected to behave same as well ).
 
 My ABSURD assumption resulted into all this. Thanks everyone !!
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | joebuckeye | 
			  
				|  Posted: Tue Oct 14, 2014 9:23 am    Post subject: |   |  | 
		
		  |  Partisan
 
 
 Joined: 24 Aug 2007Posts: 365
 Location: Columbus, OH
 
 | 
			  
				| 
   
	| stoney wrote: |  
	| The stack trace you have provided shows classes in the com.sterlingcommerce.bpn.tools.emb package trying to connect to a queue manager on port 2414.
 Do you own these classes? These classes are not supplied with the product.
 |  
 This also raises the question of why is a Java class calling MQ directly and not using the MQ nodes supplied by the broker?
 
 WMB is not WAS.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | zpat | 
			  
				|  Posted: Wed Oct 15, 2014 12:48 am    Post subject: |   |  | 
		
		  |  Jedi Council
 
 
 Joined: 19 May 2001Posts: 5867
 Location: UK
 
 | 
			  
				| I have seen this happen, when developers who know Java and are untrained in WMB - completely mis-understand the nature of WMB and call Java classes to read queues, write files, access databases etc. 
 Almost comical if it wasn't true. I wish I could disable Java in WMB.
 _________________
 Well, I don't think there is any question about it. It can only be attributable to human error. This sort of thing has cropped up before, and it has always been due to human error.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | joebuckeye | 
			  
				|  Posted: Wed Oct 15, 2014 4:56 am    Post subject: |   |  | 
		
		  |  Partisan
 
 
 Joined: 24 Aug 2007Posts: 365
 Location: Columbus, OH
 
 | 
			  
				| 
   
	| zpat wrote: |  
	| I wish I could disable Java in WMB. |  
 
   
 Or only let people who code in Java on WMB if they learned Java after they learned WMB.
 
 We've cut down on this by greatly restricting what goes into the shared-classes directory.  Not perfect but a start.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | Vitor | 
			  
				|  Posted: Wed Oct 15, 2014 5:22 am    Post subject: |   |  | 
		
		  |  Grand High Poobah
 
 
 Joined: 11 Nov 2005Posts: 26093
 Location: Texas, USA
 
 | 
			  
				| 
   
	| joebuckeye wrote: |  
	| We've cut down on this by greatly restricting what goes into the shared-classes directory.  Not perfect but a start. |  
 I ban the use of shared-classes by people who are not on my team, and ensured my team are fully aware of my views on Java.
 
 We also flag bar files that contain jar files as they go through our auto-deploy process for review, and scan EGs for deployed jar files as I adhere to the "trust but verify" principle with our deploy process.
 
 Still not perfect by any means, but they won't let me do what I wanted to do. Something about it being a felony in Ohio & our insurance not covering it.
 _________________
 Honesty is the best policy.
 Insanity is the best defence.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  |  |