Ubuntu 20.04 服务器我遇到了一个奇怪的问题,我只能在虚拟机上遇到这个问题,而在任何裸机安装上都找不到它。
在完成全新安装并配置网络后,netplan 可以正常工作。但是,在运行 atp update 后,netplan 会中断。我收到的错误如下
root@wozdc01:/home/zeus# netplan try
Job for netplan-wpa-wlp4s0.service canceled.
An error occurred: Command '['systemctl', 'stop', 'systemd-networkd.service', 'netplan-wpa-*.service']' returned non-zero exit status 1.
Reverting.
Job for netplan-wpa-wlp4s0.service canceled.
Traceback (most recent call last):
File "/usr/share/netplan/netplan/cli/commands/try_command.py", line 84, in command_try
NetplanApply().command_apply(run_generate=True, sync=True, exit_on_error=False)
File "/usr/share/netplan/netplan/cli/commands/apply.py", line 160, in command_apply
utils.systemctl_networkd('stop', sync=sync, extra_services=wpa_services)
File "/usr/share/netplan/netplan/cli/utils.py", line 125, in systemctl_networkd
subprocess.check_call(command)
File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['systemctl', 'stop', 'systemd-networkd.service', 'netplan-wpa-*.service']' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/sbin/netplan", line 23, in <module>
netplan.main()
File "/usr/share/netplan/netplan/cli/core.py", line 50, in main
self.run_command()
File "/usr/share/netplan/netplan/cli/utils.py", line 257, in run_command
self.func()
File "/usr/share/netplan/netplan/cli/commands/try_command.py", line 66, in run
self.run_command()
File "/usr/share/netplan/netplan/cli/utils.py", line 257, in run_command
self.func()
File "/usr/share/netplan/netplan/cli/commands/try_command.py", line 95, in command_try
self.revert()
File "/usr/share/netplan/netplan/cli/commands/try_command.py", line 118, in revert
NetplanApply().command_apply(run_generate=False, sync=True, exit_on_error=False)
File "/usr/share/netplan/netplan/cli/commands/apply.py", line 160, in command_apply
utils.systemctl_networkd('stop', sync=sync, extra_services=wpa_services)
File "/usr/share/netplan/netplan/cli/utils.py", line 125, in systemctl_networkd
subprocess.check_call(command)
File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['systemctl', 'stop', 'systemd-networkd.service', 'netplan-wpa-*.service']' returned non-zero exit status 1.
无论对 yaml 文件是否进行了任何更改,都会发生此错误。
以下是 apt 更新的软件包列表
accountsservice alsa-ucm-conf apparmor apport apt apt-utils base-files bash bcache-tools bind9-dnsutils
bind9-host bind9-libs bolt bsdutils busybox-initramfs busybox-static ca-certificates command-not-found
cryptsetup cryptsetup-bin cryptsetup-initramfs cryptsetup-run curl dbus dbus-user-session distro-info-data fdisk
finalrd fwupd fwupd-signed gcc-10-base gir1.2-glib-2.0 gir1.2-packagekitglib-1.0 glib-networking
glib-networking-common glib-networking-services grub-common grub-efi-amd64 grub-efi-amd64-bin
grub-efi-amd64-signed grub2-common initramfs-tools initramfs-tools-bin initramfs-tools-core intel-microcode
krb5-locales landscape-common language-selector-common less libaccountsservice0 libapparmor1 libapt-pkg6.0
libasound2 libasound2-data libblkid1 libbrotli1 libc-bin libc6 libcryptsetup12 libcurl3-gnutls libcurl4
libdbus-1-3 libdns-export1109 libdrm-common libdrm2 libefiboot1 libefivar1 libfdisk1 libfreetype6 libfwupd2
libfwupdplugin1 libgcc-s1 libgirepository-1.0-1 libglib2.0-0 libglib2.0-bin libglib2.0-data libgnutls30
libgssapi-krb5-2 libisc-export1105 libjson-c4 libk5crypto3 libkrb5-3 libkrb5support0 libldap-2.4-2
libldap-common liblzma5 libmaxminddb0 libmount1 libnetplan0 libnss-systemd libp11-kit0 libpackagekit-glib2-18
libpam-modules libpam-modules-bin libpam-runtime libpam-systemd libpam0g libparted2 libperl5.30 libplymouth5
libproxy1v5 libpython3.8 libpython3.8-minimal libpython3.8-stdlib libseccomp2 libsmartcols1 libsqlite3-0
libssh-4 libssl1.1 libstdc++6 libsystemd0 libudev1 libuuid1 libuv1 libx11-6 libx11-data linux-base
linux-firmware linux-generic linux-headers-generic linux-image-generic locales login lshw lsof mdadm mount
netplan.io open-iscsi open-vm-tools openssh-client openssh-server openssh-sftp-server openssl packagekit
packagekit-tools parted passwd perl perl-base perl-modules-5.30 plymouth plymouth-theme-ubuntu-text
python-apt-common python3-apport python3-apt python3-commandnotfound python3-cryptography python3-distupgrade
python3-distutils python3-gdbm python3-lib2to3 python3-problem-report python3-software-properties
python3-update-manager python3-urllib3 python3.8 python3.8-minimal rsyslog shim shim-signed snapd
software-properties-common sosreport strace sudo systemd systemd-sysv systemd-timesyncd tar thermald tmux tzdata
ubuntu-minimal ubuntu-release-upgrader-core ubuntu-server ubuntu-standard udev unattended-upgrades
update-manager-core update-notifier-common util-linux uuid-runtime wireless-regdb xz-utils zlib1g
我已经多次进行全新安装并从头开始重新创建虚拟机。主机也已重新启动。
有任何想法吗?