-
Notifications
You must be signed in to change notification settings - Fork 593
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
7.0.0-alpha.2 - Unexpected Exception: Unable to read data from the transport connection: Connection reset by peer #1464
Comments
@plewam thank you for continuing to test the next release of this library. Some questions:
I will work on a test to reproduce this scenario. |
@plewam - if you have time, please check out my test application in this PR: https://github.com/rabbitmq/rabbitmq-dotnet-client/pull/1466/files It sets up a connection for the consumer, and a different one for the publisher. My test environment is all Windows 11 pro. I start up RabbitMQ 3.12.11 (Erlang 26.2.1) in one terminal window, then I start up a Toxiproxy server in another, and set up a proxy like this: Start server in one console:
Set up proxy in another:
Then, start up the test console application:
Let it start publishing and consuming, then abruptly kill and restore the consumer's connection this way:
You can see the consumer is eventually restored and consumes the ready messages. There must be something different in your code, can you share a runnable example? |
@lukebakken In regards to your questions:
BTW: The rmq server I connected to has version 3.11.8 and erlang 25.2.2. I can upgrade it if you want.
|
@lukebakken Is there a way to pass in a logger into the library, e.g. the https://github.com/rabbitmq/rabbitmq-stream-dotnet-client is doing that quite good. |
Unfortunately, there isn't a way to pass in a logger at this point in time. Thank you for the logs. Some more questions:
|
@plewam the next alpha will be available soon via NuGet - https://github.com/rabbitmq/rabbitmq-dotnet-client/releases/tag/v7.0.0-alpha.3 https://www.nuget.org/packages/RabbitMQ.Client/7.0.0-alpha.3 |
@lukebakken Thank you very much. As of now I have not encountered this issue again. I will deploy alpha 3 soon onto my testing environment |
@plewam thank you very much for continuing to test these alpha releases 🏅 🌟 |
@lukebakken I have to correct myself. I just today faced the issue again now (Still on alpha2). I have now upgraded to alpha3 and realised that |
Thank you! |
Hi @lukebakken, It continues to happen, however I only have it with one specific broker and the connection to it. On this broker I have set the consumer timeout globally to 3 days.
On the broker itself I see log entries like these. The last two log entries match the above error (The broker is located in Chile with a 5 hour time shift and slightly out of sync.... Thats the environment I have to work with):
Please let me know if there is any further logging I can do. If you want I can also upgrade the broker if you like to see if it goes away. |
Thanks for the information. Just to confirm, in this specific case, the connection is NOT recovered, correct? For what it's worth, the error is due to a network issue between RabbitMQ and your application. There may be a firewall that is closing the connection abruptly. |
@lukebakken Yes, the connection is NOT recovered. I have to restart my application in order to consume from the queues again. I lose no data as I have a message TTL of 2 days, but anyways I want to solve this. Sadly I have no insight into the firewall architecture to see whether this is happening or not. As it is only happening with this broker (I connect to around 20 other brokers with the same application) I suspect a specific issue and not a general one. I could do the recovering myself if you would expose the consumer tag during consumer shutdown. If I remember correctly I have requested this at some point in another issue. |
Ah yes if you can find that, it would be great. I can do some searching later on, too. |
There it is => #1433 |
Thanks! |
@plewam is there any way you can tell me what the exact |
@lukebakken My bad, I have now added all available properties from the |
No worries! I appreciate the testing you are doing! I will have another alpha release soon. |
@lukebakken, the exception occured again, see log below. It indeed is an
|
Thanks for the follow-up! |
Please see this comment where I explain how to retrieve the consumer tags during the If this doesn't meet your requirements, @plewam, please let me know. |
Discussed in #1463
Originally posted by plewam January 7, 2024
I am currently testing the 7.0.0-alpha.2 release. I have set the
AutomaticRecoveryEnabled
totrue
. During the consume of messages from my remote server my VM somehow had it's network connection interrupted for a short period of time. I use all the newasync
methods.During this short outage I receive these events from the library. Please not that these are my own logging texts.
RabbitMQ model was shutdown. ReplyText was <"Unexpected Exception: Unable to read data from the transport connection: Connection reset by peer.">
RabbitMQ consumer was cancelled. Consumer tag <"71cd2fcf-0f86-477b-86d6-c9bf0518b51e">
RabbitMQ consumer was shut down. ReplyText <"Unexpected Exception: Unable to read data from the transport connection: Connection reset by peer.">. Initiator <Library>
However I would expect the channel and consumer to automatically recover. Can somebody maybe give me some tips? Or is this issue already known?
The text was updated successfully, but these errors were encountered: