[Samba] lib/debug.c:reopen_logs(349)

Joseph Loo jloo at acm.org
Mon May 13 07:04:04 GMT 2002

Have you tried to check the hard and soft limits for the maaximum number 
of  file descriptors associated with the account which have all the 
shares doing the map?

Per Kjetil Grotnes wrote:

>Windows 2000 sp2 with Terminal Services and Citrix 1.8 Metaframe as 'client'.
>Problem starts at 40 to 50 users logged on.  7-9 shares mapped at login.  Effect is 
>'access denied' on accessing directories restricted by group access even though 
>user has valid unix /etc/group access.
>Machine SunFire 880
>Samba 2.2.4
>Configured with "-without-winbind"
>Solaris 8  (release july 2001)
>Gcc 3.0.1 from the companion package
>Veritas Filesystem
>Precompile adjustments done due to W2Ks 'feature' of just making one connection 
>to the samba server thus making only one process per Terminal Server.
>Smbd/conn.c: #define MAX_CONNECTIONS 128
>Smbd/conn.c: #define MAX_CONNECTIONS 768
>#> plimit 17155
>17155:  /usr/local/samba/bin/smbd -D
>  resource              current         maximum
>  time(seconds)         unlimited       unlimited
>  file(blocks)          unlimited       unlimited
>  data(kbytes)          unlimited       unlimited
>  stack(kbytes)         8192            unlimited
>  coredump(blocks)      unlimited       unlimited
>  nofiles(descriptors)  10010           10010
>  vmemory(kbytes)       unlimited       unlimited
>rlim_fd_max = 4096
>rlim_fd_cur = 2048
>Log entries possibly related to this problem(?):
>When we are in the period when the errors occurs and a user logs in we get this in 
>the log:
>Æ2002/05/08 11:30:03, 0Å lib/debug.c:reopen_logs(349)
>  Unable to open new log file /usr/local/samba/var/log.smbd: Too many open files
>In lib/debug.c
>        if (append_log)
>                new_dbf = sys_fopen( debugf, "a" );
>        else
>                new_dbf = sys_fopen( debugf, "w" );
>        if (!new_dbf) æ
>                log_overflow = True;
>DEBUG(0, ("Unable to open new log file %s: %sØn", debugf, strerror(errno)));    
>                log_overflow = False;
>Which means that sys_fopen fails.  I cant fnd any documentation on sys_fopen.
>When users try to access shares where they would need their group-access rights 
>to get in there is a 'access denied' message.  In the log (log level 3) it shows:
>Æ2002/05/13 12:52:49, 3Å smbd/sec_ctx.c:set_sec_ctx(319)
>  1 user groups:
>  661
>This is wrong!  There should be at least 10 group Ids in the list for that user.  The 
>group the user need to enter the directory is not in the list somehow!  
>Note that this error happens only with shares connected with the W2K TS 
>machine and then only after a certain amount of users have logged on.
>Typically some sort of limit has been reached.. but which?   
>Our migration to W2K depends on this! *grins*
>Per Kjetil Grotnes
>IT-Seksjonen, Plan- og bygningsetaten, Oslo Kommune
>Tlf: 22 66 26 61, Fax: 22 66 26 65

Joseph Loo
jloo at acm.org

More information about the samba mailing list