[syslog-ng] Patch for following non-existent logfiles is affecting syslog-ng.persist

Behal, Pavel pavel.behal at hp.com
Fri Dec 7 19:11:31 CET 2007


Dear Bazsi,

while playing with the latest syslog-ng snapshot from Wed, 5 Dec 2007 10:57:01 +0000

http://git.balabit.hu/?p=bazsi/syslog-ng-2.0.git;a=snapshot;h=c29352e3a3b61d207106aafae305ba909d454b2a

, I have received following error during my tests:

"Internal error, duplicate configuration elements refer to the same persistent config; name='affile_sd_curpos(/aaa/01.txt)"

for all non-existent log files.

It is almost harmless, but should not be there. Here is the scenario:

1) The file /aaa/01.txt does not exists and is followed in my test configuration (same as I have sent some email before)

2) First start of syslog-ng
         ./syslog-ng -d -v -e -F  -f /usr/local/etc/syslog-ng-tst.conf

3) Stopping of syslog-ng by Ctrl+C, everything looks fine, but, even the non-existent log files are written into the  syslog-ng.persist !

4) Second start, with same config, parameters and no other changes.

5) Second stop, and the error message mentioned above is generated.

Also the error happens, in case you stop the syslog-ng, and the file previously stored in syslog-ng.persist does not exists anymore.


I have also one more wish. Could you please make the syslog-ng.persist file:

- configurable by command line option or in the config file? Sometimes it is better to move it to some other location, where syslog-ng can write and the recompilation is not comfortable here.  (For example I prefer to run two syslog-ng processes on my system - one for log file reading as non-root and second as root as internal syslog replacement.)

- And could you write persist file more frequently during the syslog-ng run, so the current file positions are not lost in case of machine crash or process hard termination? (I know, this is not the easy part due to possible performance impact.)

I have also retested the patch "fixed flow-control problem related to source files" and it worked fine. Thank you.

Best Regards,

Pavel


More information about the syslog-ng mailing list