systemd-resolved crashing with “Failed to set up mount namespacing: Invalid argument” &...

What type of investment is best suited for a 1-year investment on a down payment?

Is there a math equivalent to the conditional ternary operator?

Skis versus snow shoes - when to choose which for travelling the backcountry?

When an experienced monk meditates how much does their mind wander?

Citing contemporaneous (interlaced?) preprints

School performs periodic password audits. Is my password compromised?

What type of postprocessing gives the effect of people standing out

Reason why dimensional travelling would be restricted

Why do members of Congress in committee hearings ask witnesses the same question multiple times?

Is divide-by-zero a security vulnerability?

It took me a lot of time to make this, pls like. (YouTube Comments #1)

The need of reserving one's ability in job interviews

Why can't we make a perpetual motion machine by using a magnet to pull up a piece of metal, then letting it fall back down?

Analog Mute Circuit - Simplest Solution

If nine coins are tossed, what is the probability that the number of heads is even?

What is this waxed root vegetable?

Achieving MPPT of a solar panel with LM2596

Plagiarism of code by other PhD student

What are all the squawk codes?

Graphing random points on the XY-plane

Why are special aircraft used for the carriers in the united states navy?

Are there any other Chaos-worshipping races?

Why doesn't Object.keys return a keyof type in TypeScript?

How can I create a Table like this in Latex?



systemd-resolved crashing with “Failed to set up mount namespacing: Invalid argument” & “status=226/NAMESPACE”


unable to access location - failed to mount Windows share: Invalid argumentFailed to mount Windows share: Invalid argumentsystemd service failed with dependencyHow to disable systemd-resolved and resolve DNS with dnsmasq?Syslog flooded with systemd-resolved messages “Using degraded feature set”services failing to start - control process exited with error codeBoot time takes more than 5 minutes after moving partitions in Ubuntu 18.04How do I set the search path for systemd-resolved?Stable 18.04 install intermittently locks up in software updateDNS over TLS with systemd-resolved













0















Problem



I'm trying to investigate this weird error where systemd-resolved is constantly crashing on 2 out of 4 machines. The one thing different with these two problematic machines (that I can think of), is that they are mounting a samba/cifs filesystem exported from machine #3 (on which systemd-resolved is running fine).



How do I get to the bottom of this?



OS



# cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.1 LTS"

# uname -a
Linux prod-delayed-jobs 4.15.0-42-generic #45-Ubuntu SMP Thu Nov 15 19:32:57 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

# systemd --version
systemd 237
+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2 default-hierarchy=hybrid


Relevant journalctl output



Notice the /dev/null is not a device. line in the logs. This is occurring multiple times - during, before, and after systemd-resolved crashes.



Feb 12 14:23:21 prod-delayed-jobs dhclient[794]: DHCPREQUEST of [REDACTED-IP-ADDRESS] on eth0 to 172.31.1.1 port 67 (xid=0x730cc4e4)
Feb 12 14:23:21 prod-delayed-jobs dhclient[794]: DHCPACK of [REDACTED-IP-ADDRESS] from 172.31.1.1
Feb 12 14:23:21 prod-delayed-jobs systemd[1]: Stopping Network Name Resolution...
Feb 12 14:23:21 prod-delayed-jobs systemd[1]: Stopped Network Name Resolution.
Feb 12 14:23:21 prod-delayed-jobs systemd[1]: /dev/null is not a device.
Feb 12 14:23:21 prod-delayed-jobs systemd[1]: Starting Network Name Resolution...
Feb 12 14:23:21 prod-delayed-jobs systemd[11796]: systemd-resolved.service: Failed to set up mount namespacing: Invalid argument
Feb 12 14:23:21 prod-delayed-jobs systemd[11796]: systemd-resolved.service: Failed at step NAMESPACE spawning /lib/systemd/systemd-resolved
Feb 12 14:23:21 prod-delayed-jobs systemd[1]: systemd-resolved.service: Main process exited, code=exited, status=226/NAMESPACE
Feb 12 14:23:21 prod-delayed-jobs systemd[1]: systemd-resolved.service: Failed with result 'exit-code'.
Feb 12 14:23:21 prod-delayed-jobs systemd[1]: Failed to start Network Name Resolution.
Feb 12 14:23:21 prod-delayed-jobs systemd[1]: systemd-resolved.service: Service has no hold-off time, scheduling restart.
Feb 12 14:23:21 prod-delayed-jobs systemd[1]: systemd-resolved.service: Scheduled restart job, restart counter is at 1.
Feb 12 14:23:21 prod-delayed-jobs systemd[1]: Stopped Network Name Resolution.
Feb 12 14:23:21 prod-delayed-jobs systemd[1]: /dev/null is not a device.
Feb 12 14:23:21 prod-delayed-jobs systemd[1]: Starting Network Name Resolution...
Feb 12 14:23:21 prod-delayed-jobs dhclient[794]: bound to [REDACTED-IP-ADDRESS] -- renewal in 32497 seconds.
Feb 12 14:23:21 prod-delayed-jobs systemd[11813]: systemd-resolved.service: Failed to set up mount namespacing: Invalid argument
Feb 12 14:23:21 prod-delayed-jobs systemd[11813]: systemd-resolved.service: Failed at step NAMESPACE spawning /lib/systemd/systemd-resolved
Feb 12 14:23:21 prod-delayed-jobs systemd[1]: systemd-resolved.service: Main process exited, code=exited, status=226/NAMESPACE
Feb 12 14:23:21 prod-delayed-jobs systemd[1]: systemd-resolved.service: Failed with result 'exit-code'.
Feb 12 14:23:21 prod-delayed-jobs systemd[1]: Failed to start Network Name Resolution.
Feb 12 14:23:21 prod-delayed-jobs systemd[1]: systemd-resolved.service: Service has no hold-off time, scheduling restart.
Feb 12 14:23:21 prod-delayed-jobs systemd[1]: systemd-resolved.service: Scheduled restart job, restart counter is at 2.
Feb 12 14:23:21 prod-delayed-jobs systemd[1]: Stopped Network Name Resolution.
Feb 12 14:23:21 prod-delayed-jobs systemd[1]: /dev/null is not a device.
Feb 12 14:23:21 prod-delayed-jobs systemd[1]: Starting Network Name Resolution...
Feb 12 14:23:22 prod-delayed-jobs systemd[11831]: systemd-resolved.service: Failed to set up mount namespacing: Invalid argument
Feb 12 14:23:22 prod-delayed-jobs systemd[11831]: systemd-resolved.service: Failed at step NAMESPACE spawning /lib/systemd/systemd-resolved
Feb 12 14:23:22 prod-delayed-jobs systemd[1]: systemd-resolved.service: Main process exited, code=exited, status=226/NAMESPACE
Feb 12 14:23:22 prod-delayed-jobs systemd[1]: systemd-resolved.service: Failed with result 'exit-code'.
Feb 12 14:23:22 prod-delayed-jobs systemd[1]: Failed to start Network Name Resolution.
Feb 12 14:23:22 prod-delayed-jobs systemd[1]: systemd-resolved.service: Service has no hold-off time, scheduling restart.
Feb 12 14:23:22 prod-delayed-jobs systemd[1]: systemd-resolved.service: Scheduled restart job, restart counter is at 3.



/etc/fstab contents - in case this is relevant



UUID=2f54e8e6-ff9c-497a-88ea-ce159f6cd283 /               ext4    discard,errors=remount-ro 0       1
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0
//[REDACTED]/uploaded_files /home/myuser/shared cifs rw,username=myuser,password=[REDACTED],uid=myuser,gid=myuser 0 0


Few systemd configuration files are pointing to /dev/null



This is the case on all the 4 machines, however only 2 out of these 4 are having trouble with systemd-resolved. Strangely, hostname.service is pointing to /dev/null - wonder why?



lrwxrwxrwx 1 root root    9 Nov 15 21:45 bootlogd.service -> /dev/null
lrwxrwxrwx 1 root root 9 Nov 15 21:45 bootlogs.service -> /dev/null
lrwxrwxrwx 1 root root 9 Nov 15 21:45 bootmisc.service -> /dev/null
lrwxrwxrwx 1 root root 9 Nov 15 21:45 checkfs.service -> /dev/null
lrwxrwxrwx 1 root root 9 Nov 15 21:45 checkroot-bootclean.service -> /dev/null
lrwxrwxrwx 1 root root 9 Nov 15 21:45 checkroot.service -> /dev/null
lrwxrwxrwx 1 root root 9 Nov 15 21:45 cryptdisks-early.service -> /dev/null
lrwxrwxrwx 1 root root 9 Nov 15 21:45 cryptdisks.service -> /dev/null
lrwxrwxrwx 1 root root 9 Nov 15 21:45 fuse.service -> /dev/null
lrwxrwxrwx 1 root root 9 Nov 15 21:45 halt.service -> /dev/null
lrwxrwxrwx 1 root root 9 Nov 15 21:45 hostname.service -> /dev/null
lrwxrwxrwx 1 root root 9 Nov 15 21:45 hwclock.service -> /dev/null
lrwxrwxrwx 1 root root 9 Nov 15 21:45 killprocs.service -> /dev/null
lrwxrwxrwx 1 root root 9 Apr 12 2018 lvm2.service -> /dev/null
lrwxrwxrwx 1 root root 9 Jul 2 2018 mdadm.service -> /dev/null
lrwxrwxrwx 1 root root 9 Jul 2 2018 mdadm-waitidle.service -> /dev/null
lrwxrwxrwx 1 root root 9 Nov 15 21:45 motd.service -> /dev/null
lrwxrwxrwx 1 root root 9 Nov 15 21:45 mountall-bootclean.service -> /dev/null
lrwxrwxrwx 1 root root 9 Nov 15 21:45 mountall.service -> /dev/null
lrwxrwxrwx 1 root root 9 Nov 15 21:45 mountdevsubfs.service -> /dev/null
lrwxrwxrwx 1 root root 9 Nov 15 21:45 mountkernfs.service -> /dev/null
lrwxrwxrwx 1 root root 9 Nov 15 21:45 mountnfs-bootclean.service -> /dev/null
lrwxrwxrwx 1 root root 9 Nov 15 21:45 mountnfs.service -> /dev/null
lrwxrwxrwx 1 root root 9 Jan 16 2018 nfs-common.service -> /dev/null
lrwxrwxrwx 1 root root 9 Nov 15 21:45 rc.service -> /dev/null
lrwxrwxrwx 1 root root 9 Nov 15 21:45 rcS.service -> /dev/null
lrwxrwxrwx 1 root root 9 Nov 15 21:45 reboot.service -> /dev/null
lrwxrwxrwx 1 root root 9 Nov 15 21:45 rmnologin.service -> /dev/null
lrwxrwxrwx 1 root root 9 Dec 6 11:10 screen-cleanup.service -> /dev/null
lrwxrwxrwx 1 root root 9 Nov 15 21:45 sendsigs.service -> /dev/null
lrwxrwxrwx 1 root root 9 Nov 15 21:45 single.service -> /dev/null
lrwxrwxrwx 1 root root 9 Nov 15 21:45 stop-bootlogd.service -> /dev/null
lrwxrwxrwx 1 root root 9 Nov 15 21:45 stop-bootlogd-single.service -> /dev/null
lrwxrwxrwx 1 root root 9 Dec 6 11:07 sudo.service -> /dev/null
lrwxrwxrwx 1 root root 9 Nov 15 21:45 umountfs.service -> /dev/null
lrwxrwxrwx 1 root root 9 Nov 15 21:45 umountnfs.service -> /dev/null
lrwxrwxrwx 1 root root 9 Nov 15 21:45 umountroot.service -> /dev/null
lrwxrwxrwx 1 root root 9 Nov 15 21:45 x11-common.service -> /dev/null


/lib/systemd/system



[Unit]
Description=Network Name Resolution
Documentation=man:systemd-resolved.service(8)
Documentation=https://www.freedesktop.org/wiki/Software/systemd/resolved
Documentation=https://www.freedesktop.org/wiki/Software/systemd/writing-network-configuration-managers
Documentation=https://www.freedesktop.org/wiki/Software/systemd/writing-resolver-clients
DefaultDependencies=no
After=systemd-sysusers.service systemd-networkd.service
Before=network.target nss-lookup.target shutdown.target
Conflicts=shutdown.target
Wants=nss-lookup.target

[Service]
Type=notify
Restart=always
RestartSec=0
ExecStart=!!/lib/systemd/systemd-resolved
WatchdogSec=3min
User=systemd-resolve
CapabilityBoundingSet=CAP_SETPCAP CAP_NET_RAW CAP_NET_BIND_SERVICE
AmbientCapabilities=CAP_SETPCAP CAP_NET_RAW CAP_NET_BIND_SERVICE
PrivateTmp=yes
PrivateDevices=yes
ProtectSystem=strict
ProtectHome=yes
ProtectControlGroups=yes
ProtectKernelTunables=yes
ProtectKernelModules=yes
MemoryDenyWriteExecute=yes
RestrictRealtime=yes
RestrictAddressFamilies=AF_UNIX AF_NETLINK AF_INET AF_INET6
SystemCallFilter=~@clock @cpu-emulation @debug @keyring @module @mount @obsolete @raw-io @reboot @swap









share|improve this question



























    0















    Problem



    I'm trying to investigate this weird error where systemd-resolved is constantly crashing on 2 out of 4 machines. The one thing different with these two problematic machines (that I can think of), is that they are mounting a samba/cifs filesystem exported from machine #3 (on which systemd-resolved is running fine).



    How do I get to the bottom of this?



    OS



    # cat /etc/lsb-release 
    DISTRIB_ID=Ubuntu
    DISTRIB_RELEASE=18.04
    DISTRIB_CODENAME=bionic
    DISTRIB_DESCRIPTION="Ubuntu 18.04.1 LTS"

    # uname -a
    Linux prod-delayed-jobs 4.15.0-42-generic #45-Ubuntu SMP Thu Nov 15 19:32:57 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

    # systemd --version
    systemd 237
    +PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2 default-hierarchy=hybrid


    Relevant journalctl output



    Notice the /dev/null is not a device. line in the logs. This is occurring multiple times - during, before, and after systemd-resolved crashes.



    Feb 12 14:23:21 prod-delayed-jobs dhclient[794]: DHCPREQUEST of [REDACTED-IP-ADDRESS] on eth0 to 172.31.1.1 port 67 (xid=0x730cc4e4)
    Feb 12 14:23:21 prod-delayed-jobs dhclient[794]: DHCPACK of [REDACTED-IP-ADDRESS] from 172.31.1.1
    Feb 12 14:23:21 prod-delayed-jobs systemd[1]: Stopping Network Name Resolution...
    Feb 12 14:23:21 prod-delayed-jobs systemd[1]: Stopped Network Name Resolution.
    Feb 12 14:23:21 prod-delayed-jobs systemd[1]: /dev/null is not a device.
    Feb 12 14:23:21 prod-delayed-jobs systemd[1]: Starting Network Name Resolution...
    Feb 12 14:23:21 prod-delayed-jobs systemd[11796]: systemd-resolved.service: Failed to set up mount namespacing: Invalid argument
    Feb 12 14:23:21 prod-delayed-jobs systemd[11796]: systemd-resolved.service: Failed at step NAMESPACE spawning /lib/systemd/systemd-resolved
    Feb 12 14:23:21 prod-delayed-jobs systemd[1]: systemd-resolved.service: Main process exited, code=exited, status=226/NAMESPACE
    Feb 12 14:23:21 prod-delayed-jobs systemd[1]: systemd-resolved.service: Failed with result 'exit-code'.
    Feb 12 14:23:21 prod-delayed-jobs systemd[1]: Failed to start Network Name Resolution.
    Feb 12 14:23:21 prod-delayed-jobs systemd[1]: systemd-resolved.service: Service has no hold-off time, scheduling restart.
    Feb 12 14:23:21 prod-delayed-jobs systemd[1]: systemd-resolved.service: Scheduled restart job, restart counter is at 1.
    Feb 12 14:23:21 prod-delayed-jobs systemd[1]: Stopped Network Name Resolution.
    Feb 12 14:23:21 prod-delayed-jobs systemd[1]: /dev/null is not a device.
    Feb 12 14:23:21 prod-delayed-jobs systemd[1]: Starting Network Name Resolution...
    Feb 12 14:23:21 prod-delayed-jobs dhclient[794]: bound to [REDACTED-IP-ADDRESS] -- renewal in 32497 seconds.
    Feb 12 14:23:21 prod-delayed-jobs systemd[11813]: systemd-resolved.service: Failed to set up mount namespacing: Invalid argument
    Feb 12 14:23:21 prod-delayed-jobs systemd[11813]: systemd-resolved.service: Failed at step NAMESPACE spawning /lib/systemd/systemd-resolved
    Feb 12 14:23:21 prod-delayed-jobs systemd[1]: systemd-resolved.service: Main process exited, code=exited, status=226/NAMESPACE
    Feb 12 14:23:21 prod-delayed-jobs systemd[1]: systemd-resolved.service: Failed with result 'exit-code'.
    Feb 12 14:23:21 prod-delayed-jobs systemd[1]: Failed to start Network Name Resolution.
    Feb 12 14:23:21 prod-delayed-jobs systemd[1]: systemd-resolved.service: Service has no hold-off time, scheduling restart.
    Feb 12 14:23:21 prod-delayed-jobs systemd[1]: systemd-resolved.service: Scheduled restart job, restart counter is at 2.
    Feb 12 14:23:21 prod-delayed-jobs systemd[1]: Stopped Network Name Resolution.
    Feb 12 14:23:21 prod-delayed-jobs systemd[1]: /dev/null is not a device.
    Feb 12 14:23:21 prod-delayed-jobs systemd[1]: Starting Network Name Resolution...
    Feb 12 14:23:22 prod-delayed-jobs systemd[11831]: systemd-resolved.service: Failed to set up mount namespacing: Invalid argument
    Feb 12 14:23:22 prod-delayed-jobs systemd[11831]: systemd-resolved.service: Failed at step NAMESPACE spawning /lib/systemd/systemd-resolved
    Feb 12 14:23:22 prod-delayed-jobs systemd[1]: systemd-resolved.service: Main process exited, code=exited, status=226/NAMESPACE
    Feb 12 14:23:22 prod-delayed-jobs systemd[1]: systemd-resolved.service: Failed with result 'exit-code'.
    Feb 12 14:23:22 prod-delayed-jobs systemd[1]: Failed to start Network Name Resolution.
    Feb 12 14:23:22 prod-delayed-jobs systemd[1]: systemd-resolved.service: Service has no hold-off time, scheduling restart.
    Feb 12 14:23:22 prod-delayed-jobs systemd[1]: systemd-resolved.service: Scheduled restart job, restart counter is at 3.



    /etc/fstab contents - in case this is relevant



    UUID=2f54e8e6-ff9c-497a-88ea-ce159f6cd283 /               ext4    discard,errors=remount-ro 0       1
    /dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0
    //[REDACTED]/uploaded_files /home/myuser/shared cifs rw,username=myuser,password=[REDACTED],uid=myuser,gid=myuser 0 0


    Few systemd configuration files are pointing to /dev/null



    This is the case on all the 4 machines, however only 2 out of these 4 are having trouble with systemd-resolved. Strangely, hostname.service is pointing to /dev/null - wonder why?



    lrwxrwxrwx 1 root root    9 Nov 15 21:45 bootlogd.service -> /dev/null
    lrwxrwxrwx 1 root root 9 Nov 15 21:45 bootlogs.service -> /dev/null
    lrwxrwxrwx 1 root root 9 Nov 15 21:45 bootmisc.service -> /dev/null
    lrwxrwxrwx 1 root root 9 Nov 15 21:45 checkfs.service -> /dev/null
    lrwxrwxrwx 1 root root 9 Nov 15 21:45 checkroot-bootclean.service -> /dev/null
    lrwxrwxrwx 1 root root 9 Nov 15 21:45 checkroot.service -> /dev/null
    lrwxrwxrwx 1 root root 9 Nov 15 21:45 cryptdisks-early.service -> /dev/null
    lrwxrwxrwx 1 root root 9 Nov 15 21:45 cryptdisks.service -> /dev/null
    lrwxrwxrwx 1 root root 9 Nov 15 21:45 fuse.service -> /dev/null
    lrwxrwxrwx 1 root root 9 Nov 15 21:45 halt.service -> /dev/null
    lrwxrwxrwx 1 root root 9 Nov 15 21:45 hostname.service -> /dev/null
    lrwxrwxrwx 1 root root 9 Nov 15 21:45 hwclock.service -> /dev/null
    lrwxrwxrwx 1 root root 9 Nov 15 21:45 killprocs.service -> /dev/null
    lrwxrwxrwx 1 root root 9 Apr 12 2018 lvm2.service -> /dev/null
    lrwxrwxrwx 1 root root 9 Jul 2 2018 mdadm.service -> /dev/null
    lrwxrwxrwx 1 root root 9 Jul 2 2018 mdadm-waitidle.service -> /dev/null
    lrwxrwxrwx 1 root root 9 Nov 15 21:45 motd.service -> /dev/null
    lrwxrwxrwx 1 root root 9 Nov 15 21:45 mountall-bootclean.service -> /dev/null
    lrwxrwxrwx 1 root root 9 Nov 15 21:45 mountall.service -> /dev/null
    lrwxrwxrwx 1 root root 9 Nov 15 21:45 mountdevsubfs.service -> /dev/null
    lrwxrwxrwx 1 root root 9 Nov 15 21:45 mountkernfs.service -> /dev/null
    lrwxrwxrwx 1 root root 9 Nov 15 21:45 mountnfs-bootclean.service -> /dev/null
    lrwxrwxrwx 1 root root 9 Nov 15 21:45 mountnfs.service -> /dev/null
    lrwxrwxrwx 1 root root 9 Jan 16 2018 nfs-common.service -> /dev/null
    lrwxrwxrwx 1 root root 9 Nov 15 21:45 rc.service -> /dev/null
    lrwxrwxrwx 1 root root 9 Nov 15 21:45 rcS.service -> /dev/null
    lrwxrwxrwx 1 root root 9 Nov 15 21:45 reboot.service -> /dev/null
    lrwxrwxrwx 1 root root 9 Nov 15 21:45 rmnologin.service -> /dev/null
    lrwxrwxrwx 1 root root 9 Dec 6 11:10 screen-cleanup.service -> /dev/null
    lrwxrwxrwx 1 root root 9 Nov 15 21:45 sendsigs.service -> /dev/null
    lrwxrwxrwx 1 root root 9 Nov 15 21:45 single.service -> /dev/null
    lrwxrwxrwx 1 root root 9 Nov 15 21:45 stop-bootlogd.service -> /dev/null
    lrwxrwxrwx 1 root root 9 Nov 15 21:45 stop-bootlogd-single.service -> /dev/null
    lrwxrwxrwx 1 root root 9 Dec 6 11:07 sudo.service -> /dev/null
    lrwxrwxrwx 1 root root 9 Nov 15 21:45 umountfs.service -> /dev/null
    lrwxrwxrwx 1 root root 9 Nov 15 21:45 umountnfs.service -> /dev/null
    lrwxrwxrwx 1 root root 9 Nov 15 21:45 umountroot.service -> /dev/null
    lrwxrwxrwx 1 root root 9 Nov 15 21:45 x11-common.service -> /dev/null


    /lib/systemd/system



    [Unit]
    Description=Network Name Resolution
    Documentation=man:systemd-resolved.service(8)
    Documentation=https://www.freedesktop.org/wiki/Software/systemd/resolved
    Documentation=https://www.freedesktop.org/wiki/Software/systemd/writing-network-configuration-managers
    Documentation=https://www.freedesktop.org/wiki/Software/systemd/writing-resolver-clients
    DefaultDependencies=no
    After=systemd-sysusers.service systemd-networkd.service
    Before=network.target nss-lookup.target shutdown.target
    Conflicts=shutdown.target
    Wants=nss-lookup.target

    [Service]
    Type=notify
    Restart=always
    RestartSec=0
    ExecStart=!!/lib/systemd/systemd-resolved
    WatchdogSec=3min
    User=systemd-resolve
    CapabilityBoundingSet=CAP_SETPCAP CAP_NET_RAW CAP_NET_BIND_SERVICE
    AmbientCapabilities=CAP_SETPCAP CAP_NET_RAW CAP_NET_BIND_SERVICE
    PrivateTmp=yes
    PrivateDevices=yes
    ProtectSystem=strict
    ProtectHome=yes
    ProtectControlGroups=yes
    ProtectKernelTunables=yes
    ProtectKernelModules=yes
    MemoryDenyWriteExecute=yes
    RestrictRealtime=yes
    RestrictAddressFamilies=AF_UNIX AF_NETLINK AF_INET AF_INET6
    SystemCallFilter=~@clock @cpu-emulation @debug @keyring @module @mount @obsolete @raw-io @reboot @swap









    share|improve this question

























      0












      0








      0








      Problem



      I'm trying to investigate this weird error where systemd-resolved is constantly crashing on 2 out of 4 machines. The one thing different with these two problematic machines (that I can think of), is that they are mounting a samba/cifs filesystem exported from machine #3 (on which systemd-resolved is running fine).



      How do I get to the bottom of this?



      OS



      # cat /etc/lsb-release 
      DISTRIB_ID=Ubuntu
      DISTRIB_RELEASE=18.04
      DISTRIB_CODENAME=bionic
      DISTRIB_DESCRIPTION="Ubuntu 18.04.1 LTS"

      # uname -a
      Linux prod-delayed-jobs 4.15.0-42-generic #45-Ubuntu SMP Thu Nov 15 19:32:57 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

      # systemd --version
      systemd 237
      +PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2 default-hierarchy=hybrid


      Relevant journalctl output



      Notice the /dev/null is not a device. line in the logs. This is occurring multiple times - during, before, and after systemd-resolved crashes.



      Feb 12 14:23:21 prod-delayed-jobs dhclient[794]: DHCPREQUEST of [REDACTED-IP-ADDRESS] on eth0 to 172.31.1.1 port 67 (xid=0x730cc4e4)
      Feb 12 14:23:21 prod-delayed-jobs dhclient[794]: DHCPACK of [REDACTED-IP-ADDRESS] from 172.31.1.1
      Feb 12 14:23:21 prod-delayed-jobs systemd[1]: Stopping Network Name Resolution...
      Feb 12 14:23:21 prod-delayed-jobs systemd[1]: Stopped Network Name Resolution.
      Feb 12 14:23:21 prod-delayed-jobs systemd[1]: /dev/null is not a device.
      Feb 12 14:23:21 prod-delayed-jobs systemd[1]: Starting Network Name Resolution...
      Feb 12 14:23:21 prod-delayed-jobs systemd[11796]: systemd-resolved.service: Failed to set up mount namespacing: Invalid argument
      Feb 12 14:23:21 prod-delayed-jobs systemd[11796]: systemd-resolved.service: Failed at step NAMESPACE spawning /lib/systemd/systemd-resolved
      Feb 12 14:23:21 prod-delayed-jobs systemd[1]: systemd-resolved.service: Main process exited, code=exited, status=226/NAMESPACE
      Feb 12 14:23:21 prod-delayed-jobs systemd[1]: systemd-resolved.service: Failed with result 'exit-code'.
      Feb 12 14:23:21 prod-delayed-jobs systemd[1]: Failed to start Network Name Resolution.
      Feb 12 14:23:21 prod-delayed-jobs systemd[1]: systemd-resolved.service: Service has no hold-off time, scheduling restart.
      Feb 12 14:23:21 prod-delayed-jobs systemd[1]: systemd-resolved.service: Scheduled restart job, restart counter is at 1.
      Feb 12 14:23:21 prod-delayed-jobs systemd[1]: Stopped Network Name Resolution.
      Feb 12 14:23:21 prod-delayed-jobs systemd[1]: /dev/null is not a device.
      Feb 12 14:23:21 prod-delayed-jobs systemd[1]: Starting Network Name Resolution...
      Feb 12 14:23:21 prod-delayed-jobs dhclient[794]: bound to [REDACTED-IP-ADDRESS] -- renewal in 32497 seconds.
      Feb 12 14:23:21 prod-delayed-jobs systemd[11813]: systemd-resolved.service: Failed to set up mount namespacing: Invalid argument
      Feb 12 14:23:21 prod-delayed-jobs systemd[11813]: systemd-resolved.service: Failed at step NAMESPACE spawning /lib/systemd/systemd-resolved
      Feb 12 14:23:21 prod-delayed-jobs systemd[1]: systemd-resolved.service: Main process exited, code=exited, status=226/NAMESPACE
      Feb 12 14:23:21 prod-delayed-jobs systemd[1]: systemd-resolved.service: Failed with result 'exit-code'.
      Feb 12 14:23:21 prod-delayed-jobs systemd[1]: Failed to start Network Name Resolution.
      Feb 12 14:23:21 prod-delayed-jobs systemd[1]: systemd-resolved.service: Service has no hold-off time, scheduling restart.
      Feb 12 14:23:21 prod-delayed-jobs systemd[1]: systemd-resolved.service: Scheduled restart job, restart counter is at 2.
      Feb 12 14:23:21 prod-delayed-jobs systemd[1]: Stopped Network Name Resolution.
      Feb 12 14:23:21 prod-delayed-jobs systemd[1]: /dev/null is not a device.
      Feb 12 14:23:21 prod-delayed-jobs systemd[1]: Starting Network Name Resolution...
      Feb 12 14:23:22 prod-delayed-jobs systemd[11831]: systemd-resolved.service: Failed to set up mount namespacing: Invalid argument
      Feb 12 14:23:22 prod-delayed-jobs systemd[11831]: systemd-resolved.service: Failed at step NAMESPACE spawning /lib/systemd/systemd-resolved
      Feb 12 14:23:22 prod-delayed-jobs systemd[1]: systemd-resolved.service: Main process exited, code=exited, status=226/NAMESPACE
      Feb 12 14:23:22 prod-delayed-jobs systemd[1]: systemd-resolved.service: Failed with result 'exit-code'.
      Feb 12 14:23:22 prod-delayed-jobs systemd[1]: Failed to start Network Name Resolution.
      Feb 12 14:23:22 prod-delayed-jobs systemd[1]: systemd-resolved.service: Service has no hold-off time, scheduling restart.
      Feb 12 14:23:22 prod-delayed-jobs systemd[1]: systemd-resolved.service: Scheduled restart job, restart counter is at 3.



      /etc/fstab contents - in case this is relevant



      UUID=2f54e8e6-ff9c-497a-88ea-ce159f6cd283 /               ext4    discard,errors=remount-ro 0       1
      /dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0
      //[REDACTED]/uploaded_files /home/myuser/shared cifs rw,username=myuser,password=[REDACTED],uid=myuser,gid=myuser 0 0


      Few systemd configuration files are pointing to /dev/null



      This is the case on all the 4 machines, however only 2 out of these 4 are having trouble with systemd-resolved. Strangely, hostname.service is pointing to /dev/null - wonder why?



      lrwxrwxrwx 1 root root    9 Nov 15 21:45 bootlogd.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 bootlogs.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 bootmisc.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 checkfs.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 checkroot-bootclean.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 checkroot.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 cryptdisks-early.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 cryptdisks.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 fuse.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 halt.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 hostname.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 hwclock.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 killprocs.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Apr 12 2018 lvm2.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Jul 2 2018 mdadm.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Jul 2 2018 mdadm-waitidle.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 motd.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 mountall-bootclean.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 mountall.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 mountdevsubfs.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 mountkernfs.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 mountnfs-bootclean.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 mountnfs.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Jan 16 2018 nfs-common.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 rc.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 rcS.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 reboot.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 rmnologin.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Dec 6 11:10 screen-cleanup.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 sendsigs.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 single.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 stop-bootlogd.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 stop-bootlogd-single.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Dec 6 11:07 sudo.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 umountfs.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 umountnfs.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 umountroot.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 x11-common.service -> /dev/null


      /lib/systemd/system



      [Unit]
      Description=Network Name Resolution
      Documentation=man:systemd-resolved.service(8)
      Documentation=https://www.freedesktop.org/wiki/Software/systemd/resolved
      Documentation=https://www.freedesktop.org/wiki/Software/systemd/writing-network-configuration-managers
      Documentation=https://www.freedesktop.org/wiki/Software/systemd/writing-resolver-clients
      DefaultDependencies=no
      After=systemd-sysusers.service systemd-networkd.service
      Before=network.target nss-lookup.target shutdown.target
      Conflicts=shutdown.target
      Wants=nss-lookup.target

      [Service]
      Type=notify
      Restart=always
      RestartSec=0
      ExecStart=!!/lib/systemd/systemd-resolved
      WatchdogSec=3min
      User=systemd-resolve
      CapabilityBoundingSet=CAP_SETPCAP CAP_NET_RAW CAP_NET_BIND_SERVICE
      AmbientCapabilities=CAP_SETPCAP CAP_NET_RAW CAP_NET_BIND_SERVICE
      PrivateTmp=yes
      PrivateDevices=yes
      ProtectSystem=strict
      ProtectHome=yes
      ProtectControlGroups=yes
      ProtectKernelTunables=yes
      ProtectKernelModules=yes
      MemoryDenyWriteExecute=yes
      RestrictRealtime=yes
      RestrictAddressFamilies=AF_UNIX AF_NETLINK AF_INET AF_INET6
      SystemCallFilter=~@clock @cpu-emulation @debug @keyring @module @mount @obsolete @raw-io @reboot @swap









      share|improve this question














      Problem



      I'm trying to investigate this weird error where systemd-resolved is constantly crashing on 2 out of 4 machines. The one thing different with these two problematic machines (that I can think of), is that they are mounting a samba/cifs filesystem exported from machine #3 (on which systemd-resolved is running fine).



      How do I get to the bottom of this?



      OS



      # cat /etc/lsb-release 
      DISTRIB_ID=Ubuntu
      DISTRIB_RELEASE=18.04
      DISTRIB_CODENAME=bionic
      DISTRIB_DESCRIPTION="Ubuntu 18.04.1 LTS"

      # uname -a
      Linux prod-delayed-jobs 4.15.0-42-generic #45-Ubuntu SMP Thu Nov 15 19:32:57 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

      # systemd --version
      systemd 237
      +PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2 default-hierarchy=hybrid


      Relevant journalctl output



      Notice the /dev/null is not a device. line in the logs. This is occurring multiple times - during, before, and after systemd-resolved crashes.



      Feb 12 14:23:21 prod-delayed-jobs dhclient[794]: DHCPREQUEST of [REDACTED-IP-ADDRESS] on eth0 to 172.31.1.1 port 67 (xid=0x730cc4e4)
      Feb 12 14:23:21 prod-delayed-jobs dhclient[794]: DHCPACK of [REDACTED-IP-ADDRESS] from 172.31.1.1
      Feb 12 14:23:21 prod-delayed-jobs systemd[1]: Stopping Network Name Resolution...
      Feb 12 14:23:21 prod-delayed-jobs systemd[1]: Stopped Network Name Resolution.
      Feb 12 14:23:21 prod-delayed-jobs systemd[1]: /dev/null is not a device.
      Feb 12 14:23:21 prod-delayed-jobs systemd[1]: Starting Network Name Resolution...
      Feb 12 14:23:21 prod-delayed-jobs systemd[11796]: systemd-resolved.service: Failed to set up mount namespacing: Invalid argument
      Feb 12 14:23:21 prod-delayed-jobs systemd[11796]: systemd-resolved.service: Failed at step NAMESPACE spawning /lib/systemd/systemd-resolved
      Feb 12 14:23:21 prod-delayed-jobs systemd[1]: systemd-resolved.service: Main process exited, code=exited, status=226/NAMESPACE
      Feb 12 14:23:21 prod-delayed-jobs systemd[1]: systemd-resolved.service: Failed with result 'exit-code'.
      Feb 12 14:23:21 prod-delayed-jobs systemd[1]: Failed to start Network Name Resolution.
      Feb 12 14:23:21 prod-delayed-jobs systemd[1]: systemd-resolved.service: Service has no hold-off time, scheduling restart.
      Feb 12 14:23:21 prod-delayed-jobs systemd[1]: systemd-resolved.service: Scheduled restart job, restart counter is at 1.
      Feb 12 14:23:21 prod-delayed-jobs systemd[1]: Stopped Network Name Resolution.
      Feb 12 14:23:21 prod-delayed-jobs systemd[1]: /dev/null is not a device.
      Feb 12 14:23:21 prod-delayed-jobs systemd[1]: Starting Network Name Resolution...
      Feb 12 14:23:21 prod-delayed-jobs dhclient[794]: bound to [REDACTED-IP-ADDRESS] -- renewal in 32497 seconds.
      Feb 12 14:23:21 prod-delayed-jobs systemd[11813]: systemd-resolved.service: Failed to set up mount namespacing: Invalid argument
      Feb 12 14:23:21 prod-delayed-jobs systemd[11813]: systemd-resolved.service: Failed at step NAMESPACE spawning /lib/systemd/systemd-resolved
      Feb 12 14:23:21 prod-delayed-jobs systemd[1]: systemd-resolved.service: Main process exited, code=exited, status=226/NAMESPACE
      Feb 12 14:23:21 prod-delayed-jobs systemd[1]: systemd-resolved.service: Failed with result 'exit-code'.
      Feb 12 14:23:21 prod-delayed-jobs systemd[1]: Failed to start Network Name Resolution.
      Feb 12 14:23:21 prod-delayed-jobs systemd[1]: systemd-resolved.service: Service has no hold-off time, scheduling restart.
      Feb 12 14:23:21 prod-delayed-jobs systemd[1]: systemd-resolved.service: Scheduled restart job, restart counter is at 2.
      Feb 12 14:23:21 prod-delayed-jobs systemd[1]: Stopped Network Name Resolution.
      Feb 12 14:23:21 prod-delayed-jobs systemd[1]: /dev/null is not a device.
      Feb 12 14:23:21 prod-delayed-jobs systemd[1]: Starting Network Name Resolution...
      Feb 12 14:23:22 prod-delayed-jobs systemd[11831]: systemd-resolved.service: Failed to set up mount namespacing: Invalid argument
      Feb 12 14:23:22 prod-delayed-jobs systemd[11831]: systemd-resolved.service: Failed at step NAMESPACE spawning /lib/systemd/systemd-resolved
      Feb 12 14:23:22 prod-delayed-jobs systemd[1]: systemd-resolved.service: Main process exited, code=exited, status=226/NAMESPACE
      Feb 12 14:23:22 prod-delayed-jobs systemd[1]: systemd-resolved.service: Failed with result 'exit-code'.
      Feb 12 14:23:22 prod-delayed-jobs systemd[1]: Failed to start Network Name Resolution.
      Feb 12 14:23:22 prod-delayed-jobs systemd[1]: systemd-resolved.service: Service has no hold-off time, scheduling restart.
      Feb 12 14:23:22 prod-delayed-jobs systemd[1]: systemd-resolved.service: Scheduled restart job, restart counter is at 3.



      /etc/fstab contents - in case this is relevant



      UUID=2f54e8e6-ff9c-497a-88ea-ce159f6cd283 /               ext4    discard,errors=remount-ro 0       1
      /dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0
      //[REDACTED]/uploaded_files /home/myuser/shared cifs rw,username=myuser,password=[REDACTED],uid=myuser,gid=myuser 0 0


      Few systemd configuration files are pointing to /dev/null



      This is the case on all the 4 machines, however only 2 out of these 4 are having trouble with systemd-resolved. Strangely, hostname.service is pointing to /dev/null - wonder why?



      lrwxrwxrwx 1 root root    9 Nov 15 21:45 bootlogd.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 bootlogs.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 bootmisc.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 checkfs.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 checkroot-bootclean.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 checkroot.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 cryptdisks-early.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 cryptdisks.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 fuse.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 halt.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 hostname.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 hwclock.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 killprocs.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Apr 12 2018 lvm2.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Jul 2 2018 mdadm.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Jul 2 2018 mdadm-waitidle.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 motd.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 mountall-bootclean.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 mountall.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 mountdevsubfs.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 mountkernfs.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 mountnfs-bootclean.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 mountnfs.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Jan 16 2018 nfs-common.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 rc.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 rcS.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 reboot.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 rmnologin.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Dec 6 11:10 screen-cleanup.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 sendsigs.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 single.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 stop-bootlogd.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 stop-bootlogd-single.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Dec 6 11:07 sudo.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 umountfs.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 umountnfs.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 umountroot.service -> /dev/null
      lrwxrwxrwx 1 root root 9 Nov 15 21:45 x11-common.service -> /dev/null


      /lib/systemd/system



      [Unit]
      Description=Network Name Resolution
      Documentation=man:systemd-resolved.service(8)
      Documentation=https://www.freedesktop.org/wiki/Software/systemd/resolved
      Documentation=https://www.freedesktop.org/wiki/Software/systemd/writing-network-configuration-managers
      Documentation=https://www.freedesktop.org/wiki/Software/systemd/writing-resolver-clients
      DefaultDependencies=no
      After=systemd-sysusers.service systemd-networkd.service
      Before=network.target nss-lookup.target shutdown.target
      Conflicts=shutdown.target
      Wants=nss-lookup.target

      [Service]
      Type=notify
      Restart=always
      RestartSec=0
      ExecStart=!!/lib/systemd/systemd-resolved
      WatchdogSec=3min
      User=systemd-resolve
      CapabilityBoundingSet=CAP_SETPCAP CAP_NET_RAW CAP_NET_BIND_SERVICE
      AmbientCapabilities=CAP_SETPCAP CAP_NET_RAW CAP_NET_BIND_SERVICE
      PrivateTmp=yes
      PrivateDevices=yes
      ProtectSystem=strict
      ProtectHome=yes
      ProtectControlGroups=yes
      ProtectKernelTunables=yes
      ProtectKernelModules=yes
      MemoryDenyWriteExecute=yes
      RestrictRealtime=yes
      RestrictAddressFamilies=AF_UNIX AF_NETLINK AF_INET AF_INET6
      SystemCallFilter=~@clock @cpu-emulation @debug @keyring @module @mount @obsolete @raw-io @reboot @swap






      18.04 samba systemd systemd-resolved






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Feb 13 at 6:23









      Saurabh NandaSaurabh Nanda

      1013




      1013






















          1 Answer
          1






          active

          oldest

          votes


















          0














          I found that systemd-resolved fails to start when PrivateTmp=yes is set in the service file (/lib/systemd/system/systemd-resolved.service) as it appears to be by default. Not sure when this crept in. Recently, I think.



          I have yet to understand why it is set that way, as it must be able to write to /run (tmpfs) in a fashion that is shared externally (/etc/resolv.conf).



          Is PrivateTmp set in the service file on the ones that are working?



          NOTE: DNS still didn't work after changing the service, running systemctl daemon-reload, and restarting it. It started cleanly, but would not resolve. After a reboot, it started working.






          share|improve this answer








          New contributor




          brennanmh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.




















            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "89"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1117842%2fsystemd-resolved-crashing-with-failed-to-set-up-mount-namespacing-invalid-argu%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            I found that systemd-resolved fails to start when PrivateTmp=yes is set in the service file (/lib/systemd/system/systemd-resolved.service) as it appears to be by default. Not sure when this crept in. Recently, I think.



            I have yet to understand why it is set that way, as it must be able to write to /run (tmpfs) in a fashion that is shared externally (/etc/resolv.conf).



            Is PrivateTmp set in the service file on the ones that are working?



            NOTE: DNS still didn't work after changing the service, running systemctl daemon-reload, and restarting it. It started cleanly, but would not resolve. After a reboot, it started working.






            share|improve this answer








            New contributor




            brennanmh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.

























              0














              I found that systemd-resolved fails to start when PrivateTmp=yes is set in the service file (/lib/systemd/system/systemd-resolved.service) as it appears to be by default. Not sure when this crept in. Recently, I think.



              I have yet to understand why it is set that way, as it must be able to write to /run (tmpfs) in a fashion that is shared externally (/etc/resolv.conf).



              Is PrivateTmp set in the service file on the ones that are working?



              NOTE: DNS still didn't work after changing the service, running systemctl daemon-reload, and restarting it. It started cleanly, but would not resolve. After a reboot, it started working.






              share|improve this answer








              New contributor




              brennanmh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.























                0












                0








                0







                I found that systemd-resolved fails to start when PrivateTmp=yes is set in the service file (/lib/systemd/system/systemd-resolved.service) as it appears to be by default. Not sure when this crept in. Recently, I think.



                I have yet to understand why it is set that way, as it must be able to write to /run (tmpfs) in a fashion that is shared externally (/etc/resolv.conf).



                Is PrivateTmp set in the service file on the ones that are working?



                NOTE: DNS still didn't work after changing the service, running systemctl daemon-reload, and restarting it. It started cleanly, but would not resolve. After a reboot, it started working.






                share|improve this answer








                New contributor




                brennanmh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.










                I found that systemd-resolved fails to start when PrivateTmp=yes is set in the service file (/lib/systemd/system/systemd-resolved.service) as it appears to be by default. Not sure when this crept in. Recently, I think.



                I have yet to understand why it is set that way, as it must be able to write to /run (tmpfs) in a fashion that is shared externally (/etc/resolv.conf).



                Is PrivateTmp set in the service file on the ones that are working?



                NOTE: DNS still didn't work after changing the service, running systemctl daemon-reload, and restarting it. It started cleanly, but would not resolve. After a reboot, it started working.







                share|improve this answer








                New contributor




                brennanmh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                share|improve this answer



                share|improve this answer






                New contributor




                brennanmh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                answered 23 mins ago









                brennanmhbrennanmh

                1




                1




                New contributor




                brennanmh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.





                New contributor





                brennanmh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.






                brennanmh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Ask Ubuntu!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1117842%2fsystemd-resolved-crashing-with-failed-to-set-up-mount-namespacing-invalid-argu%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    List of shipwrecks in 1808...

                    Is there a lightweight tool to crop images quickly?Cropping Images using Command Line Tools OnlyHow to crop...

                    How to install updates via command line?29 packages can be updated - How?How do I update ubuntu packages...