(2nd attempt) syslog-ng and FreeBSD jails
Hi, Still having problems getting logs out of my FreeBSD jails. No errors are recorded, no clue as to why there are no logs. My config looks like this: --- # $Id: syslog-ng.conf,v 1.3 2005/11/25 11:24:02 mzero Exp $ # CUSTOM # shell config options { owner("syslogng"); group("syslogng"); dir_owner("syslogng"); dir_group("syslogng"); dir_perm(0750); perm(0640); sync(0); stats(1200); create_dirs(yes); keep_hostname(yes); chain_hostnames(no); use_time_recvd(yes); time_reopen(3); use_dns(no); }; #---------------------------------------------------------------------- source log_main { unix-dgram("/var/run/log" owner("syslogng") group("syslogng") perm(0600)); unix-dgram("/var/spool/postfix/dev/log" owner("syslogng") group("syslogng") perm(0600)); unix-dgram("/usr/jail/hosts/ssh/root/var/run/log" owner("syslogng") group("syslogng") perm(0600)); unix-dgram("/usr/jail/hosts/comms/root/var/run/log" owner("syslogng") group("syslogng") perm(0600)); }; source log_internal { internal(); }; #---------------------------------------------------------------------- # chrooted, relative paths destination local_main { file("/local/$YEAR/$MONTH/$DAY-main.log"); }; destination local_internal { file("/local/$YEAR/$MONTH/$DAY-syslog.log"); }; destination tcp_stunnel { tcp("127.0.0.1" localip(127.0.0.1) port(10514) tcp-keep-alive(yes)); }; #---------------------------------------------------------------------- log { source(log_main); destination(local_main); destination(tcp_stunnel); }; log { source(log_internal); destination(local_internal); destination(tcp_stunnel); }; --- The process runs chrooted to /var/log and gives no errors. Logs appear correctly from the host machine, but not from any of the jails. Anybody know what's wrong, is this a bug? M -- pgp: http://www.darklogik.org/pub/pgp/pgp.txt 0160 A46A 9A48 D3B0 C92F B690 17FB 4B72 0207 ED43
--On Wednesday, November 30, 2005 09:23:01 PM +0000 markzero <syslog-ng@darklogik.org> wrote:
Hi,
Still having problems getting logs out of my FreeBSD jails. No errors are recorded, no clue as to why there are no logs. My config looks like this:
strace your jailed procs. Are they writing to /var/run/log? If not, you need to figure out where they _are_ trying to write to. -- Carson
Hi,
Still having problems getting logs out of my FreeBSD jails. No errors are recorded, no clue as to why there are no logs. My config looks like this:
strace your jailed procs. Are they writing to /var/run/log? If not, you need to figure out where they _are_ trying to write to.
Hello, I used 'logger' as a test process in the jail: 656 logger CALL connect(0x1,0xbfbfda30,0x6a) 656 logger NAMI "/var/run/logpriv" 656 logger RET connect -1 errno 2 No such file or directory 656 logger CALL connect(0x1,0xbfbfda30,0x6a) 656 logger NAMI "/var/run/log" 656 logger RET connect 0 656 logger CALL sendto(0x1,0xbfbfdf80,0x1f,0,0,0) 656 logger GIO fd 1 wrote 31 bytes "<13>Nov 30 22:06:49 mzero: test" 656 logger RET sendto 31/0x1f 656 logger CALL read(0,0x804c000,0x1000) 656 logger GIO fd 0 read 0 bytes "" 656 logger RET read 0 656 logger CALL exit(0) I added /var/run/logpriv and am now recieving logs correctly! Thanks, don't know why it never crossed my mind to trace the execution... As an aside, is there a way to preserve the hostname of the jail? M -- pgp: http://www.darklogik.org/pub/pgp/pgp.txt 0160 A46A 9A48 D3B0 C92F B690 17FB 4B72 0207 ED43
participants (2)
-
Carson Gaspar
-
markzero