启动Debian 9错误:“无法启动Raise网络接口”


11

Debian 9 Stretch启动时,在台式机上全新安装

...
Failed to start Raise network interfaces
...

错误发生。(电缆)LAN连接正常,但(USB)WiFi无法正常工作(检测到WiFi网络,但无法连接)。以前,在同一硬件Debian 8 Jessie上安装时工作正常,没有任何错误。

似乎问题与最近可预测的网络接口名称更改有关。找到的用户ABCDE具有相似的症状。但是,他们已经升级了Ubuntu系统(没有全新安装)。另外,提出的解决方案建议禁用固定/可预测/唯一名称的分配。我宁愿保留新的命名方案/标准,最终找到并消除原因(原因),它不能正常工作。

还发现用户FG存在相同问题-没有解决方案。

任何提示都会非常感谢。另外,如果您需要更多详细信息,我很乐意回答您的问题。

此外,您会找到一些详细的系统输出。

$ sudo systemctl status networking.service 
● networking.service - Raise network interfaces
   Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Mon 2017-09-04 17:21:42 IST; 1h 27min ago
     Docs: man:interfaces(5)
  Process: 534 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=1/FAILURE)
  Process: 444 ExecStartPre=/bin/sh -c [ "$CONFIGURE_INTERFACES" != "no" ] && [ -n "$(ifquery --read-environment --list --exclude=lo)" ] && udevadm settle (code=exited, status=0/SUCCESS)
 Main PID: 534 (code=exited, status=1/FAILURE)

Sep 04 17:21:42 XXX ifup[534]: than a configuration issue please read the section on submitting
Sep 04 17:21:42 XXX ifup[534]: bugs on either our web page at www.isc.org or in the README file
Sep 04 17:21:42 XXX ifup[534]: before submitting a bug.  These pages explain the proper
Sep 04 17:21:42 XXX ifup[534]: process and the information we find helpful for debugging..
Sep 04 17:21:42 XXX ifup[534]: exiting.
Sep 04 17:21:42 XXX ifup[534]: ifup: failed to bring up eth0
Sep 04 17:21:42 XXX systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
Sep 04 17:21:42 XXX systemd[1]: Failed to start Raise network interfaces.
Sep 04 17:21:42 XXX systemd[1]: networking.service: Unit entered failed state.
Sep 04 17:21:42 XXX systemd[1]: networking.service: Failed with result 'exit-code'.


$ cat /etc/network/interfaces.d/setup
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

EDIT2开始:

$ sudo ifconfig
[sudo] password for XXX: 
enp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.178.31  netmask 255.255.255.0  broadcast 192.168.178.255
        inet6 xxxx::xxx:xxxx:xxxx:xxxx  prefixlen 64  scopeid 0x20<link>
        ether xx:xx:xx:xx:xx:xx  txqueuelen 1000  (Ethernet)
        RX packets 765  bytes 523923 (511.6 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 803  bytes 101736 (99.3 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 17  

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1  (Local Loopback)
        RX packets 50  bytes 3720 (3.6 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 50  bytes 3720 (3.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlxf4f26d1b7521: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether xx:xx:xx:xx:xx:xx  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

EDIT2结束。

$ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
3: wlxf4f26d1b7521: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DORMANT group default qlen 1000
    link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff

EDIT开始:

$ lsusb
...
Bus 001 Device 004: ID 0cf3:9271 Atheros Communications, Inc. AR9271 802.11n
...

$ sudo cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

编辑结束。

EDIT3开始:

$ sudo systemctl status networking.service
● networking.service - Raise network interfaces
   Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
   Active: active (exited) since Tue 2017-09-05 10:29:16 IST; 44min ago
     Docs: man:interfaces(5)
  Process: 565 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=0/SUCCESS)
  Process: 438 ExecStartPre=/bin/sh -c [ "$CONFIGURE_INTERFACES" != "no" ] && [ -n "$(ifquery --read-environment --list --exclude=lo)" ] && udevadm settle (code=exited, status=0/SUCCESS)
 Main PID: 565 (code=exited, status=0/SUCCESS)
    Tasks: 0 (limit: 4915)
   CGroup: /system.slice/networking.service

Sep 05 10:26:56 sdd9 systemd[1]: Starting Raise network interfaces...
Sep 05 10:26:56 sdd9 ifup[565]: ifup: waiting for lock on /run/network/ifstate.enp3s0
Sep 05 10:29:16 sdd9 systemd[1]: Started Raise network interfaces.

编辑3结束。


我糊涂了。您说电缆连接有效,但USB wifi无效。但是您/etc/network/interfaces只有eth0,通常是有线连接。您的wifi设备在哪里?此外,您还会收到消息“ ifup:无法启动eth0”,这似乎与您的电缆工作正常的说法相矛盾。另外,我个人只是使​​用ifupifdown,但是我想我是过时的。
Faheem Mitha

@FaheemMitha谢谢您的帮助。首先,我有点“新手”,只是从表面上了解输出。wifi设备wlx____$ sudo ifconfig输出中。您是否需要其他详细信息-请向我发送终端命令?看到添加了$ lsusb。我home从旧系统(类似于Debian 9,但在笔记本电脑硬件上)复制了文件夹是否会对您产生任何影响?AFAIK网络设置未存储在其中-因此在问题文本中被省略。
Alex

@FaheemMitha wlx____不是无线连接(在之前的评论作为说明)。(被w命名前面的“ ” 打扰了。)但是,那是enp____什么?我也很困惑,对不起:|
Alex

1
你好 看看wikidevi.com/wiki/Atheros_AR9271以及wiki.debian.org/ath9k_htc。您是否已安装固件-粥头(apt-get install firmware-atheros)?接口名称wlan0基于该页面。
Faheem Mitha

1
每个人:/etc/network/interfaces.d/setup是由创建的文件vmdebootstrap,该文件还安排了/etc/network/interfaces其来源。alex:请勿混淆接口名称。它们对这个问题很重要。
JdeBP '17

Answers:


18

删除/etc/network/interfaces.d/setup文件,然后编辑/etc/network/interfaces如下:

auto lo
iface lo inet loopback

保存并重启

man interfaces

包括其他文件

  Lines  beginning  with  "source" are used to include stanzas from other
   files, so configuration can be split into many files. The word "source"
   is  followed  by the path of file to be sourced. Shell wildcards can be
   used.  (See wordexp(3) for details.)

在您的情况下,您使用/etc/network/interfaces.d/setup而不是配置网络/etc/network/interfaces

以“ allow-”开头的行用于标识应由各种子系统自动打开的接口。这可以使用“ ifup --allow = hotplug eth0 eth1”之类的命令来完成,如果仅在“ allow-hotplug”行中列出了eth0或eth1,它将仅显示eth0或eth1。注意“ allow-auto”和“ auto”是同义词。(标记为“ allow-hotplug”的接口在udev检测到它们时会弹出。这可以在启动时(如果接口已经存在),也可以在以后的时间(例如,插入USB网卡时)。请注意,这样做确实会与检测是否插入网络电缆无关。)


谢谢您的解决方案。请给我一个提示,“ <your_interface_here>”是什么,或在哪里找到它?
Alex

因此,我尝试使用eth0,重新启动然后eth1重新启动的方式,间接尝试使用文本。他们都没有工作。请参见上面问题EDIT2中的接口名称。我在那里添加了完整的接口名称。请帮助我找到正确的接口名称(在我的问题下方考虑JdeBP的注释)。谢谢。
Alex

1
尝试了以上所述(不删除变体和2X allow-hotplug ...)。可悲的是它没有用。行为已更改:(1)仍然存在启动错误,(2)NetworkManager不再看到/显示任何WiFi或LAN网络,不再显示device not managed两者的消息。但是,电缆局域网连接和互联网都可以。任何的想法?您是否已阅读问题下方JdeBP的评论?
Alex

尝试作为建议,以取代eth0enp3s0/etc/network/interfaces.d/setup对你的回答中建议的修改一起。没用 由于我在此问题上浪费了太多时间,因此我考虑重新安装整个系统,并准备(USB驱动器)在安装时提供WiFi驱动程序-上次我没有这样做。您认为这可行吗?
Alex

2
interfaces配置文件中删除所有内容,保留auto loiface lo inet loopback重新启动
GAD3R

5

只需在文件#的源代码前面放置一个,因此它不引用该文件为我解决了该问题。一切正常。该解决方案有点合乎逻辑。/etc/network/interfaces.d/*/etc/network/interfaces/interfaces.d/setup

谢谢大家的帮助!


-3

为我为Wlan工作!

nano /etc/network/interfaces

然后改变

auto lo 
iface lo inet static 

auto lo
iface lo inet loopback

3
接口配置文件上的默认设置loiface lo inet loopback
GAD3R
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.