dotnet / eShop

A reference .NET application implementing an eCommerce site
MIT License
5.93k stars 1.73k forks source link

[WebToolsE2E][Aspire] After running the eshop.web solution, some rabbitMQ error logs appeared in the structured logs: "Unexpected connection closure: AMQP close-reason." #66

Open v-sherryfan opened 11 months ago

v-sherryfan commented 11 months ago

INSTALL STEPS

  1. Clean machine: Win11 x64 23h2 ENU
  2. Install VS 17.9 P1 from build [34309.102.d17.9]
  3. Install latest 8.0 SDK: 8.0.100
  4. Apply NuGet Feeds
  5. Install Docker Desktop

REPRO STEPS

  1. In the VS, clone the eShop repository and open eShop.Web.slnf
  2. F5 / Ctrl-F5
  3. There are some rabbitMQ error logs 'Unexpected connection closure: AMQP close-reason' in Structured Logs

ACTUAL Unexpected connection closure: AMQP close-reason, initiated by Library, code=0, text='End of stream', classId=0, methodId=0, cause=System.IO.EndOfStreamException: Reached the end of the stream. Possible authentication failure. at RabbitMQ.Client.Impl.InboundFrame.ReadFrom(Stream reader, Byte[] frameHeaderBuffer, ArrayPool`1 pool, UInt32 maxMessageSize) at RabbitMQ.Client.Impl.SocketFrameHandler.ReadFrame() at RabbitMQ.Client.Framing.Impl.Connection.MainLoopIteration() at RabbitMQ.Client.Framing.Impl.Connection.MainLoop() image

EXPECTED There are no errors in Structured Logs.

eerhardt commented 11 months ago

This is the same issue that @karolz-ms discusses here: https://github.com/dotnet/eShop/issues/42#issuecomment-1797016309. The proxy allows the connection, and then closes it. The client library (rightfully) logs this as an error because it doesn't expect the connection to be closed right after it is opened.