即使在直接修补后,systemd-networkd-wait-online.service也不会成功完成

即使在直接修补后,systemd-networkd-wait-online.service也不会成功完成

我注意到它systemd-networkd-wait-online.service总是在我的笔记本电脑上。使用这方面的建议Arch Linux 维基页面,我编辑了服务文件:systemctl edit systemd-networkd-wait-online,并将以下内容添加到该文件中/etc/systemd/system/systemd-networkd-wait-online.service.d/override.conf

[Service]
ExecStart=
ExecStart=/usr/lib/systemd/systemd-networkd-wait-online --any

重新加载守护进程 ( systemctl daemon-reload) 后,我重新启动了服务:systemctl restart systemd-networkd-wait-online。然而两分钟后,服务仍然失败。我能做些什么?


我有工作的网络接口;这是输出ip a

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host noprefixroute 
       valid_lft forever preferred_lft forever
2: enp2s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
    link/ether b4:45:06:50:6b:7a brd ff:ff:ff:ff:ff:ff
3: wlp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether a8:93:4a:ac:d7:73 brd ff:ff:ff:ff:ff:ff
    inet 172.20.10.9/28 brd 172.20.10.15 scope global dynamic noprefixroute wlp3s0
       valid_lft 81362sec preferred_lft 81362sec
    inet6 fe80::3902:41a4:241f:a7ad/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
4: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default 
    link/ether 02:42:52:af:c1:0c brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
       valid_lft forever preferred_lft forever

我认为这可能是因为我正在使用手机的热点,我也尝试过使用有效的以太网连接,但仍然失败:

2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether b4:45:06:50:6b:7a brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.42/24 brd 192.168.1.255 scope global noprefixroute enp2s0
       valid_lft forever preferred_lft forever
    inet6 fe80::a540:801:603d:d8e9/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever

输出systemctl status systemd-networkd-wait-online

× systemd-networkd-wait-online.service - Wait for Network to be Configured
     Loaded: loaded (/usr/lib/systemd/system/systemd-networkd-wait-online.service; enabled; preset: enabled)
    Drop-In: /etc/systemd/system/systemd-networkd-wait-online.service.d
             └─override.conf
     Active: failed (Result: exit-code) since Thu 2023-10-19 11:43:19 BST; 15min ago
       Docs: man:systemd-networkd-wait-online.service(8)
    Process: 3401 ExecStart=/usr/lib/systemd/systemd-networkd-wait-online --any (code=exited, status=1/FAILURE)
   Main PID: 3401 (code=exited, status=1/FAILURE)
        CPU: 8ms

Oct 19 11:41:19 main systemd[1]: Starting Wait for Network to be Configured...
Oct 19 11:43:19 main systemd-networkd-wait-online[3401]: Timeout occurred while waiting for network connectivity.
Oct 19 11:43:19 main systemd[1]: systemd-networkd-wait-online.service: Main process exited, code=exited, status=1/FAILURE
Oct 19 11:43:19 main systemd[1]: systemd-networkd-wait-online.service: Failed with result 'exit-code'.
Oct 19 11:43:19 main systemd[1]: Failed to start Wait for Network to be Configured.

我不提供 的输出,journalctl -xeu systemd-networkd-wait-online.service因为它已经被 复制了systemctl status

networkctl输出:

IDX LINK        TYPE     OPERATIONAL SETUP    
  1 lo          loopback carrier     unmanaged
  2 enp2s0      ether    no-carrier  unmanaged
  3 wlp3s0      wlan     routable    unmanaged
  4 docker0     bridge   routable    unmanaged
  8 vethc59fd34 ether    enslaved    unmanaged

5 links listed.

相关内容