我遇到这个问题已经有一段时间了,所以今天我尝试了我在网上找到的建议并运行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
from renderer: NetworkManager
innetplan
旨在添加,输出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 以及网络的混乱。我去了并遵循了这两个(或者无论如何都丢失了一些位),一切都很完美,只需几秒钟即可重新启动:)
https://linux.fernandocejas.com/docs/how-to/switch-from-network-manager-to-systemd-networkd
https://askubuntu.com/questions/1336247/removing-netplan-to-use-systemd-networkd-directly