[Samba] NT_STATUS_TOO_MANY_OPENED_FILES

Rowland Penny rpenny at samba.org
Mon Apr 10 15:34:44 UTC 2023



On 10/04/2023 15:04, Anantha Raghava via samba wrote:
> Hello Rowland,
> 
> This is not the same machine. This machine is one of cluster of 5 
> machines and this is completely a fresh installation with RHEL 8 OS, not 
> CentOS. The segfault error is now resolved on a different server. That 
> problem got resolved once we removed the anti-virus running on RHEL 8 
> and updated the gnutls library.
> 
> There was another instance and probably you were referring to this one, 
> wherein there was wrong "netbios" name in smb.conf (Ctrl+c and Ctrl+v 
> issue!!), and that was our UAT environment. Even there the OS was RHEL 8 
> and the moment I changed the netbios name, the issue was sorted out. We 
> could successfully tested all integrations in our UAT environment before 
> we got clearance to upgrade the production environment.
> 
> This is a completely different server in production environment, a fresh 
> installation of version 4.18.1, added as an Additional domain 
> controller. Before we installed samba, we updated the RHEL 8 and then 
> compiled and installed 4.18.1.

Just checking, they sounded very similar.

> 
> Now to other questions:
> 
> *so can you tell us just how you compiled Samba:
> What packages did you install and the versions ?*
> 
> We added RHEL 8, Base, AppStream, CodeReady Linux Builder and EPEL 
> repositories and then executed dnf update command once so that we had 
> the latest repositories.
> 
> We installed all pre-requisite packages using the command given in 
> *Samba Wiki*

That may not have been enough, those lists date from a time when it 
wasn't known exactly which packages to install and were a 'best guess'.

There is however, a big heading on that page:

Packages Required to build Samba

Underneath that it says:

Verified Package Dependencies

There are then the download links to the packages required to build 
various Samba versions on different OS's

I suggest you download the bootstrap.sh for Centos 8 under the Samba 
4.15 heading

Do not bother with the 'Samba master' one, it doesn't seem to exist 
(HINT, HINT to whomever maintains the links)

There appears to be a lot more packages there, though some (if not all) 
may have been pulled in as dependencies of other packages that were 
already installed or you installed.

If there are extra packages required, you may have to recompile.

Rowland


> 
> yum install docbook-style-xsl gcc gdb gnutls-devel gpgme-devel 
> jansson-devel \
>        keyutils-libs-devel krb5-workstation libacl-devel libaio-devel \
>        libarchive-devel libattr-devel libblkid-devel libtasn1 
> libtasn1-tools \
>        libxml2-devel libxslt lmdb-devel openldap-devel pam-devel perl \
>        perl-ExtUtils-MakeMaker perl-Parse-Yapp popt-devel 
> python3-cryptography \
>        python3-dns python3-gpg python36-devel readline-devel rpcgen 
> systemd-devel \
>        tar zlib-devel
> 
> There was no error at this step.
> 
> *What commands did you run to compile Samba ? *
> 
> Configure : ./configure - No errors.
> 
> make - Reported one error - It could not find JSON.pm @INC. We added 
> this module using command "CPAN JSON" in the main folder included in 
> @INC. Post we ran ./configure & make once again and both of them 
> reported no errors
> 
> make install - Installed samba in /usr/local/samba folder - The default 
> folder. - No errors reported.
> 
> *Where there any errors during the install ? *
> 
> Only one during "make" stage that is of JSON.pm module non availability 
> @INC, details in the previous question.
> 
> Also, *"samba-tool drs showrepl" *reports no errors. Although slow on 
> this server, replication is working.
> 
> *Hardware configuration* - All 5 servers are virtual machines on 
> Nutanix, with 4 vCPU and 24 GB Memory.
> 
> Hope this gives you better clarity.
> 
> Thanks & Regards,
> 
> Raghav
> 
> DISCLAIMER:
> This e-mail communication and any attachments may be privileged and 
> confidential to Exzatech Consulting And Services Pvt. Ltd., Bangalore, 
> and are intended only for the use of the recipients named above If you 
> are not the addressee you may not copy, forward, disclose or use any 
> part of it. If you have received this message in error, please delete it 
> and all copies from your system and notify the sender immediately by 
> return e-mail. Internet communications cannot be guaranteed to be 
> timely, secure, error or virus-free. The sender does not accept 
> liability for any errors or omissions.
> 
> Do not print this e-mail unless required. Save Paper & trees.
> 
> 
> On 10/04/23 6:52 pm, Rowland Penny via samba wrote:
>>
>>
>> On 10/04/2023 13:54, Anantha Raghava via samba wrote:
>>> Hello Rowland,
>>>
>>> Find the _*smb.conf :*_
>>>
>>> [global]
>>> netbios name = DC4
>>> realm = KTKBANKLTD.COM
>>> server role = active directory domain controller
>>> workgroup = KTKBANKLTD
>>> [sysvol]
>>> path = /usr/local/samba/var/locks/sysvol
>>> read only = No
>>> [netlogon]
>>> path = /usr/local/samba/var/locks/sysvol/ktkbankltd.com/scripts
>>>        read only = No
>>>
>>> *Logs:*
>>>
>>> {"timestamp": "2023-04-10T09:52:23.323933+0530", "type": 
>>> "Authentication", "Authentication": {"version": {"major": 1, "minor": 
>>> 2}, "eventId": 4625, "logonId": "beef0000dead", "logonType": 3, 
>>> "status": "NT_STATUS_ACCOUNT_LOCKED_OUT", "localAddress": 
>>> "ipv4:172.16.202.176:49152", "remoteAddress": 
>>> "ipv4:172.16.240.40:42152", "serviceDescription": "SamLogon", 
>>> "authDescription": "network", "clientDomain": "KTKBANKLTD", 
>>> "clientAccount": "k6100", "workstation": "\\\\SHI732SAVADE04", 
>>> "becameAccount": null, "becameDomain": null, "becameSid": null, 
>>> "mappedAccount": "k6100", "mappedDomain": "KTKBANKLTD", 
>>> "netlogonComputer": "KBLDCPROXY", "netlogonTrustAccount": " 
>>> ;KBLDCPROXY$", "netlogonNegotiateFlags": "0x610FFFFF", 
>>> "netlogonSecureChannelType": 2, "netlogonTrustAccountSid": 
>>> "S-1-5-21-2327230821-3654296898-2374465889-39068", "passwordType": 
>>> "NTLMv2", "duration": 67124}}
>>> ldb: unable to open modules directory '/usr/local/samba/lib/ldb' - 
>>> Too many open files
>>> ldb: unable to open modules directory '/usr/local/samba/lib/ldb' - 
>>> Too many open files
>>> [2023/04/10 09:52:23.3 35122,  0] 
>>> ../../source4/samba/process_single.c:60(single_accept_connection)
>>>     single_accept_connection: single_accept_connection: accept: 
>>> NT_STATUS_TOO_MANY_OPENED_FILES
>>>
>>> {"timestamp": "2023-04-10T09:52:23.425118+0530", "type": 
>>> "dsdbChange", "dsdbChange": {"version": {"major": 1, "minor": 0}, 
>>> "statusCode": 0, "status": "Success", "operation": "Modify", 
>>> "remoteAddress": null, "performedAsSystem": false, "userSid": 
>>> "S-1-5-18", "dn": 
>>> "DC=HYD535NELHP04,DC=ktkbankltd.com,CN=MicrosoftDNS,DC=DomainDnsZones,DC=ktkbankltd,DC=com&q uot;, "transactionId": "b7480e24-cad6-4494-97e3-9c2195d5d46c", "sessionId": "511ad8c7-c85b-49f4-84b2-54c8d22be96d", "attributes": {"dnsRecord": {"actions": [{"action": "replace", "values": [{"base64": true, "value": "BAABAAXwAABuAAAAAAAEsAAAAADQejgArBw8DQ=="}]}]}}}}
>>>
>>> .....
>>>
>>> 393", "mappedAccount": "KOL032AMTHP01$", "mappedDomain": 
>>> "KTKBANKLTD", "netlogonComputer": null, "netlogonTrustAccount": null, 
>>> "netlogonNegotiateFlags": "0x00000000", "netlogonSecureChannelType": 0
>>> , "netlogonTrustAccountSid": null, "passwordType": 
>>> "aes256-cts-hmac-sha1-96", "duration": 100508}}
>>> ldb: unable to open modules directory '/usr/local/samba/lib/ldb' - 
>>> Too many open files
>>> ldb: unable to open modules directory '/usr/local/samba/lib/ldb' - 
>>> Too many open files
>>> [2023/04/10 10:02:25.524087,  0] 
>>> ../../lib/ldb-samba/ldb_wrap.c:79(ldb_wrap_debug)
>>>    ldb: module encrypted_secrets initialization failed : Operations 
>>> error
>>> [2023/04/10 10:02:25.524160,  0] 
>>> ../../lib/ldb-samba/ldb_wrap.c:79(ldb_wrap_debug)
>>>    ldb: module group_audit_log initialization failed : Operations error
>>> [2023/04/10 10:02:25.524203,  0] 
>>> ../../lib/ldb-samba/ldb_wrap.c:79(ldb_wrap_debug)
>>>    ldb: module repl_meta_data initialization failed : Operations error
>>> [2023/04/10 10:02:25.524220,  0] 
>>> ../../lib/ldb-samba/ldb_wrap.c:79(ldb_wrap_debug)
>>>    ldb: module subtree_delete initialization failed : Operations error
>>> [2023/04/10 10:02:25.524236,  0] 
>>> ../../lib/ldb-samba/ldb_wrap.c:79(ldb_wrap_debug)
>>>    ldb: module aclread initialization failed : Operations error
>>> [2023/04/10 10:02:25.524251,  0] 
>>> ../../lib/ldb-samba/ldb_wrap.c:79(ldb_wrap_debug)
>>>    ldb: module acl initialization failed : Operations error
>>> [2023/04/10 10:02:25.524266,  0] 
>>> ../../lib/ldb-samba/ldb_wrap.c:79(ldb_wrap_debug)
>>>    ldb: module descriptor initialization failed : Operations error
>>> [2023/04/10 10:02:25.524283,  0] 
>>> ../../lib/ldb-samba/ldb_wrap.c:79(ldb_wrap_debug)
>>>    ldb: module objectclass initialization failed : Operations error
>>> [2023/04/10 10:02:25.524298,  0] 
>>> ../../lib/ldb-samba/ldb_wrap.c:79(ldb_wrap_debug)
>>>    ldb: module audit_log initialization failed : Operations error
>>> [2023/04/10 10:02:25.524313,  0] 
>>> ../../lib/ldb-samba/ldb_wrap.c:79(ldb_wrap_debug)
>>>    ldb: module asq initialization failed : Operations error
>>> [2023/04/10 10:02:25.524330,  0] 
>>> ../../lib/ldb-samba/ldb_wrap.c:79(ldb_wrap_debug)
>>>    ldb: module server_sort initialization failed : Operations error
>>> [2023/04/10 10:02:25.524348,  0] 
>>> ../../lib/ldb-samba/ldb_wrap.c:79(ldb_wrap_debug)
>>>    ldb: module vlv initialization failed : Operations error
>>> [2023/04/10 10:02:25.524384,  0] 
>>> ../../lib/ldb-samba/ldb_wrap.c:79(ldb_wrap_debug)
>>>    ldb: module dsdb_paged_results initialization failed : Operations 
>>> error
>>> [2023/04/10 10:02:25.524400,  0] 
>>> ../../lib/ldb-samba/ldb_wrap.c:79(ldb_wrap_debug)
>>>    ldb: module dirsync initialization failed : Operations error
>>> [2023/04/10 10:02:25.524415,  0] 
>>> ../../lib/ldb-samba/ldb_wrap.c:79(ldb_wrap_debug)
>>>    ldb: module schema_load initialization failed : Operations error
>>> [2023/04/10 10:02:25.524429,  0] 
>>> ../../lib/ldb-samba/ldb_wrap.c:79(ldb_wrap_debug)
>>>    ldb: module dsdb_notification initialization failed : Operations 
>>> error
>>> [2023/04/10 10:02:25.524467,  0] 
>>> ../../lib/ldb-samba/ldb_wrap.c:79(ldb_wrap_debug)
>>>    ldb: module rootdse initialization failed : Operations error
>>> [2023/04/10 10:02:25.524517,  0] 
>>> ../../lib/ldb-samba/ldb_wrap.c:79(ldb_wrap_debug)
>>>    ldb: module samba_dsdb initialization failed : Operations error
>>> [2023/04/10 10:02:25.524536,  0] 
>>> ../../lib/ldb-samba/ldb_wrap.c:79(ldb_wrap_debug)
>>>    ldb: Unable to load modules for /usr/local/samba/private/sam.ldb: 
>>> Error (24) Too many open files - Opening encrypted_secrets key file
>>> ldb: unable to open modules directory '/usr/local/samba/lib/ldb' - 
>>> Too many open files
>>> ldb: unable to open modules directory '/usr/local/samba/lib/ldb' - 
>>> Too many open files
>>> [2023/04/10 10:02:25.525008,  1] 
>>> ../../lib/ldb-samba/ldb_wrap.c:79(ldb_wrap_debug)
>>>
>>
>> I am going out on a flyer here, these are the same machines that you 
>> had a problem with last week, aren't they ?
>>
>> Did you fix that problem before upgrading ?
>> Or is this your attempt to fix the problem ?
>>
>> It looks to me that you have an ldb problem.
>> I know that you are running Centos 8, does this mean Centos Stream.
>>
>> so can you tell us just how you compiled Samba:
>> What packages did you install and the versions ?
>> What commands did you run to compile Samba ?
>> Where there any errors during the install ?
>>
>> Rowland
>>
>>



More information about the samba mailing list