-
Notifications
You must be signed in to change notification settings - Fork 52
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
Transport endpoint is not connected #89
Comments
Do you see any related log messages on the Logstash server? Do you know if this happened already before 2.7.0? If possible either downgrade to 2.6.0 or set |
I tried this solution by the following lines:
but still getting this error:
function: _safe_log_impl Using Debian trixie-slim with sqlite3 installed and python 3.11.6 |
Unfortunately, Anyway, I just reread the OP and noticed the second exception "BrokenPipeError: [Errno 32] Broken pipe". I think this is main problem and the "OSError: [Errno 107] Transport endpoint is not connected" is only a follow up error when trying to close the connection. Still, this won't solve the broken pipe errors. I'm pretty sure this is not caused by the code but by the network connection on your side. |
I have the same issue in a docker environment. Interestingly the errors do not stop even when the logstash container gets back up. Is there any workaround until a fix is delivered?
|
I have no workaround yet except restarting the application.
This sounds like you know when it happens? Is it just an unavailable Logstash server? I hope I will find time to fix it next week. |
Yes, I control both containers, so I could reset the ones dependent on Logstash. It's a matter of resilience and flexibility I guess ;)
Please do :) |
We think this happens because socket not properly closing with _close(), because socket already closed and sending We fixed with try...finally for us in out transport:
ways for reproduce:
|
This prevents re-using a possibly non-working socket instance in later send attempts which cannot work. Closes #89.
@izverev thanks for the investigation and steps to reproduce. I added basically your change in #92. The errors are still thrown when trying to close a broken or not connected socket connection but it will recover the next time as the socket instance is dropped instead of re-used. @izverev @x0zzz @OliverNickel @calee88 it would be great if you could test it. |
I can confirm that it works - more or less. It still keeps spamming the error message
Maybe because we are using UDP?
|
I did not suppress the error only the handling of it so that the
I think UDP/TCP does not matter here, the code is the same for both protocols. |
I'm getting "OSError: [Errno 107] Transport endpoint is not connected" every 30 seconds. It is interesting because, the messages are logged in logstash index. Is it possible that the endpoint is not connected and still logging the message? And other messages seem to be logged as well. Here is the stack trace:
function name: _safe_log_impl
path: logstash_async/worker.py
logstash_async_version: 2.7.2
The text was updated successfully, but these errors were encountered: