Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#70067 - boot: systemd network dependency problem
Attached to Project:
Arch Linux
Opened by Christophe Réquillart (crequill) - Thursday, 18 March 2021, 18:25 GMT
Last edited by Christian Hesse (eworm) - Friday, 19 March 2021, 08:37 GMT
Opened by Christophe Réquillart (crequill) - Thursday, 18 March 2021, 18:25 GMT
Last edited by Christian Hesse (eworm) - Friday, 19 March 2021, 08:37 GMT
|
DetailsDescription:
Some systemd services with network access are not started after a reboot (nrpe or snmpd or nfs mount). For example nrpe, the error is: mars 18 16:52:18 nrpe[386]: Cannot bind to any address. mars 18 16:52:18 nrpe[386]: Bind to port 5666 on X.X.Y.Z failed: Cannot assign requested address. mars 18 16:52:18 nrpe[386]: Starting up daemon If I look the boot, I can see: mars 18 16:52:34 systemd[1]: Reached target Network is Online. So why for example nrpe is launched 16 s. before network is up? It seems systemd change network.target dependency now to network-online.target. But all services are not updated. Additional info: * package version(s) : systemd 247.4-2, nrpe 4.0.3-1 * package used to get the network up is systemd-networkd Steps to reproduce: reboot |
This task depends upon
Closed by Christian Hesse (eworm)
Friday, 19 March 2021, 08:37 GMT
Reason for closing: Not a bug
Additional comments about closing: specific configuration
Friday, 19 March 2021, 08:37 GMT
Reason for closing: Not a bug
Additional comments about closing: specific configuration
Is the target active on your system? Does it help to require the target?
# systemctl status network.target
● network.target - Network
Loaded: loaded (/usr/lib/systemd/system/network.target>
Active: active since Thu 2021-03-18 16:52:18 CET; 14h>
Docs: man:systemd.special(7)
https://www.freedesktop.org/wiki/Software/sys>
mars 18 16:52:18 systemd[1]: Reached target Network.
With network.target just basic network functionality is available, so services can bind to ::/0 or 0.0.0.0/0 - if you want to bind to a specific ip address configured on an interface you have to use network-online.target. In that case just create drop-in configuration for your services, for example /etc/systemd/system/smtpd.service.d/network-online.conf:
[Unit]
Requires=network-online.target
After=network-online.target
Alternatively just bind to all addresses an configure your firewall to allow traffic from specific interface or address only.
So I test with After=syslog.target network-online.target for snmpd.service (I don't see your comments before). I have rebooted and snmpd.service is up.
Yes my services are configured to listen on a specific ip address, for example in snmpd.conf, agentaddress is configured with two addresses.
So for me, all services with network.target as dependency must be modified with network-online.target dependency.