ifup 每隔一段时间就会无法启动接口

ifup 每隔一段时间就会无法启动接口

我遇到了一个奇怪的问题,ifup 每次运行都会失败。以下是输出,您可以看到它处于失败、成功、失败等模式...:

bakalolo@User1:~/bashScripts$ sudo ifdown wlp3s0 && sudo ifup -v wlp3s0
Configuring interface wlp3s0=wlp3s0 (inet)
/bin/run-parts --exit-on-error --verbose /etc/network/if-pre-up.d
run-parts: executing /etc/network/if-pre-up.d/ethtool
run-parts: executing /etc/network/if-pre-up.d/wireless-tools
run-parts: executing /etc/network/if-pre-up.d/wpasupplicant
wpa_supplicant: wpa-driver nl80211,wext (default)
wpa_supplicant: /sbin/wpa_supplicant -s -B -P /run/wpa_supplicant.wlp3s0.pid -i wlp3s0 -D nl80211,wext -C /run/wpa_supplicant
Starting /sbin/wpa_supplicant...
wpa_supplicant: /sbin/wpa_supplicant daemon failed to start
run-parts: /etc/network/if-pre-up.d/wpasupplicant exited with return code 1
Failed to bring up wlp3s0.

bakalolo@User1:~/bashScripts$ sudo ifdown wlp3s0 && sudo ifup -v wlp3s0
ifdown: interface wlp3s0 not configured
Configuring interface wlp3s0=wlp3s0 (inet)
/bin/run-parts --exit-on-error --verbose /etc/network/if-pre-up.d
run-parts: executing /etc/network/if-pre-up.d/ethtool
run-parts: executing /etc/network/if-pre-up.d/wireless-tools
run-parts: executing /etc/network/if-pre-up.d/wpasupplicant
wpa_supplicant: wpa-driver nl80211,wext (default)
wpa_supplicant: /sbin/wpa_supplicant -s -B -P /run/wpa_supplicant.wlp3s0.pid -i wlp3s0 -D nl80211,wext -C /run/wpa_supplicant
Starting /sbin/wpa_supplicant...
wpa_supplicant: creating sendsigs omission pidfile: /run/sendsigs.omit.d/wpasupplicant.wpa_supplicant.wlp3s0.pid
wpa_supplicant: ctrl_interface socket located at /run/wpa_supplicant/wlp3s0
wpa_supplicant: configuring network block -- 0
wpa_supplicant: wpa-ssid "EmRtkGps2:cd:6b" -- OK
wpa_supplicant: wpa-psk ***** -- OK
wpa_supplicant: enabling network block 0 -- OK
/bin/ip addr add 192.168.42.150/255.255.255.0 broadcast 192.168.42.255    dev wlp3s0 label wlp3s0
/bin/ip link set dev wlp3s0   up
 /bin/ip route add default via 192.168.42.10  dev wlp3s0 onlink 
/bin/run-parts --exit-on-error --verbose /etc/network/if-up.d
run-parts: executing /etc/network/if-up.d/000resolvconf
run-parts: executing /etc/network/if-up.d/avahi-autoipd
run-parts: executing /etc/network/if-up.d/avahi-daemon
run-parts: executing /etc/network/if-up.d/ethtool
run-parts: executing /etc/network/if-up.d/upstart
run-parts: executing /etc/network/if-up.d/wpasupplicant

bakalolo@User1:~/bashScripts$ sudo ifdown wlp3s0 && sudo ifup -v wlp3s0
Configuring interface wlp3s0=wlp3s0 (inet)
/bin/run-parts --exit-on-error --verbose /etc/network/if-pre-up.d
run-parts: executing /etc/network/if-pre-up.d/ethtool
run-parts: executing /etc/network/if-pre-up.d/wireless-tools
run-parts: executing /etc/network/if-pre-up.d/wpasupplicant
wpa_supplicant: wpa-driver nl80211,wext (default)
wpa_supplicant: /sbin/wpa_supplicant -s -B -P /run/wpa_supplicant.wlp3s0.pid -i wlp3s0 -D nl80211,wext -C /run/wpa_supplicant
Starting /sbin/wpa_supplicant...
wpa_supplicant: /sbin/wpa_supplicant daemon failed to start
run-parts: /etc/network/if-pre-up.d/wpasupplicant exited with return code 1
Failed to bring up wlp3s0.

bakalolo@User1:~/bashScripts$ sudo ifdown wlp3s0 && sudo ifup -v wlp3s0
ifdown: interface wlp3s0 not configured
Configuring interface wlp3s0=wlp3s0 (inet)
/bin/run-parts --exit-on-error --verbose /etc/network/if-pre-up.d
run-parts: executing /etc/network/if-pre-up.d/ethtool
run-parts: executing /etc/network/if-pre-up.d/wireless-tools
run-parts: executing /etc/network/if-pre-up.d/wpasupplicant
wpa_supplicant: wpa-driver nl80211,wext (default)
wpa_supplicant: /sbin/wpa_supplicant -s -B -P /run/wpa_supplicant.wlp3s0.pid -i wlp3s0 -D nl80211,wext -C /run/wpa_supplicant
Starting /sbin/wpa_supplicant...
wpa_supplicant: creating sendsigs omission pidfile: /run/sendsigs.omit.d/wpasupplicant.wpa_supplicant.wlp3s0.pid
wpa_supplicant: ctrl_interface socket located at /run/wpa_supplicant/wlp3s0
wpa_supplicant: configuring network block -- 0
wpa_supplicant: wpa-ssid "EmRtkGps2:cd:6b" -- OK
wpa_supplicant: wpa-psk ***** -- OK
wpa_supplicant: enabling network block 0 -- OK
/bin/ip addr add 192.168.42.150/255.255.255.0 broadcast 192.168.42.255    dev wlp3s0 label wlp3s0
/bin/ip link set dev wlp3s0   up
 /bin/ip route add default via 192.168.42.10  dev wlp3s0 onlink 
/bin/run-parts --exit-on-error --verbose /etc/network/if-up.d
run-parts: executing /etc/network/if-up.d/000resolvconf
run-parts: executing /etc/network/if-up.d/avahi-autoipd
run-parts: executing /etc/network/if-up.d/avahi-daemon
run-parts: executing /etc/network/if-up.d/ethtool
run-parts: executing /etc/network/if-up.d/upstart
run-parts: executing /etc/network/if-up.d/wpasupplicant

/etc/network/interfaces 文件

auto lo
iface lo inet loopback

#
auto wlp3s0
iface wlp3s0 inet static
address 192.168.42.150
netmask 255.255.255.0
gateway 192.168.42.10
wpa-essid EmRtkGps2:cd:6b
wpa-psk emlidreach

编辑:发现一个临时修复程序,如果我sudo ifdown wlp3s0在每个之前输入sudo ifdown wlp3s0 && sudo ifup -v wlp3s0它每次都会运行,但我仍然不知道到底发生了什么??

相关内容