Author |
Message
|
dkdk |
Posted: Wed Mar 18, 2009 5:09 am Post subject: Unhandled exception from amqmdnet.dll 1.0.0.3 |
|
|
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 |
|
 |
mqjeff |
Posted: Wed Mar 18, 2009 5:19 am Post subject: |
|
|
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 |
|
 |
dkdk |
Posted: Wed Mar 18, 2009 9:33 am Post subject: |
|
|
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 |
|
 |
dkdk |
Posted: Fri Mar 20, 2009 7:10 am Post subject: |
|
|
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 |
|
 |
fjb_saper |
Posted: Sat Mar 21, 2009 8:54 am Post subject: |
|
|
 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 |
|
 |
dkdk |
Posted: Sun Mar 22, 2009 9:58 pm Post subject: |
|
|
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 |
|
 |
Vitor |
Posted: Mon Mar 23, 2009 1:13 am Post subject: |
|
|
 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 |
|
 |
fjb_saper |
Posted: Mon Mar 23, 2009 8:11 pm Post subject: |
|
|
 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 |
|
 |
dkdk |
Posted: Mon Mar 23, 2009 8:18 pm Post subject: |
|
|
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 |
|
 |
fjb_saper |
Posted: Mon Mar 23, 2009 8:33 pm Post subject: |
|
|
 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 |
|
 |
axiombender |
Posted: Tue Apr 28, 2009 6:45 pm Post subject: Managed Cliend Exception 2009 |
|
|
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 |
|
 |
fjb_saper |
Posted: Tue Apr 28, 2009 7:47 pm Post subject: |
|
|
 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 |
|
 |
axiombender |
Posted: Wed Apr 29, 2009 9:22 am Post subject: |
|
|
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 |
|
 |
fjb_saper |
Posted: Wed Apr 29, 2009 8:17 pm Post subject: |
|
|
 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 |
|
 |
gunter |
Posted: Wed Apr 29, 2009 11:54 pm Post subject: |
|
|
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 |
|
 |
|