Gregor Binder wrote :
Hi,
doing 'strace /etc/init.d/syslog-ng start', I can't find something strange,
I don't know about Linux/strace, but on most systems, you would have to use an option to the tracing utility to trace calls of child
-- man strace -- -f Trace child processes as they are created by currently traced processes as a result of the fork(2) system call. -- man strace --
processes. Looks to me like you are tracing the shell process only.
Try to run the syslog-ng BINARY from strace, and look for problems like Ed suggested.
8254 open("/lib/libnss_files.so.2", O_RDONLY) = -1 ENOENT (No such file or directory) 8254 open("/lib/libnss_dns.so.2", O_RDONLY) = -1 ENOENT (No such file or directory) and I suppose those libs are needed by the resolver ... Why 'ldd syslog-ng' does not reported this two files ? (nor ldd on the libs returned by the previous commands) How could I 'guessed' that I need to copy this files into the jail ?
Is there someone who is running a chrooted syslog-ng running under a non root user as a log collector without any (hostname resolution)
problem
? I am - but I have "use_dns(no)" in my config.
Same here. I don't see any technical reason why this wouldn't work, unless you are missing resolv libraries (e.g. on Solaris) or supplementary configuration files in the jail.
Gregor.
Now my syslog-ng is resolving almost as I want : Althougt my $JAIL/etc/nsswitch.conf contains "hosts dns", hostnames are only resolved if they are in $JAIL/etc/hosts ! Amazing ... I'll continue debugging, I progress ;-)