Moin moin,
für einen CIP-Pool probier ich grad paar Sachen mit einem Raspberry Pi B+ aus. Darauf läuft:
root@pi:~# lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 8.0 (jessie)
Release: 8.0
Codename: jessie
root@pi:~# cat /proc/version
Linux version 4.1.19+ (dc4@dc4-XPS13-9333) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611) ) #858 Tue Mar 15 15:52:03 GMT 2016
Das Accountmanagement läuft über nis. Prinzipiell funktionierts, ist aber nicht "bootfest":
root@pi:~# systemctl status nis -l
● nis.service - LSB: Start NIS client and server daemons.
Loaded: loaded (/etc/init.d/nis)
Active: active (exited) since Sa 2016-04-09 17:01:23 CEST; 1min 12s ago
Process: 433 ExecStart=/etc/init.d/nis start (code=exited, status=0/SUCCESS)
Apr 09 17:01:11 pi nis[433]: Setting NIS domainname to: *zensiert*.de.
Apr 09 17:01:11 pi ypbind[468]: Kann (YPBINDPROG, YPBINDVERS, upd) nicht beim portmapper registrieren.
Apr 09 17:01:22 pi nis[433]: Starting NIS services: ypbindbinding to YP server...........................................failed (backgrounded).
Apr 09 17:01:23 pi nis[433]: .
Apr 09 17:01:23 pi systemd[1]: Started LSB: Start NIS client and server daemons..
Alles anzeigen
Nach dem Booten jedes mal den Service neuzustarten ist keine Option. Nach vielen Stunden google, Foren, Bugreports bin ich (hoffentlich) auf der richtigen Fährte. Ich vermute, dass nis zu früh startet. Das legt der Vergleich mit den Startzeiten von rpcbind nahe:
root@pi:~# systemctl status rpcbind.target -l
● rpcbind.target - RPC Port Mapper
Loaded: loaded (/etc/insserv.conf.d/rpcbind; static)
Drop-In: /run/systemd/generator/rpcbind.target.d
└─50-hard-dependency-rpcbind-$portmap.conf
Active: active since Sa 2016-04-09 17:01:13 CEST; 1min 15s ago
Docs: man:systemd.special(7)
Apr 09 17:01:13 pi systemd[1]: Starting RPC Port Mapper.
Apr 09 17:01:13 pi systemd[1]: Reached target RPC Port Mapper.
root@pi:~# systemctl status rpcbind.service -l
● rpcbind.service - LSB: RPC portmapper replacement
Loaded: loaded (/etc/init.d/rpcbind)
Drop-In: /run/systemd/generator/rpcbind.service.d
└─50-rpcbind-$portmap.conf
Active: active (running) since Sa 2016-04-09 17:01:13 CEST; 1min 19s ago
Process: 503 ExecStart=/etc/init.d/rpcbind start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/rpcbind.service
└─526 /sbin/rpcbind -w
Apr 09 17:01:13 pi rpcbind[503]: Starting rpcbind daemon....
Apr 09 17:01:13 pi systemd[1]: Started LSB: RPC portmapper replacement.
Alles anzeigen
ypbind will um 17:01:11 auf den portmapper zugreifen, welcher aber erst um 17.01.13 von rpcbind bereitgestellt wird. Das Problem scheint bekannt zu sein:
https://bugs.launchpad.net/ubuntu/+source…nd/+bug/1558196
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=805167
https://lists.alioth.debian.org/pipermail/pkg-…ary/010711.html
Allerdings war keiner der Lösungsansätze erfolgreich. Die systemd Version beherrscht weder die Befehlsparameter systemctl edit noch systemctl add-wants. Im Verzeichnis /lib/systemd/system/ ist zwar die rpcbind.target Unit Datei vorhanden, die rpcbind.service aber nicht. Eine rpcbind.socket Datei gibt's auch nirgends.
Daher mal die Unit Dateien gesucht:
root@pi:~# systemctl cat nis
# /run/systemd/generator.late/nis.service
# Automatically generated by systemd-sysv-generator
[Unit]
SourcePath=/etc/init.d/nis
Description=LSB: Start NIS client and server daemons.
Before=runlevel2.target runlevel3.target runlevel4.target runlevel5.target
After=network-online.target rpcbind.target remote-fs.target
Wants=network-online.target
[Service]
Type=forking
Restart=no
TimeoutSec=5min
IgnoreSIGPIPE=no
KillMode=process
GuessMainPID=no
RemainAfterExit=yes
SysVStartPriority=1
ExecStart=/etc/init.d/nis start
ExecStop=/etc/init.d/nis stop
ExecReload=/etc/init.d/nis reload
Alles anzeigen
root@pi:~# systemctl cat rpcbind.service
# /run/systemd/generator.late/rpcbind.service
# Automatically generated by systemd-sysv-generator
[Unit]
SourcePath=/etc/init.d/rpcbind
Description=LSB: RPC portmapper replacement
DefaultDependencies=no
Before=sysinit.target shutdown.target
After=network-online.target local-fs.target
Wants=network-online.target
Conflicts=shutdown.target
[Service]
Type=forking
Restart=no
TimeoutSec=0
IgnoreSIGPIPE=no
KillMode=process
GuessMainPID=no
RemainAfterExit=yes
SysVStartPriority=13
ExecStart=/etc/init.d/rpcbind start
ExecStop=/etc/init.d/rpcbind stop
# /run/systemd/generator/rpcbind.service.d/50-rpcbind-$portmap.conf
# Automatically generated by systemd-insserv-generator
[Unit]
Wants=rpcbind.target
Before=rpcbind.target
Alles anzeigen
root@pi:~# systemctl cat rpcbind.target
# /lib/systemd/system/rpcbind.target
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
# This exists mostly for compatibility with SysV/LSB units, and
# implementations lacking socket/bus activation.
[Unit]
Description=RPC Port Mapper
Documentation=man:systemd.special(7)
RefuseManualStart=yes
# /run/systemd/generator/rpcbind.target.d/50-hard-dependency-rpcbind-$portmap.conf
# Automatically generated by systemd-insserv-generator
[Unit]
SourcePath=/etc/insserv.conf.d/rpcbind
Requires=rpcbind.service
Alles anzeigen
Hab dann in der nis.service Datei rpcbind.service unter After und Wants eingetragen. Allerdings scheinen die Dateien in den */generator* Ordnern temporär zu sein, jedenfalls war nach nem reboot wieder alles wie zuvor.
So, was nun? Wie bringe ich nis bei erst nach rpcbind zu starten? Die letzte Idee war, die Unit Dateien selbst anzulegen, allerdings weiß ich nicht was genau da rein gehört.
Hoffentlich kann mir jemand helfen