| Author | 
		  Message
		 | 
		
		  | tvr | 
		  
		    
			  
				 Posted: Thu Apr 20, 2006 6:47 am    Post subject: error 2018 - No Handle | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 20 Apr 2006 Posts: 10
  
  | 
		  
		    
			  
				When trying to place a message to a queue, getting an error 2018 on Tru 64 compaq using MQ 5.1 and Compaq C++ V6.5-014.  Basically we use a wrapper class that connects to qmgr and all queues.  I created a global object of that wrapper class where it succefully esatblised connection to qmgr and all of  the queues and was able to put the message into queue immediately after the wrapper class object creation. Down the line, iam using  same global object  in another file to put the message into queue but it failed with error 2018. BTW,  before placing the messge i checked for connection which seems to be  good but somehow handle is lost, any clues?
 
 
Thanks
 
Vinod | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | wschutz | 
		  
		    
			  
				 Posted: Thu Apr 20, 2006 7:00 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Knight
 
 Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired) 
  | 
		  
		    
			  
				
   
	| Quote: | 
   
  
	Down the line, iam using same global object in another file to put the message into queue but it failed with error 2018. BTW, before placing the messge i checked for connection which seems to be good but somehow handle is lost, any clues? 
 
 | 
   
 
What does "down the line" mean here?  Is this the same process / thread where you created the connection to the qmgr? _________________ -wayne | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | jefflowrey | 
		  
		    
			  
				 Posted: Thu Apr 20, 2006 7:00 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Grand Poobah
 
 Joined: 16 Oct 2002 Posts: 19981
  
  | 
		  
		    
			  
				You can't share handles between threads in MQ v5.1 _________________ I am *not* the model of the modern major general. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | tvr | 
		  
		    
			  
				 Posted: Thu Apr 20, 2006 7:06 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 20 Apr 2006 Posts: 10
  
  | 
		  
		    
			  
				| Iam sure it is a single thread application( we use vendor product API calls  and sure it doesnt do anything).  "down the line"  i mean diffrent file scope, other than the file where instance of wrapper class created. BTW, instance of teh wrapper class is global. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | jefflowrey | 
		  
		    
			  
				 Posted: Thu Apr 20, 2006 7:10 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Grand Poobah
 
 Joined: 16 Oct 2002 Posts: 19981
  
  | 
		  
		    
			  
				A 2018 basically means that the handle is not in scope in one way or another.
 
 
Or that someone else has told it to disconnect. _________________ I am *not* the model of the modern major general. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | tvr | 
		  
		    
			  
				 Posted: Thu Apr 20, 2006 7:17 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 20 Apr 2006 Posts: 10
  
  | 
		  
		    
			  
				| But Connection status is good so  how  come hanlde is out of scope? Rationle behind  global object is to establish connection at the start of the rpocess and use the same object to put messages where ever irrespective of file scope, ratther than connection/disconnection everytime i want place a message. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | mvic | 
		  
		    
			  
				 Posted: Thu Apr 20, 2006 9:05 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi
 
 Joined: 09 Mar 2004 Posts: 2080
  
  | 
		  
		    
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | tvr | 
		  
		    
			  
				 Posted: Thu Apr 20, 2006 11:47 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 20 Apr 2006 Posts: 10
  
  | 
		  
		    
			  
				Thanks for the trace pointers, mvic.
 
When i ran the trace  i guess there is a new thread on which MQPUT is attempted so MQPUT failed, new thread may be because of vendor product? BTW, I couldnt able to interpret correctly the trace output and also there is no recording of error code(2018) or error text in trace file.
 
 
snippet of trace is below 
 
.....
 
   634  30e     23639312         0           MQS MQPUT >>
 
   635  30e     23639312         0           MQS Hconn:
 
   636  30e     23639312         0           MQS Data - Length=00000004
 
   637              01000000
 
   638  30e     23639312         0           MQS Hobj:
 
   639  30e     23639312         0           MQS Data - Length=00000004
 
   640              02000000
 
   641  30e     23639312         0           MQS Msgdesc: NULL
 
   642  30e     23639312         0           MQS Putmsgopts: NULL
 
   643  30e     23639312         0           MQS Bufferlength:
 
   644  30e     23639312         0           MQS Data - Length=00000004
 
   645              15020000
 
   646  30e     23639312         0           MQS Buffer:
 
   647  30e     23639312         0           MQS NULL
 
   648  30e     23639312         0           MQS Compcode      : Output Parm
 
   649  30e     23639312         0           MQS Reason        : Output Parm
 
   650  30e     23639312         0           MQS __________
 
   651  30e     23639312         0           MQS MQPUT <<
 
   652  30e     23639312         0           MQS Hconn         : Input  Parm
 
   653  30e     23639312         0           MQS Hobj          : Input  Parm
 
   654  30e     23639312         0           MQS Msgdesc: NULL
 
   655  30e     23639312         0           MQS Putmsgopts: NULL
 
   656  30e     23639312         0           MQS Bufferlength  : Input  Parm
 
   657  30e     23639312         0           MQS Buffer        : Input  Parm
 
   658  30e     23639312         0           MQS Compcode:
 
   659  30e     23639312         0           MQS Data - Length=00000004
 
   660              02000000
 
   661  30e     23639312         0           MQS Reason:
 
   662  30e     23639312         0           MQS Data - Length=00000004
 
   663              E2070000
 
   664  30e     23640340         1026        MQS __________
 
  665  30e     23640340         0           MQS MQBACK >>
 
   666  30e     23640340         0           MQS Hconn:
 
   667  30e     23640340         0           MQS Data - Length=00000004
 
   668              01000000
 
   669  30e     23640340         0           MQS Compcode      : Output Parm
 
   670  30e     23640340         0           MQS Reason        : Output Parm
 
   671  30e     23640340         0           MQS __________
 
   672  30e     23640340         0           MQS MQBACK <<
 
   673  30e     23640340         0           MQS Hconn         : Input  Parm
 
   674  30e     23640340         0           MQS Compcode:
 
   675  30e     23640340         0           MQS Data - Length=00000004
 
   676              02000000
 
   677  30e     23640340         0           MQS Reason:
 
   678  30e     23640340         0           MQS Data - Length=00000004 | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | wschutz | 
		  
		    
			  
				 Posted: Thu Apr 20, 2006 11:52 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Knight
 
 Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired) 
  | 
		  
		    
			  
				Sure there is:
 
   
	| Quote: | 
   
  
	662 30e 23639312 0 MQS Data - Length=00000004 
 
663 E2070000 
 
664 30e 23640340 1026 MQS __________ 
 
 | 
   
 
E207 -> 0x07E2 -> 2018 (decimal) _________________ -wayne | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | mvic | 
		  
		    
			  
				 Posted: Thu Apr 20, 2006 11:57 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi
 
 Joined: 09 Mar 2004 Posts: 2080
  
  | 
		  
		    
			  
				
   
	| tvr wrote: | 
   
  
	634  30e     23639312         0           MQS MQPUT >>
 
   635  30e     23639312         0           MQS Hconn:
 
   636  30e     23639312         0           MQS Data - Length=00000004
 
   637              01000000
 
   638  30e     23639312         0           MQS Hobj:
 
   639  30e     23639312         0           MQS Data - Length=00000004
 
   640              02000000
 
   641  30e     23639312         0           MQS Msgdesc: NULL
 
   642  30e     23639312         0           MQS Putmsgopts: NULL
 
   643  30e     23639312         0           MQS Bufferlength:
 
   644  30e     23639312         0           MQS Data - Length=00000004
 
   645              15020000
 
   646  30e     23639312         0           MQS Buffer:
 
   647  30e     23639312         0           MQS NULL
 
   648  30e     23639312         0           MQS Compcode      : Output Parm
 
   649  30e     23639312         0           MQS Reason        : Output Parm
 
   650  30e     23639312         0           MQS __________
 
   651  30e     23639312         0           MQS MQPUT <<
 
   652  30e     23639312         0           MQS Hconn         : Input  Parm
 
   653  30e     23639312         0           MQS Hobj          : Input  Parm
 
   654  30e     23639312         0           MQS Msgdesc: NULL
 
   655  30e     23639312         0           MQS Putmsgopts: NULL
 
   656  30e     23639312         0           MQS Bufferlength  : Input  Parm
 
   657  30e     23639312         0           MQS Buffer        : Input  Parm
 
   658  30e     23639312         0           MQS Compcode:
 
   659  30e     23639312         0           MQS Data - Length=00000004
 
   660              02000000
 
   661  30e     23639312         0           MQS Reason:
 
   662  30e     23639312         0           MQS Data - Length=00000004
 
   663              E2070000 | 
   
 
 
Good work tvr.  Note the last bit in bold - that's the 0x7E2 in a little-endian byte ordering; 0x7E2 == 2018 == MQRC_HCONN_ERROR.  The trace is much less readable than 6.0 or 5.3 versions of MQ, which is good for users of 6.0 and 5.3 but not so good for this 5.1 system    
 
 
The thing to do now is return to the trace and search for 01000000 when it appears as output from MQCONN.  Check what thread ID that MQCONN call was made on.
 
 
I think the 23639312 and 23640340 are thread IDs (note even in the above trace snippet we have 2 calls for the same hConn on 2 threads - not allowed in 5.1 to the best of my recollection (and jefflowrey's)). | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | tvr | 
		  
		    
			  
				 Posted: Thu Apr 20, 2006 12:22 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 20 Apr 2006 Posts: 10
  
  | 
		  
		    
			  
				30e     0                0          MQS _____________
 
30e     0                0          MQS MQCONN(X) <<
 
30e     0                0          MQS Name          : Input  Parm
 
30e     0                0          MQS Hconn:
 
30e     0                0          MQS Data - Length=00000004
 
            01000000
 
30e     0                0          MQS ConnectOpts: NULL
 
30e     0                0          MQS Compcode:
 
30e     0                0          MQS Data - Length=00000004
 
            00000000
 
30e     0                0          MQS Reason:
 
[b]30e     1026    [/b]    1026       MQS Data - Length=00000004
 
            00000000
 
30d     1026             0          MQS API Exit.. 1115773.1 MQCONN rc=00000000
 
30d     1026             0          MQS API Entry. 1115773.1 MQOPEN
 
30e     1026             0          MQS __________
 
30e     1026             0          MQS MQOPEN >>
 
30e     1026             0          MQS Hconn:
 
30e     1026             0          MQS Data - Length=00000004
 
            01000000
 
30e     1026             0          MQS Objdesc:
 
30e     1026             0          MQS Data - Length=00000158
 
............
 
............
 
............
 
............
 
            50E32240 01000000 00E02240 01000000 Pã"@^A    à"@^A   
 
            00000000 00000000 
 
30e     1026             0          MQS Options:
 
30e     1026             0          MQS Data - Length=00000004
 
            32000000 
 
30e     1026             0          MQS Hobj          : Output Parm
 
30e     1026             0          MQS Compcode      : Output Parm
 
30e     1026             0          MQS Reason        : Output Parm
 
30e     14361            13335      MQS __________
 
[b]30e     14361  [/b]          0          MQS MQOPEN <<
 
30e     14361            0          MQS Hconn         : Input  Parm
 
30e     14361            0          MQS Objdesc:
 
30e     14361            0          MQS Data - Length=00000158
 
...
 
 
are you sure on the thread id's from the trace output? above trace snippet has calls to qmgr open and  queue open which has 1026 and 14362  as thred id's respectively so wondering? | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | mvic | 
		  
		    
			  
				 Posted: Thu Apr 20, 2006 12:28 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi
 
 Joined: 09 Mar 2004 Posts: 2080
  
  | 
		  
		    
			  
				Well I have to admit I am probably wrong about the thread IDs.    The latest trace snippet makes it look as if that number is an ever-increasing value, starting at 0.
 
 
OK so if there is doubt about the thread being wrong, how about looking for an MQDISC in the trace?  If the hConn 01000000 has been disconnected, this would be a valid reason why it was then unusable on further MQI calls.
 
 
I am out of ideas if this isn't explained by an MQDISC. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | tvr | 
		  
		    
			  
				 Posted: Thu Apr 20, 2006 12:56 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 20 Apr 2006 Posts: 10
  
  | 
		  
		    
			  
				Trace doesnt have MQDISC    . 
 
any new MQ version for Tru64  other than 5.1? | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |