Logfiles inside LXC's

Is it “as designed” to not have a syslog ?
When trying to start syslog.socket ill get the error:
syslog.socket: Socket service syslog.service not loaded, refusing.

Probably is this the cause postfix won’t create a mail.log.

Most containers do run rsyslogd just fine, so you’d have to be a lot more specific about what container you’re running and what’s going on :slight_smile:

The Ubuntu container images have syslog.socket and rsyslog.service.

I can do this on LXD and an Ubuntu container image:

ubuntu@steam:~$ sudo systemctl restart syslog.socket
ubuntu@steam:~$ 

I have 4 LXC’s running with images:debian/9/amd64

They all have there own ZFS storagepool
and they all have no syslog

systemctl status syslog.socket

systemd[1]: syslog.socket: Socket service syslog.service not loaded, refusing.
systemd[1]: Failed to listen on Syslog Socket.
systemd[1]: syslog.socket: Socket service syslog.service not loaded, refusing.
systemd[1]: Failed to listen on Syslog Socket.

sudo systemctl restart syslog.socket is giving the same result

rsyslog doesn’t appear to be part of the minimal Debian images, did you try to install it?

After installing rsyslog here:

stgraber@castiana:~$ lxc exec debian bash
root@debian:~# ps fauxww
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root        75  0.0  0.0  21604  2380 ?        Ss   20:21   0:00 bash
root        76  0.0  0.0  40032  2056 ?        R+   20:21   0:00  \_ ps fauxww
root         1  0.0  0.0  56780  4564 ?        Ss   20:21   0:00 /sbin/init
root        34  0.0  0.0  46100  5520 ?        Ss   20:21   0:00 /lib/systemd/systemd-journald
systemd+    39  0.0  0.0  48712  2540 ?        Ss   20:21   0:00 /lib/systemd/systemd-networkd
root        42  0.0  0.0   4244   944 ?        Ss   20:21   0:00 /sbin/ifup -a --read-environment
root        66  0.0  0.0   4292   608 ?        S    20:21   0:00  \_ /bin/sh -c /sbin/dhclient -4 -v -pf /run/dhclient.eth0.pid -lf /var/lib/dhcp/dhclient.eth0.leases -I -df /var/lib/dhcp/dhclient6.eth0.leases eth0 ?
root        68  0.0  0.0  20352  3028 ?        S    20:21   0:00      \_ /sbin/dhclient -4 -v -pf /run/dhclient.eth0.pid -lf /var/lib/dhcp/dhclient.eth0.leases -I -df /var/lib/dhcp/dhclient6.eth0.leases eth0
root        62  0.0  0.0 180484  2040 ?        Ssl  20:21   0:00 /usr/sbin/rsyslogd -n
root        63  0.0  0.0  29640  1528 ?        Ss   20:21   0:00 /usr/sbin/cron -f
root        65  0.0  0.0  37988  3144 ?        Ss   20:21   0:00 /lib/systemd/systemd-logind
message+    67  0.0  0.0  45124  2292 ?        Ss   20:21   0:00 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
root@debian:~# 

yes i see… just spinned up a ubuntu and syslog is available

Silly me, just needed to install… sorry for the bother, thnx for the quick help!

I is really a beautiful product, love it thnx!