Can't get systemd-networkd to start successfully
It exits with 226/NAMESPACE
, which usually means that it was unable to enter a namespace to enable the protection specified in the .service
file.
There are at least two ways to solve it.
The easy and less secure way.
Copy /usr/lib/systemd/system/systemd-networkd.service
to /etc/systemd/system/
, open the copy with your favorite editor and remove the lines that start with Protect
. This disables the sandboxing, and should let it start.
More advanced but more secure
Recompile the kernel with CONFIG_NAMESPACES=y
.
Related videos on Youtube
dutsnekcirf
I am a Systems Engineer with a major focus in Satellite Communications and IT during my 18 years of work experience. I first spent a number of years in the IT field involved primarily in networking. My first IT job was as an Assistant Network Administrator while I was still a junior in high school. One of my first jobs out of college was as a software instructor for about a year and a half teaching computers and software products. The classes that I taught were mostly 8 hour courses given to a different group of approximately 30 students every day. I was a very good instructor and was rewarded with "Instructor of the Month" for three months straight. I was then promoted to IT Manager where I was in charge of all the PCs at the training facility. Not long after my time as an instructor I joined the Field Organization team with L3 Communications based out of Salt Lake City, Utah. However, I spent less than 4 weeks out of 11 years in Salt Lake City with the company due to the nature of the Field Organization. For the majority of this time I worked on and around various mobile and fixed, miniaturized and very large communications systems. These systems were largely associated with highly classified military programs in remote locations. As a result I was able to obtain a high level security clearance and spent a large part of my career on the road. I have moved and deployed to many remote locations over the years. During my time with this company I've advanced my career by completing my bachelor's degree in IT and have obtained a number of valuable industry standard certifications. Soon I hope to further advance my education by enrolling in a Master's program. I have also taken it upon myself to learn a fair amount of programming and to provide some very valuable products for my employer.
Updated on September 18, 2022Comments
-
dutsnekcirf over 1 year
I have a mini-pc with six network interfaces running CentOS 7.2 with Kernel 3.10 with a minimal install.
I want to name my interfaces net0-net5. To do so I'm trying to follow the suggestions mentioned here: http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
In the above article it states that in order to rename my interfaces I need to create .link files and place them in /etc/systemd/network. This is the new way in which one is required to rename their network interfaces in compliance with the systemd-networkd.
I'm finding however, that the systemd-networkd service won't start and without this service running, I don't think I can name my interfaces at all.
See the following:
systemctl --failed -l UNIT LOAD ACTIVE SUB DESCRIPTION <E2><97><8F> systemd-networkd.service loaded failed failed Network Service <E2><97><8F> systemd-networkd.socket loaded failed failed networkd rtnetlink so LOAD = Reflects whether the unit definition was properly loaded. ACTIVE = The high-level unit activation state, i.e. generalization of SUB. SUB = The low-level unit activation state, values depend on unit type. 2 loaded units listed. Pass --all to see loaded but inactive units, too. To show all installed unit files use 'systemctl list-unit-files'. systemctl status systemd-networkd -l ��● systemd-networkd.service - Network Service Loaded: loaded (/usr/lib/systemd/system/systemd-networkd.service; enabled; vendor preset: enabled) Active: failed (Result: start-limit) since Tue 2011-05-10 01:45:45 UTC; 32min ago Docs: man:systemd-networkd.service(8) Process: 317 ExecStart=/usr/lib/systemd/systemd-networkd (code=exited, status=226/NAMESPACE) Main PID: 317 (code=exited, status=226/NAMESPACE) May 10 01:45:45 localhost systemd[1]: Unit systemd-networkd.service entered failed state. May 10 01:45:45 localhost systemd[1]: systemd-networkd.service failed. May 10 01:45:45 localhost systemd[1]: systemd-networkd.service has no holdoff time, scheduling restart. May 10 01:45:45 localhost systemd[1]: start request repeated too quickly for systemd-networkd.service May 10 01:45:45 localhost systemd[1]: Failed to start Network Service. May 10 01:45:45 localhost systemd[1]: Unit systemd-networkd.service entered failed state. May 10 01:45:45 localhost systemd[1]: systemd-networkd.service failed. May 10 01:45:45 localhost systemd[1]: start request repeated too quickly for systemd-networkd.service May 10 01:45:45 localhost systemd[1]: Failed to start Network Service. May 10 01:45:45 localhost systemd[1]: systemd-networkd.service failed. systemctl status systemd-networkd.socket -l ��● systemd-networkd.socket - networkd rtnetlink socket Loaded: loaded (/usr/lib/systemd/system/systemd-networkd.socket; enabled; vendor preset: disabled) Active: failed (Result: service-failed-permanent) since Tue 2011-05-10 01:45:45 UTC; 39min ago Docs: man:systemd-networkd.service(8) man:rtnetlink(7) Listen: route 273 (Netlink) May 10 01:45:45 localhost systemd[1]: Unit systemd-networkd.socket entered failed state. Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
I should mention that NetworkManager is not installed nor is DHClient. Due to the fact that this was a minimal install I thought I'd show what processes are running:
ps -ax PID TTY STAT TIME COMMAND 1 ? Ss 0:09 /init 2 ? S 0:00 [kthreadd] 3 ? S 0:00 [ksoftirqd/0] 5 ? S< 0:00 [kworker/0:0H] 7 ? S 0:00 [migration/0] 8 ? S /0] 10 ? S 0:00 [rcuob/1] 11 ? S 0:00 [rcuob/2] 12 ? S 0:00 [rcuob/3] 13 ? S 0:00 [rcu_sched] 14 ? S 0:00 [rcuos/0] 15 ? S 0:00 [rcuos/1] 16 ? S 0:00 [rcuos/2] 17 ? S 0:00 [rcuos/3] 18 ? S 0:00 [watchdog/0] 19 ? S 0:00 [watchdog/1] 20 ? S 0:00 [migration/1] 21 ? S 0:00 [ksoftirqd/1] 23 ? S< 0:00 [kworker/1:0H] 24 ? S< 0:00 [khelper] 25 ? S 0:00 [kdevtmpfs] 26 ? S< 0:00 [netns] 27 ? S< 0:00 [perf] 28 ? S< 0:00 [writeback] 29 ? S< 0:00 [kintegrityd] 30 ? S< 0:00 [bioset] 31 ? S< 0:00 [kblockd] 32 ? S< 0:00 [md] 33 ? S 0:00 [kworker/0:1] 34 ? S 0:00 [kworker/1:1] 38 ? S 0:00 [khungtaskd] 39 ? S 0:00 [kswapd0] 40 ? SN 0:00 [ksmd] 41 ? SN 0:00 [khugepaged] 42 ? S 0:00 [fsnotify_mark] 43 ? S< 0:00 [crypto] 51 ? S< 0:00 [kthrotld] 54 ? S< 0:00 [kmpath_rdacd] 55 ? S 0:00 [kworker/1:2] 56 ? S< 0:00 [kpsmoused] 57 ? S 0:00 [kworker/0:2] 58 ? S< 0:00 [ipv6_addrconf] 77 ? S< 0:00 [deferwq] 89 ? Ss 0:00 /usr/lib/systemd/systemd-journald 96 ? S< 0:00 [rpciod] 109 ? S 0:00 [kauditd] 110 ? Ss 0:00 /usr/sbin/lvmetad -f 131 ? Ss 0:00 /usr/lib/systemd/systemd-udevd 160 ? S< 0:00 [events_power_ef] 164 ? S< 0:00 [ata_sff] 166 ? S 0:17 [kworker/u8:3] 167 ? S 0:00 [scsi_eh_0] 169 ? S< 0:00 [scsi_tmf_0] 172 ? S 0:00 [scsi_eh_1] 173 ? S< 0:00 [scsi_tmf_1] 174 ? S 0:00 [kworker/u8:4] 175 ? S 0:00 [scsi_eh_2] 176 ? S< 0:00 [scsi_tmf_2] 177 ? S 0:00 [scsi_eh_3] 178 ? S< 0:00 [scsi_tmf_3] 181 ? S< 0:00 [kvm-irqfd-clean] 208 ? S< 0:00 [kworker/0:1H] 209 ? S< 0:00 [kworker/1:1H] 213 ? S 0:00 [jbd2/sda1-8] 214 ? S< 0:00 [ext4-rsv-conver] 215 ? S< 0:00 [ext4-unrsv-conv] 235 ? S<sl 0:00 /sbin/auditd -n 260 ? SNs 0:00 /usr/sbin/alsactl -s -n 19 -c -E ALSA_CONFIG_PATH=/et 262 ? SNsl 0:00 /usr/libexec/rtkit-daemon 263 ? Ss 0:00 /bin/dbus-daemon --system --address=systemd: --nofork 268 ? Ss 0:00 avahi-daemon: running [linux.local] 269 ? Ssl 0:00 /usr/bin/python -Es /usr/sbin/firewalld --nofork --no 270 ? Ss 0:00 /usr/lib/systemd/systemd-logind 279 ? Ss 0:00 /usr/sbin/gpm -m /dev/input/mice -t exps2 280 ? Ss 0:00 /usr/sbin/irqbalance --foreground 281 ? Ssl 0:00 /usr/sbin/rsyslogd -n 282 ? Ssl 0:00 /usr/sbin/gssproxy -D 284 ? S 0:00 avahi-daemon: chroot helper 500 ? Ss 0:00 /usr/sbin/sshd -D 503 ? Ssl 0:00 /usr/bin/python -Es /usr/sbin/tuned -l -P 510 ? Ssl 0:00 /usr/sbin/libvirtd 512 ? Ss 0:00 /usr/sbin/xinetd -stayalive -pidfile /var/run/xinetd. 519 ? Ss 0:00 /usr/sbin/crond -n 546 tty1 Ss+ 0:00 /sbin/agetty --noclear tty1 linux 547 ? Ss 0:00 login -- mini 976 ? Ssl 0:00 /usr/lib/polkit-1/polkitd --no-debug 1022 ? S 0:00 /sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/de 1023 ? S 0:00 /sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/de 1025 ttyS0 Ss 0:00 -bash 1057 ttyS0 S 0:00 su - 1058 ttyS0 S 0:00 -bash 1093 ? Ss 0:00 /usr/sbin/anacron -s 15547 ttyS0 R+ 0:00 ps -ax
One thing I find interesting is that /init is listed as PID 1 but ps -p 1 -o comm= shows that I'm running systemd. Also:
[root@localhost tmp]# pstree
systemd-+-agetty |-alsactl |-anacron |-auditd---{auditd} |-avahi-daemon---avahi-daemon |-crond |-dbus-daemon |-dnsmasq---dnsmasq |-firewalld---{firewalld} |-gpm |-gssproxy---5*[{gssproxy}] |-irqbalance |-libvirtd---15*[{libvirtd}] |-login---bash---su---bash---pstree |-lvmetad |-polkitd---5*[{polkitd}] |-rsyslogd---2*[{rsyslogd}] |-rtkit-daemon---2*[{rtkit-daemon}] |-sshd |-systemd-journal |-systemd-logind |-systemd-udevd |-tuned---4*[{tuned}] `-xinetd
Any ideas as to what I should do to get systemd-networkd.service and systemd-networkd.socket to load successfully would be greatly appreciated.
-
Michael Hampton about 8 yearsThe naming scheme you've proposed is exactly the scheme we've been stuck with for decades and are finally getting rid of! Please save your sanity and reconsider this.
-