[syslog-ng] problems with syslog-ng-3.0.4 and -C option
Balazs Scheidler
bazsi at balabit.hu
Thu Nov 26 15:47:50 CET 2009
On Tue, 2009-11-17 at 11:25 -0600, Chris Fabri wrote:
> Greetings-
>
> I believe I've discovered an issue in syslog-ng 3.0.4. I've compiled
> this version on RH 3 (which might be the problem), and when you try
> for example:
>
> syslog-ng -C /var/log -u syslog-ng
>
> you get:
>
> Error opening configuration file;
> filename='/usr/local/etc/syslog-ng.conf', error='No such file or
> directory (2)'
>
>
> even specifying "-f /usr/local/etc/syslog-ng.conf" causes the same problem.
>
> Placing syslog-ng.conf in the directory specified by -C works, so
> perhaps the -C option has some issue with using the actual path
> instead of the chroot'ed path. I didn't see anything in the last
> several months of emails from the list, and I'm surprised this
> wouldn't have bitten more people, so it could be an RH3-ism, but
> wanted to make sure I reported it, in case it was more of a problem.
can you check with strace how syslog-ng tries to open your configuration
file? it should open the file _after_ chrooting, thus the config file
name is interpreted _inside_ the chroot.
Or you are bitten by the fact that older syslog-ng's used to load the
configuration file from outside the chroot?
In 3.0, this behaviour was changed because you couldn't reload syslog-ng
then. (it couldn't reopen its config file from outside the chroot).
You can work around this behaviour if you copy/bind mount the config
file into the chroot.
--
Bazsi
More information about the syslog-ng
mailing list