Stephen Deasey wrote: > On Jan 7, 2008 10:00 AM, Neophytos Demetriou <[EMAIL PROTECTED]> wrote: >> I'm having the same problem as outlined below. >> >> Basically, the log fails to roll (and so does "ns_accesslog roll") >> eventhough the directory and the log file look good. > > > What messages appear in your error log when you try to roll a file?
[-sched-] Notice: nslog: closed '/web/log/access.8000.log' [-sched-] Error: nslog: failed: roll '/web/log/access.8000.log': 'No such file or directory' > If it's to be rolled at midnight, whether it actually rolls or not > you'd expect to see a message from the sched thread. If you don't see > it, then log rolling is not enabled. log rolling is enabled, see error messages above and, also, configuration settings below: ns_param RollDay * ns_param RollFmt %Y-%m-%d-%H:%M ns_param RollHour 0 ns_param RollOnSignal On ns_param RollLog On > If you see that but the log does not actually roll, I would expect an > error message of some sort. Looking through the code for this last > time all error paths appear to be covered by log messages. see above > Re permissions, look at the permissions of both the log files and the > directory they're in. The server needs to have permission to create a > new file under it's run-time uid/gid -- whereas at startup it creates > the file as root. ls -la /web/log/ drwxrwxr-x 2 service-phgt-0 web 20480 Jan 8 07:50 . drwxrwxr-x 5 root web 4096 Nov 15 15:17 .. -rw-r--r-- 1 service-phgt-0 web 13514689 Jan 7 23:59 access.8000.log ps aux | grep nsd 1002 20781 2.3 6.7 491856 208840 ? Sl Jan07 32:03 /opt/naviserver-4.99.2-2008-01-07/bin/nsd -z -i -t /web/service-phgt-0/etc/nsd/config-main-8000.tcl -u service-phgt-0 -g web cat /etc/passwd | grep 1002 service-phgt-0:x:1002:407::/web/service-phgt-0:/bin/bash > Also, has log file rolling never worked for you? If this is something > new, what's changed recently? Never worked! >> Please note that "ns_rollfile" renames the existing log (say, >> access.log.000) but it does not create a new one (not sure if that is >> the expected behaviour). > > > That's expected. It is a low-level routine to handle the renaming. > ns_log roll and ns_accesslog roll call it and handle the reopening > themselves. If you use it to roll some other kind of file manually, > you'll have to take account of that. I use ns_logroll for the server/error log and rolling works fine. Thanks, Neophytos ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ naviserver-devel mailing list naviserver-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/naviserver-devel