[Samba] open failed (Too many open files in system)

Dan Tappin dan at orourke.ca
Fri Mar 11 16:22:30 GMT 2005

I am running Samba 3.0.5 on OS X 10.3.8 Server.  It's the stock Samba 
supplied by Apple with no modifications.  I am running a variety of 
shares on the system to around 50 PC clients.

I came into the office this morning with a dead Xserve... could not 
login, could not ping or ssh into the system.  Users in the office 
could not even browse the network.  When they tried to browse the 
workgroup (which includes other native local shared folders on users 
PC) they received the resource not found error from Windows.

We are set-up with non-pdc shares in a normal single subnet and singe 
workgroup 'OROURKE'.  My logs rolled before I could dig back earlier in 
the morning but this was the first sign in my smbd logs:

[2005/03/11 08:21:05, 0] 
   tdb(/private/var/samba/registry.tdb): tdb_reopen: open failed (Too 
many open files in system)

and syslog:

Mar 11 03:15:02 xserve1 syslogd: restart
Mar 11 07:05:52 xserve1 kernel: file: table is full
Mar 11 07:06:10 xserve1 last message repeated 3 times

<< repeats >>

Mar 11 15:15:07 xserve1 /usr/sbin/snmpd: warning: cannot open 
/etc/hosts.allow: Too many open files in system
Mar 11 08:15:15 xserve1 kernel: file: table is full
Mar 11 08:15:43 xserve1 last message repeated 3 times

<< repeats >>

Mar 11 08:27:28 localhost syslogd: restart	// I manually restarted the 
at this point

Also to add to it my MRTG plots show some strange data:


This is from a simple script that parses the smbstatus output and 
counts the number of smb connections to the Xserve.  The flatline @ 4 
AM is the odd part.  The value roughly matches the number of PC's in 
the office and the office is empty at this point.

This with the network issue when I came in this morning makes me pretty 
sure it's a samba related issue.  My [global] smb.conf entries are 


         getwd cache = yes
         log level = 2
         display charset = UTF-8-MAC
         print command = /usr/sbin/PrintServiceAccess printps %p %s
         lprm command = /usr/sbin/PrintServiceAccess remove %p %j
         security = user
         guest account = unknown
         encrypt passwords = yes
         printing = BSD
         allow trusted domains = no
         preferred master = yes
         lppause command = /usr/sbin/PrintServiceAccess hold %p %j
         netbios name = fileserver
         wins support = no
         add machine script = /usr/bin/opendirectorypdbconfig -c 
create_computer_account -r %u -n "/LDAPv3/"
         max smbd processes = 0
         printcap =
         server string = Apple Xserve / RAID
         lpresume command = /usr/sbin/PrintServiceAccess release %p %j
         logon drive = H:
         client ntlmv2 auth = no
         domain logons = yes
         lpq command = /usr/sbin/PrintServiceAccess jobs %p
         admin users = @admin
         passdb backend = opendirectorysam guest
         unix charset = UTF-8-MAC
         dos charset = CP437
         auth methods = guest opendirectory
         local master = yes
         use spnego = no
         domain master = yes
         logon path = \\%N\profiles\%u
         printer admin = @admin, @staff
         map to guest = Never
         workgroup = OROURKE

More information about the samba mailing list