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 API Support » error 2018 - No Handle

Post new topic  Reply to topic
 error 2018 - No Handle « View previous topic :: View next topic » 
Author Message
tvr
PostPosted: Thu Apr 20, 2006 6:47 am    Post subject: error 2018 - No Handle Reply with quote

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
View user's profile Send private message
wschutz
PostPosted: Thu Apr 20, 2006 7:00 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail AIM Address
jefflowrey
PostPosted: Thu Apr 20, 2006 7:00 am    Post subject: Reply with quote

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
View user's profile Send private message
tvr
PostPosted: Thu Apr 20, 2006 7:06 am    Post subject: Reply with quote

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
View user's profile Send private message
jefflowrey
PostPosted: Thu Apr 20, 2006 7:10 am    Post subject: Reply with quote

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
View user's profile Send private message
tvr
PostPosted: Thu Apr 20, 2006 7:17 am    Post subject: Reply with quote

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
View user's profile Send private message
mvic
PostPosted: Thu Apr 20, 2006 9:05 am    Post subject: Reply with quote

Jedi

Joined: 09 Mar 2004
Posts: 2080

I suggest using API tracing to find out what hConn is really being used, and whether it was (a) used on the same thread as it should be in v5.1 or was (b) closed before it was used.

Links:
http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/topic/com.ibm.mq.amqzag.doc/hpsstc.htm
http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/topic/com.ibm.mq.amqzag.doc/strmqt.htm

Try
Code:
$ strmqtrc -m QMNAME -t api -t detail
$ # recreate problem
$ endmqtrc -m QMNAME
$ cd /var/mqm/trace
$ for afile in $.TRC ; do dspmqtrc $afile ; done

Look at the formatted trace file for the app you ran (the pid is in the file name) and search for the 2018 or 7E2 (which is the hex equivalent) or the text MQRC_HCONN_ERROR. (NB. I've not worked with MQ 5.1 for a very long time, and have no access to such an installation, so I can't check that these instructions work, sorry)
Back to top
View user's profile Send private message
tvr
PostPosted: Thu Apr 20, 2006 11:47 am    Post subject: Reply with quote

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
View user's profile Send private message
wschutz
PostPosted: Thu Apr 20, 2006 11:52 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail AIM Address
mvic
PostPosted: Thu Apr 20, 2006 11:57 am    Post subject: Reply with quote

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
View user's profile Send private message
tvr
PostPosted: Thu Apr 20, 2006 12:22 pm    Post subject: Reply with quote

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
View user's profile Send private message
mvic
PostPosted: Thu Apr 20, 2006 12:28 pm    Post subject: Reply with quote

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
View user's profile Send private message
tvr
PostPosted: Thu Apr 20, 2006 12:56 pm    Post subject: Reply with quote

Novice

Joined: 20 Apr 2006
Posts: 10

Trace doesnt have MQDISC .
any new MQ version for Tru64 other than 5.1?
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 API Support » error 2018 - No Handle
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.