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 » Unhandled exception from amqmdnet.dll 1.0.0.3

Post new topic  Reply to topic
 Unhandled exception from amqmdnet.dll 1.0.0.3 « View previous topic :: View next topic » 
Author Message
dkdk
PostPosted: Wed Mar 18, 2009 5:09 am    Post subject: Unhandled exception from amqmdnet.dll 1.0.0.3 Reply with quote

Newbie

Joined: 18 Mar 2009
Posts: 5

I use standart approach to get message from queue utilizing MQQueueManager and MQQueue classes. This works perfect until physical connection to MQ server is broken. In such case I get unhandled exception which I can't handle. I believe that this exception happens in internal threads of amqmdnet.dll and doesn't get handled. This leads to whole process crush. Are there any workarounds?

Exception:
Type : IBM.WMQ.MQException, amqmdnet, Version=1.0.0.3, Culture=neutral, PublicKeyToken=dd3cb1c9aae9ec97
Message : Error in the application.
Source : amqmdnet
Help link :
ReasonCode : 2009
Reason : 2009
CompletionCode : 2
CompCode : 2
Data : System.Collections.ListDictionaryInternal
TargetSite : Void throwNewMQException(Int32, Int32)
Stack Trace : at IBM.WMQ.MQBaseObject.throwNewMQException(Int32 compCode, Int32 reason)
at IBM.WMQ.MQQueueManager.Disconnect()
at IBM.WMQ.MQQueueManager.Finalize()
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Mar 18, 2009 5:19 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Why do you think it can't be handled?

Did you put in a handler for MQExceptions?
Back to top
View user's profile Send private message
dkdk
PostPosted: Wed Mar 18, 2009 9:33 am    Post subject: Reply with quote

Newbie

Joined: 18 Mar 2009
Posts: 5

It can't be handled by my code because it is UNHANDLED exception that happens somewhere inside amqmnet.dll in different thread right after I turn off ethernet connection. It appears that amqmnet.dll tries to close already closed connection. I catch this exception in AppDomain's handler for unhandled exceptions. And of course I put a handler for MQExceptions )))
BTW, you can test it by yourself. I faced this problem in unstable ethernet wire: applications that send and receive messages just die. In stable wires everything is ok
Back to top
View user's profile Send private message
dkdk
PostPosted: Fri Mar 20, 2009 7:10 am    Post subject: Reply with quote

Newbie

Joined: 18 Mar 2009
Posts: 5

MQ developers, can you say something? Not only me faced with this problem. Are there any newer versions of this library?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sat Mar 21, 2009 8:54 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

dkdk wrote:
MQ developers, can you say something? Not only me faced with this problem. Are there any newer versions of this library?

an exception is UNHANDLED because
It is not part of a try catch block that would handle this exception. Remember sometimes you need to add a catch all, not just catch parts for known exceptions.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
dkdk
PostPosted: Sun Mar 22, 2009 9:58 pm    Post subject: Reply with quote

Newbie

Joined: 18 Mar 2009
Posts: 5

fjb_saper wrote:

an exception is UNHANDLED because
It is not part of a try catch block that would handle this exception. Remember sometimes you need to add a catch all, not just catch parts for known exceptions.

I catch ALL exceptions in general catch(Exception) block at very high level
Please, try it by yourself: just unplug ethernet cable during scanning and you'll get unhandled exception
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Mar 23, 2009 1:13 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

dkdk wrote:
Please, try it by yourself: just unplug ethernet cable during scanning and you'll get unhandled exception


No, I don't.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Mar 23, 2009 8:11 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Are you also catching System.Exceptions? I believe all system exceptions need to be trapped specifically in .NET and are not part of your run of the mill exception. Any problems with the tcp/ip stack could fall under that category...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
dkdk
PostPosted: Mon Mar 23, 2009 8:18 pm    Post subject: Reply with quote

Newbie

Joined: 18 Mar 2009
Posts: 5

fjb_saper wrote:
Are you also catching System.Exceptions?

Of course I catch System.Exceptions! I catch everything and everywhere
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Mar 23, 2009 8:33 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

dkdk wrote:
fjb_saper wrote:
Are you also catching System.Exceptions?

Of course I catch System.Exceptions! I catch everything and everywhere

In that case you need to contact Microsoft. Clearly something is wrong in their implementation if you still receive an unhandled exception
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
axiombender
PostPosted: Tue Apr 28, 2009 6:45 pm    Post subject: Managed Cliend Exception 2009 Reply with quote

Newbie

Joined: 28 Apr 2009
Posts: 2

Hi. I am wondering if the solution to this issue was ever worked out. I have one component (web service) that is just an initiator and it is working fine. The second component (Windows service) has 2 listeners and 1 initiator. The latter component worked well also when it was running on a separate machine but now that the 2 components are running on the same machine they are logging intermittent Exception 2009 entries. It does not seem to matter whether or not I am actually sending messages, the errors show up at unpredictable times and in pairs of 2... I am thinking for the 2 listeners. I tried MQNOREMPOOL=1 to no avail. Do I need to specify ports or other configurations differently now that the 2 instances are running on the same machine?

I am using V6 Managed Client configuration on Windows Server 2003 SP2. I am running each listener on a separate thread and my initiator on the main thread.

Thanks in advance!
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Apr 28, 2009 7:47 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Look up error codes for 2009. This is more likely an environmental issue and could also be triggered by tcp/ip collisions... Have fun solving it
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
axiombender
PostPosted: Wed Apr 29, 2009 9:22 am    Post subject: Reply with quote

Newbie

Joined: 28 Apr 2009
Posts: 2

Thanks, saper. The 2009 error either disappeared when I changed a lock in my code or it is currently being eclipsed by the 10038 X('2736') error I am getting intermittently. I sent a message and received quite a few back from a tool built for us by a consultancy. The data was correct but 21 minutes later I received 12 identical 10038 X('2736') errors. I was thinking maybe this had something to do with heartbeat or keepalive settings.

My architecture also involves 2 listeners on different threads in 1 application and 1 listener in another application on the same server, all of which use MQC.MQWI_UNLIMITED to wait for messages, so I am wondering if there could be any traffic conflict there.

Any ideas?

Thanks!
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Apr 29, 2009 8:17 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Quote:
I received 12 identical 10038 X('2736') errors

Are you sure that those errors are produced by MQ?
I could not find this error there

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
gunter
PostPosted: Wed Apr 29, 2009 11:54 pm    Post subject: Reply with quote

Partisan

Joined: 21 Jan 2004
Posts: 307
Location: Germany, Frankfurt

Quote:
Quote:
Quote:
I received 12 identical 10038 X('2736') errors


Are you sure that those errors are produced by MQ?
I could not find this error there


Maybe it's a Socket error (#10038): Socket operation on nonsocket.
_________________
Gunter Jeschawitz
IBM Certified System Administrator - Websphere MQ, 5.3
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 » Unhandled exception from amqmdnet.dll 1.0.0.3
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.