Hello all, I’m having an issue with smbd monitoring and hopefully you can help.
I’m monitoring smbd performance with netdata. Everything works as expected except that every 2 seconds (my update frequency), samba logs an error.
I dont hink it’s relevant, but the error itself is
…/…/source3/winbindd/winbindd_getgroups.c:259(winbindd_getgroups_recv)
Could not convert sid S-0-0: NT_STATUS_NONE_MAPPED
I’ve tracked it down to netdata since disabling netdata stops the error. Even disabling the python plugin or just the smbd module stops the error.
I thought that the error might come from smbstatus, but running smbstatus -P as root does not produce the error. However, running sudo smbstatus -P as netdata user does produce the error.
Also running ./python.d.plugin samba debug trace as netdata does produce the error, but not if I run it as root directly.
I’m not really fluent in python, but I can read and google, so I was hopping you could point me in some direction to debug this, specifically explaining in some detail how the smbd monitoring plugin works.
I’ve also asked for help in the samba community, but I’m not sure how they can help.
My system is running netdata v1.42.0-309-nightly on debian bullseye as a child node on a VM under proxmox 7.4. Samba file server version is 4.17.9.
As a final note, this is more a (really bad) nuisance than an error. Everything actually works as expected except that the samba logs become utterly useless.
Any help is appreciated,
Best regards
CJ
Hi @Carlos_Jesus
Indeed it’s a weird problem as you describe it. I’ll try to replicate this and see if I can find something, will let you know.
Thanks!
Hei @Manolis_Vasilakis,
thanks for your reply.
I think I’ve discovered a little bit more.
It seems that running smbstatus -P as root is ok, but running sudo smbstatus -P as netdata gives the error. I can replicate this on my system flawlessly.
It seems like a dead end.
Manolis Vasilakis via Netdata Community Forums <notifications@netdata2.discoursemail.com> escreveu no dia segunda, 9/10/2023 à(s) 09:58:
Hi Carlos.
Thanks for the update. Does it happen with another user in your system? (To check if it’s something specific about the netdata user). ?
Very good question.
It happens with all users either local or domain users. It’s not user netdata related
Manolis Vasilakis via Netdata Community Forums <notifications@netdata2.discoursemail.com> escreveu no dia terça, 10/10/2023 à(s) 09:59:
Sometime this could be the result of an e.g. environmental variable that exists in root but not with sudo.
But I would guess something with the samba configuration…
It is a possibility. I’ll try that path.
I was wondering if you were able to reproduce this. There aren’t many people monitoring samba file servers with netdata so I couldn’t find if it is something related to my system or something more general.
Best regards
Manolis Vasilakis via Netdata Community Forums <notifications@netdata2.discoursemail.com> escreveu no dia quarta, 11/10/2023 à(s) 09:13:
I tried with Ubuntu and Debian, but in both cases it seems the stock samba package is not compiled with profiling support.
I will try likely on a gentoo system that I can compile from source with profiling enabled.
Tried on the gentoo, but can not reproduce it. Though of course with not much configuration…
Thanks for trying!
I’ll try to set up a few VM’s with different configurations and see if it is all reproducible. If I find something, I’ll post back.
Again,Thanks fo the help
Manolis Vasilakis via Netdata Community Forums <notifications@netdata2.discoursemail.com> escreveu no dia quarta, 11/10/2023 à(s) 12:19: