升级到 Ubuntu 18.04.1 LTS 后,无法启动 Raise 网络接口

升级到 Ubuntu 18.04.1 LTS 后,无法启动 Raise 网络接口

ifup 卡住,启动和关闭都需要很长时间。

me@K501L:~$ systemctl status networking.service
● networking.service - Raise network interfaces
   Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
   Active: failed (Result: timeout) since Wed 2018-08-01 13:24:54 CEST; 1h 0min ago
     Docs: man:interfaces(5)
  Process: 1049 ExecStart=/sbin/ifup -a --read-environment (code=killed, signal=TERM)

  Process: 918 ExecStartPre=/bin/sh -c [ "$CONFIGURE_INTERFACES" != "no" ] && [ -n "$(ifquery --read-environment --list --exclude=lo)" ] &&
 Main PID: 1049 (code=killed, signal=TERM)

août 01 13:19:52 K501L systemd[1]: Starting Raise network interfaces...
août 01 13:19:55 K501L ifup[1049]: check cable
août 01 13:20:00 K501L ifup[1049]: /sbin/ifup: waiting for lock on /run/network/ifstate.enp2s0
août 01 13:24:54 K501L systemd[1]: networking.service: Start operation timed out. Terminating.
août 01 13:24:54 K501L systemd[1]: networking.service: Main process exited, code=killed, status=15/TERM
août 01 13:24:54 K501L systemd[1]: networking.service: Failed with result 'timeout'.
août 01 13:24:54 K501L systemd[1]: Failed to start Raise network interfaces.

/etc/接口

#LAN
auto enp2s0
iface enp2s0 inet static
    address 10.0.0.2/24 
    gateway 10.0.0.1
    dns-nameserver 10.0.0.1

以为它说它没有提高:

2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000

/etc/resolv.conf

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
# 127.0.0.53 is the systemd-resolved stub resolver.
# run "systemd-resolve --status" to see details about the actual nameservers.
nameserver 10.0.0.1
nameserver 127.0.0.53

如果我从 /etc/interfaces 中删除此行,它就会起作用

dns-nameserver 10.0.0.1

答案1

它来自 avahi-deamon,自从 Bionic 升级以来:

avahi-daemon-check-dns.sh 永远挂起

可以通过删除 avahi-deamon 来修复此问题:

apt-get remove avahi-daemon

或者通过编辑“/usr/lib/avahi/avahi-daemon-check-dns.sh”:

在 dns_has_local() 中替换

OUT=`LC_ALL=C host -t soa local. 2>&1  

OUT=`LC_ALL=C /usr/bin/timeout 5 host -t soa local. 2>&1`

你只会被卡住五秒钟

相关内容