Unhandled exception in RabbitMQ Client

2,821 views
Skip to first unread message

Kim Nygren

unread,
Dec 1, 2017, 2:36:44 AM12/1/17
to rabbitmq-users
During a performance test on a RabbitMQ server node with about 60 000 concurrent connection (total > 100 000 queues and users) a to the test not related Windows Service crasched.
We think that the service tried to connect to the RabbitMQ during the test when it crashed (using ConnectionFactory.CreateConnection()).

In the Windows Application Event Log we found an Error with "Source" .NET Runtime:

Application: NotificationService.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.FileNotFoundException
   at RabbitMQ.Client.ESLog.Error(System.String, System.Exception)
   at RabbitMQ.Client.Framing.Impl.Connection.LogCloseError(System.String, System.Exception)
   at RabbitMQ.Client.Framing.Impl.Connection.HandleMainLoopException(RabbitMQ.Client.ShutdownEventArgs)
   at RabbitMQ.Client.Framing.Impl.Connection.MainLoop()
   at System.Threading.ThreadHelper.ThreadStart_Context(System.Object)
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext,

System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback,

System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback,

System.Object)
   at System.Threading.ThreadHelper.ThreadStart()


We are using the latest Rabbit .NET client (NuGet package 5.0.1).
The RabbitMQ server version is 3.6.14 and Erlang version is 19.3.

OS: Windows Server 2008 R2 Standard, service pack 1
.NET Version: 4.7


What file is it that RabbitMQ needs?

Looking forward to hear from the community.
Best regards,
Kim Nygren

Karl Nilsson

unread,
Dec 1, 2017, 4:10:21 AM12/1/17
to rabbitm...@googlegroups.com
Hi,

How did you install the client?

It currently takes a dependency on Microsoft.Diagnostics.Tracing.EventSource.Redist - I have seen this error when the dependency has not been available.

Cheers
Karl

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Karl Nilsson

Pivotal/RabbitMQ

Kim Nygren

unread,
Dec 1, 2017, 4:45:50 AM12/1/17
to rabbitmq-users
Hi Karl,
We are using WiX, and yes we had missed the Microsoft.Diagnostics.Tracing.EventSource.dll.

Thank you very much!

Best Regards,
Kim Nygren
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To post to this group, send email to rabbitm...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Karl Nilsson

Pivotal/RabbitMQ

Karl Nilsson

unread,
Dec 1, 2017, 5:19:16 AM12/1/17
to rabbitm...@googlegroups.com
Great - how are you using WiX? Do you re-package the dll yourselves?

To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Karl Nilsson

Pivotal/RabbitMQ

Kim Nygren

unread,
Dec 1, 2017, 6:18:26 AM12/1/17
to rabbitmq-users
Yes, we create the install-package and reference all needed dll:s.
We haven't updated the install packages for a while and the dependency to Microsoft.Diagnostics.Tracing.EventSource.dll were not needed before (in 4.x NuGet packages).
Our wrong, we should of course have checked the dependencies after upgrading to the 5.0.1 version.
/Kim

Robert Holmes

unread,
Mar 18, 2018, 11:29:43 PM3/18/18
to rabbitmq-users
I'm also experiencing the same exception as Kim, however Microsoft.Diagnostics.Tracing.EventSource.dll is present in the installation directory. Our application always crashes when we get a ModelShutdown event with the following error code/description 541 Unexpected Exception.

Any suggestions/help appreciated.

Robert

Michael Klishin

unread,
Mar 19, 2018, 1:41:21 PM3/19/18
to rabbitm...@googlegroups.com
Hi Robert,

We cannot suggest much with the amount of information provided. At the very least consider posting the .NET client version
used, the .NET version/flavor used and a complete stack trace. Please help others help you.

To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
MK

Staff Software Engineer, Pivotal/RabbitMQ

Lodeli

unread,
Jun 8, 2018, 7:15:15 AM6/8/18
to rabbitmq-users
Hi,
same exception here, packages installed using Nuget.
On four different .NET 4.6.1 applications installed as Windows Services.
The applications are up and running , writing/reading on RabbitMQ without issues while the exception occurs.
I cannot trap it, I've found it in the EventViewer.

Just a thought.
It seems to me that the issue has been happening since I updated to the last version of RabbitMQ.Client that depends on a newer version of Microsoft.Diagnostics.Tracing.EventSource.Redist.

And, maybe it's just a coincidence, but...

Since Microsoft.Diagnostics.Tracing.EventSource.Redist is updated I'm facing exceptions in a part of my code where I try to get classes in a specific namespace:
foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies())
{
try
{
types.AddRange(assembly.GetTypes().Where(t => t.Namespace == cachesNamespace && !t.IsNested));
}
catch (ReflectionTypeLoadException) { }
}

Previously, the try/catch was not needed.
Since the update, Microsoft.Diagnostics.Tracing.EventSource.Redist is giving me ReflectionTypeLoadExceptions.

My two cents, hoping to have been useful.

Cheers,
Lodeli

Karl Nilsson

unread,
Jun 8, 2018, 7:20:33 AM6/8/18
to rabbitm...@googlegroups.com
We will remove the dependency for v6.


Cheers
Karl

--
Reply all
Reply to author
Forward
0 new messages