我遇到这个问题已经有一段时间了,所以今天我尝试了在网上找到的一个建议,并运行systemd-analyze plot
并检查了输出。
我在这里附加 SVG 文件,因为除非我弄错了,否则只有两样东西需要很长时间才能启动,其中之一systemd-networkd-wait-online
(当然)但之后,奇怪的是,sendmail
我甚至没有在这个服务器上使用它,它在我的家庭网络内,只作为种子箱/媒体服务器运行。
我是不是漏掉了什么?我wlan
之前禁用了它以排除它,因为它是有线机器,不需要wlan
。
我禁用了sendmail
,重新启动,看着它超时,然后再次运行它,现在唯一需要时间的就是我正在尝试修复的东西。任何帮助都将不胜感激。
https://c0ld.net/slowboot-nosendmail.svg
以下是完整的 journalctl:http://0x0.st/Xo36.txt
它有一个静态 IP,不面向互联网,运行plex
、,bittorrent-nox
并jellyfin
在启动时安装了一些 USB 硬盘用于存储,除了和之外,这就是所有正在运行的东西webmin
。cockpit
它安装了完整的 Ubuntu GNome,但不会在启动时引导,我只是想在需要将其用作备份 PC 时玩一玩。
我真的不想通过禁用服务来掩盖问题。我甚至尝试renderer: networkd
从renderer: NetworkManager
netplan
意味着添加,输出networkctl
1 lo loopback carrier unmanaged
2 eno1 ether routable configured
3 wlp1s0 wlan off unmanaged
3 links listed.
所以没有什么疯狂的。
我optional: true
在 netplan 中也有 eno1 的配置。
编辑:还尝试添加 --any 和 --interface=eno1 如下所述,但两者仍然具有相同的超时时间。 https://ubuntuforums.org/showthread.php?t=2490962
Apr 21 15:15:16 jays-lenovo systemd[1]: Starting Wait for Network to be Configured...
░░ Subject: A start job for unit systemd-networkd-wait-online.service has begun execution
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A start job for unit systemd-networkd-wait-online.service has begun execution.
░░
░░ The job identifier is 3886.
Apr 21 15:17:16 jays-lenovo systemd-networkd-wait-online[4967]: Timeout occurred while waiting for network connectivity.
Apr 21 15:17:16 jays-lenovo systemd[1]: systemd-networkd-wait-online.service: Main process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ An ExecStart= process belonging to unit systemd-networkd-wait-online.service has exited.
░░
░░ The process' exit code is 'exited' and its exit status is 1.
Apr 21 15:17:16 jays-lenovo systemd[1]: systemd-networkd-wait-online.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ The unit systemd-networkd-wait-online.service has entered the 'failed' state with result 'exit-code'.
Apr 21 15:17:16 jays-lenovo systemd[1]: Failed to start Wait for Network to be Configured.
░░ Subject: A start job for unit systemd-networkd-wait-online.service has failed
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A start job for unit systemd-networkd-wait-online.service has finished with a failure.
░░
░░ The job identifier is 3886 and the job result is failed.
这是在使用 --interface=eno1 重新启动服务之后发生的,该服务肯定已启动!!!!
对 systemd-networkd.service 进行同样的检查
-- Boot 984031206640442cb02a40798ddf3b7f --
Apr 21 14:21:12 jays-lenovo systemd[1]: Starting Network Configuration...
░░ Subject: A start job for unit systemd-networkd.service has begun execution
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A start job for unit systemd-networkd.service has begun execution.
░░
░░ The job identifier is 49.
Apr 21 14:21:12 jays-lenovo systemd-networkd[1178]: lo: Link UP
Apr 21 14:21:12 jays-lenovo systemd-networkd[1178]: lo: Gained carrier
Apr 21 14:21:12 jays-lenovo systemd-networkd[1178]: Enumeration completed
Apr 21 14:21:12 jays-lenovo systemd[1]: Started Network Configuration.
░░ Subject: A start job for unit systemd-networkd.service has finished successfully
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A start job for unit systemd-networkd.service has finished successfully.
░░
░░ The job identifier is 49.
Apr 21 14:23:15 jays-lenovo systemd-networkd[1178]: eno1: Link UP
Apr 21 14:23:18 jays-lenovo systemd-networkd[1178]: eno1: Gained carrier
Apr 21 14:23:19 jays-lenovo systemd-networkd[1178]: eno1: Gained IPv6LL
Apr 21 14:51:50 jays-lenovo systemd-networkd[1178]: eno1: Re-configuring with /run/systemd/network/10-netplan-eno1.network
Apr 21 14:51:51 jays-lenovo systemd-networkd[1178]: eno1: Re-configuring with /run/systemd/network/10-netplan-eno1.network
Apr 21 14:51:51 jays-lenovo systemd-networkd[1178]: eno1: DHCPv6 lease lost
Apr 21 14:52:23 jays-lenovo systemd[1]: Stopping Network Configuration...
░░ Subject: A stop job for unit systemd-networkd.service has begun execution
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A stop job for unit systemd-networkd.service has begun execution.
░░
░░ The job identifier is 4966.
Apr 21 14:52:23 jays-lenovo systemd-networkd[1178]: eno1: DHCPv6 lease lost
Apr 21 14:52:23 jays-lenovo systemd[1]: systemd-networkd.service: Deactivated successfully.
░░ Subject: Unit succeeded
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ The unit systemd-networkd.service has successfully entered the 'dead' state.
Apr 21 14:52:23 jays-lenovo systemd[1]: Stopped Network Configuration.
░░ Subject: A stop job for unit systemd-networkd.service has finished
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A stop job for unit systemd-networkd.service has finished.
░░
░░ The job identifier is 4966 and the job result is done.
-- Boot dc2cb94cb1f649c49648ba8e085192db --
Apr 21 14:53:19 jays-lenovo systemd[1]: Starting Network Configuration...
░░ Subject: A start job for unit systemd-networkd.service has begun execution
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A start job for unit systemd-networkd.service has begun execution.
░░
░░ The job identifier is 25.
Apr 21 14:53:19 jays-lenovo systemd-networkd[1172]: lo: Link UP
Apr 21 14:53:19 jays-lenovo systemd-networkd[1172]: lo: Gained carrier
Apr 21 14:53:19 jays-lenovo systemd-networkd[1172]: Enumeration completed
Apr 21 14:53:19 jays-lenovo systemd[1]: Started Network Configuration.
░░ Subject: A start job for unit systemd-networkd.service has finished successfully
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A start job for unit systemd-networkd.service has finished successfully.
░░
░░ The job identifier is 25.
Apr 21 14:53:19 jays-lenovo systemd-networkd[1172]: eno1: Link UP
Apr 21 14:53:22 jays-lenovo systemd-networkd[1172]: eno1: Gained carrier
Apr 21 14:53:24 jays-lenovo systemd-networkd[1172]: eno1: Gained IPv6LL
Apr 21 15:26:32 jays-lenovo systemd-networkd[1172]: eno1: Re-configuring with /run/systemd/network/10-netplan-eno1.network
Apr 21 15:26:32 jays-lenovo systemd-networkd[1172]: eno1: DHCPv6 lease lost
Apr 21 15:26:32 jays-lenovo systemd-networkd[1172]: eno1: Re-configuring with /run/systemd/network/10-netplan-eno1.network
Apr 21 15:26:32 jays-lenovo systemd-networkd[1172]: eno1: DHCPv6 lease lost
满的https://c0ld.net/dmesg.html可在此处获取。目前我不知道还能尝试什么,我已经搜索过互联网了。
eno1 也被配置为静态 IP,因此它需要更长的时间才能可用,而不是更短的时间。
192.168.2.1 是我家的主路由器,家里还有多个不同的路由器和数十台设备,其他任何路由器都没有问题。
# This is the network config written by 'subiquity'
network:
version: 2
renderer: networkd
ethernets:
eno1:
optional: false
addresses:
- 192.168.2.99/24
nameservers:
addresses: [192.168.2.1]
routes:
- to: default
via: 192.168.2.1
答案1
哦,哇,好吧,经过一番折腾,对于未来的旅行者来说,NetworkManager、netplan 和 networkd 都乱七八糟。我去关注了这两个(或者说做了缺失的部分),一切都运行正常,几秒钟后就重启了 :)
https://linux.fernandocejas.com/docs/how-to/switch-from-network-manager-to-systemd-networkd