MORILLO Jordi
2018-Apr-27 08:11 UTC
[Samba] samba-tool ntacl sysvolcheck -> Too many open files
I just realize that i can't run a "samba-tool ntacl sysvolcheck" on my DC's (4.7.6): ldb: unable to open modules directory '/usr/lib/x86_64-linux-gnu/ldb/modules/ldb' - Too many open files ldb: unable to open modules directory '/usr/lib/x86_64-linux-gnu/samba/ldb' - Too many open files .....>From memory, it was just fine on samba 4.6If I check system processes and daemons (other than samba), they are using Soft Limit 1024 and Hard Limit 4096 (system default) All samba processes have been upraised by system init script (thanks Tranquil.it packages): dnsupdate Max open files 16384 16384 files cldap_server Max open files 16384 16384 files rpc_server Max open files 16384 16384 files winbind_server Max open files 270 16384 files kdc_server Max open files 16384 16384 files notify-daemon Max open files 16384 16384 files ldap_server Max open files 16384 16384 files kccsrv Max open files 16384 16384 files dreplsrv Max open files 16384 16384 files dnssrv Max open files 16384 16384 files However, if I run samba-tools ntacl sysvolcheck or reset, they are using system default (Soft Limit 1024) and sysvolcheck failed (not sysvolreset) A quick solution is to run "ulimit -n 16384 && samba-tool ntacl sysvolcheck" A deeper solution will be to play with /etc/security/limits.conf or other.... Best regards
L.P.H. van Belle
2018-Apr-30 07:01 UTC
[Samba] samba-tool ntacl sysvolcheck -> Too many open files
> 16384 16384 files > > However, if I run samba-tools ntacl sysvolcheck or reset, > they are using system default (Soft Limit 1024) and > sysvolcheck failed (not sysvolreset) > > A quick solution is to run "ulimit -n 16384 && samba-tool > ntacl sysvolcheck" > A deeper solution will be to play with > /etc/security/limits.conf or other.... >In addiction to above, there are some systemd systems which might not use the /etc/security/limits.conf correctly. For these, edit the systemd service file(s) systemctl edit name.service ( which created the override file in /etc/systemd/system/name.service.d/override.conf _ systemctl edit --full name.service ( which created the copy of the file in /etc/systemd/system/ ) And add whats needed. [Service] LimitNOFILE=8192:16384 This is handy to have.
L.P.H. van Belle
2018-Apr-30 07:02 UTC
[Samba] samba-tool ntacl sysvolcheck -> Too many open files
Argg.. I did hit the send key combination. but here it is This is handy to have. The mappings of systemd limits to ulimit Directive ulimit equivalent Unit LimitCPU= ulimit -t Seconds LimitFSIZE= ulimit -f Bytes LimitDATA= ulimit -d Bytes LimitSTACK= ulimit -s Bytes LimitCORE= ulimit -c Bytes LimitRSS= ulimit -m Bytes LimitNOFILE= ulimit -n Number of File Descriptors LimitAS= ulimit -v Bytes LimitNPROC= ulimit -u Number of Processes LimitMEMLOCK= ulimit -l Bytes LimitLOCKS= ulimit -x Number of Locks LimitSIGPENDING= ulimit -i Number of Queued Signals LimitMSGQUEUE= ulimit -q Bytes LimitNICE= ulimit -e Nice Level LimitRTPRIO= ulimit -r Realtime Priority LimitRTTIME= No equivalent If a ulimit is set to 'unlimited' set it to 'infinity' in the systemd config ulimit -c unlimited = LimitCORE=infinity ulimit -v unlimited = LimitAS=infinity ulimit -m unlimited = LimitRSS=infinity Greetz, Louis> -----Oorspronkelijk bericht----- > Van: L.P.H. van Belle [mailto:belle at bazuin.nl] > Verzonden: maandag 30 april 2018 9:01 > Aan: 'samba at lists.samba.org' > Onderwerp: RE: [Samba] samba-tool ntacl sysvolcheck -> Too > many open files > > > > 16384 16384 files > > > > However, if I run samba-tools ntacl sysvolcheck or reset, > > they are using system default (Soft Limit 1024) and > > sysvolcheck failed (not sysvolreset) > > > > A quick solution is to run "ulimit -n 16384 && samba-tool > > ntacl sysvolcheck" > > A deeper solution will be to play with > > /etc/security/limits.conf or other.... > > > > In addiction to above, there are some systemd systems which > might not use the /etc/security/limits.conf correctly. > For these, edit the systemd service file(s) > systemctl edit name.service ( which created the override > file in /etc/systemd/system/name.service.d/override.conf _ > systemctl edit --full name.service ( which created the copy > of the file in /etc/systemd/system/ ) > > And add whats needed. > > [Service] > LimitNOFILE=8192:16384 > > > This is handy to have. >