-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
python.d ERROR: unbound[local] : [Errno 57] Socket is not connected FreeBSD #6434
Comments
Hi @Duffyx
We released 1.16.0 recently
@Ferroin any ideas? |
Well, the error message isn't being issued by the module itself, so it's not something we're catching. My best guess is that something is causing it to disconnect regularly while it's collecting data and it's not reconnecting properly. Unfortunately, I have very little experience with BSD in general compared to Linux, so I'm not really sure what might be causing this. |
Yeah, the error message from the SocketService and the only place where we log it w/o additional text is netdata/collectors/python.d.plugin/python_modules/bases/FrameworkServices/SocketService.py Lines 173 to 185 in 2129880
|
Hmm... Does FreeBSD have some way for UDS listeners to explicitly disconnect clients? AFAIK, such behavior is not in POSIX (but it's not non-compliant either), and at least Linux does not allow for this, but if FreeBSD does then Unbound is probably taking advantage of it (I suspect unintentionally, they do this for framing of replies on regular TCP connections). |
Hi, I have no real knowledge about this. But lets assume FreeBSD does what you describe, could you provide a patch for that which I could test? :) |
Well, the workaround is to rewrite |
Having looked a bit deeper now, I'm not 100% certain it's something that's truly specific to FreeBSD. @Duffyx Quick question: Are you running either Netdata or Unbound (or possibly both) under Linux emulation, or are they running natively on FreeBSD? |
@Ferroin They are both running natively on FreeBSD. |
OK, figured that was probably the case but wanted to check. I'm going to set up a FreeBSD VM to try and reproduce this locally so I can poke around at the network stack and hopefully figure out what exactly is going on. Short therm though, @ilyam8's suggestion should work as a stopgap to at least stop this from flooding your log with these seemingly pointless error messages. |
I understand that this is very annoying to have |
@Ferroin Thanks for doing this! Make sure to set-up netdata monitoring unbound through a file system socket. As described in my sample config files. |
@Duffyx One last question that I forgot earlier, what version of Unbound are you using and how did you install it (ports tree, manual local build, |
Through pkg, unbound version 1.9.2 and netdata version 1.15.0. |
@Duffyx Thanks. I probably won't be able to dig too deep into this until this weekend, so you may not hear back from me until Monday about it, but but if all goes well I may actually have a fix ready by then. |
Hi @Ferroin have you had the time to take a look at this? :-) |
This adds an explicit check for the case of a socket that's already disconnected and skips logging an error message. The conditionn technically is an error, but it's one that we can recover from trivially by just doing nothing in this case (we were trying to disconnect the scoket anyway, so if it's already disconnected, we don't need to change anything). This uses Python's `errno` module so that we can detect this situation in a system-agnostic manner. Fixes netdata#6434
* Handle disconnected sockets in unbound collector. This adds an explicit check for the case of a socket that's already disconnected and skips logging an error message. The conditionn technically is an error, but it's one that we can recover from trivially by just doing nothing in this case (we were trying to disconnect the scoket anyway, so if it's already disconnected, we don't need to change anything). This uses Python's `errno` module so that we can detect this situation in a system-agnostic manner. Fixes #6434
* Handle disconnected sockets in unbound collector. This adds an explicit check for the case of a socket that's already disconnected and skips logging an error message. The conditionn technically is an error, but it's one that we can recover from trivially by just doing nothing in this case (we were trying to disconnect the scoket anyway, so if it's already disconnected, we don't need to change anything). This uses Python's `errno` module so that we can detect this situation in a system-agnostic manner. Fixes netdata#6434
* Handle disconnected sockets in unbound collector. This adds an explicit check for the case of a socket that's already disconnected and skips logging an error message. The conditionn technically is an error, but it's one that we can recover from trivially by just doing nothing in this case (we were trying to disconnect the scoket anyway, so if it's already disconnected, we don't need to change anything). This uses Python's `errno` module so that we can detect this situation in a system-agnostic manner. Fixes netdata#6434
* Handle disconnected sockets in unbound collector. This adds an explicit check for the case of a socket that's already disconnected and skips logging an error message. The conditionn technically is an error, but it's one that we can recover from trivially by just doing nothing in this case (we were trying to disconnect the scoket anyway, so if it's already disconnected, we don't need to change anything). This uses Python's `errno` module so that we can detect this situation in a system-agnostic manner. Fixes netdata#6434
Hi,
I have set-up netdata (v1.15.0) to monitor my local unbound server on FreeBSD 12 through its control socket.
My error logs are flooding every second (poll rate) with the following:
2019-07-11 19:42:51: python.d ERROR: unbound[local] : [Errno 57] Socket is not connected
2019-07-11 19:42:52: python.d ERROR: unbound[local] : [Errno 57] Socket is not connected
2019-07-11 19:42:53: python.d ERROR: unbound[local] : [Errno 57] Socket is not connected
2019-07-11 19:42:54: python.d ERROR: unbound[local] : [Errno 57] Socket is not connected
2019-07-11 19:42:55: python.d ERROR: unbound[local] : [Errno 57] Socket is not connected
2019-07-11 19:42:56: python.d ERROR: unbound[local] : [Errno 57] Socket is not connected
2019-07-11 19:42:57: python.d ERROR: unbound[local] : [Errno 57] Socket is not connected
2019-07-11 19:42:58: python.d ERROR: unbound[local] : [Errno 57] Socket is not connected
I have in unbound.conf (python.d plugin):
I have in unbound.conf:
The unbound charts are working fine, although logs are obviously flooding.
The text was updated successfully, but these errors were encountered: