ovsdb-server.service from no where
Asked Answered
P

3

19

i update my system by:

$ apt-get upgrade

then bad things happened, when i reboot the system, i had it get a timeout about network connection.

i am pretty sure that, my network connection is fine (it unchanged during update), i can get ip allocated (both ethernet and wlan)

i have consulted google:

# anyway, i was told to run
$ sudo netplan apply
# and i get
WARNING:root:Cannot call Open vSwitch: ovsdb-server.service is not running.

i have never installed this ovsdb stuff in my server, but this warning is really annoying

it may related to network timeout, or not

how can i fix this (to erase this waring or just help me to solve network connection problem)

i tried:

$ systemctl status systemd-networkd-wait-online.service

and i get:

× systemd-networkd-wait-online.service - Wait for Network to be Configured
     Loaded: loaded (/lib/systemd/system/systemd-networkd-wait-online.service; enabled; vendor preset: disabled)
     Active: failed (Result: timeout) since Tue 2023-08-22 05:12:01 CST; 2 months 3 days ago
       Docs: man:systemd-networkd-wait-online.service(8)
    Process: 702 ExecStart=/lib/systemd/systemd-networkd-wait-online (code=exited, status=0/SUCCESS)
   Main PID: 702 (code=exited, status=0/SUCCESS)
        CPU: 22ms

Aug 22 05:11:59 ubuntu systemd[1]: Starting Wait for Network to be Configured...
Aug 22 05:12:01 ubuntu systemd[1]: systemd-networkd-wait-online.service: start operation timed out. Terminating.
Aug 22 05:12:01 ubuntu systemd[1]: systemd-networkd-wait-online.service: Failed with result 'timeout'.
Aug 22 05:12:01 ubuntu systemd[1]: Failed to start Wait for Network to be Configured.
Perlaperle answered 24/10, 2023 at 14:20 Comment(0)
P
25

i have solved this problem

netplan apply says ovsdb-server.service is not running, then i just install this openvswitch

since i run ubuntu server in raspberry pi, i need to install extra lib:

# run this first
$ sudo apt-get install linux-modules-extra-raspi
# run this then
$ sudo apt-get install openvswitch-switch-dpdk

you may need to check installation by run these command again

after the installation complete, no annoying WARNING shows again:

$ sudo netplan try

however, systemd-networkd-wait-online.service still timeout, no matter how many times you restart it

i have consulted the man page for systemd-networkd-wait-online.service usage

this service is just to wait all interface managed by systemd-networkd are ready

in fact, i only use ethernet interface and wlan interface, these interfaces work well

$ ip a
# status of my interfaces

so i asked chatgpt about how to wait specific interfaces for systemd-networkd-wait-online.service

it told my to add args in /lib/systemd/system/systemd-networkd-wait-online.service

$ vim /lib/systemd/system/systemd-networkd-wait-online.service
[Service]
Type=oneshot
# flag `--interface` is used to wait specific interface
# in this case, i need to wait wlan interface and ethernet interface
ExecStart=/lib/systemd/systemd-networkd-wait-online --interface=wlan0 --interface=eth0
RemainAfterExit=yes
# this parameter is used to set timeout, 30s is enough for my pi
TimeoutStartSec=30sec

after edition, you need to reload this script and restart service

$ systemctl daemon-reload
$ systemctl restart systemd-networkd-wait-online.service

that is all, everything gonna be fine (maybe)

Perlaperle answered 26/10, 2023 at 9:46 Comment(0)
C
6

It is a buggy warning that can be ignored.

See https://bugs.launchpad.net/ubuntu/+source/netplan.io/+bug/2041727 on the resolution of the bug.

Calibre answered 12/3 at 12:44 Comment(0)
G
5

I got the error on my Ubuntu 22.04 server when configuring a static IP to it.

This is a bug which has already been posted here(https://bugs.launchpad.net/ubuntu/+source/netplan.io/+bug/2041727). However in as much as it is a Warning!, ignoring it was not sufficient.

To do solve the issue on my end, I did a system upgrade;

  sudo apt upgrade

after this I installed openvswitch-switch-dpdk

    sudo apt install openvswitch-switch-dpdk

after I applied the netplan configuration using;

   sudo netplan apply

and the issue was resolved. Hope this

Grangerize answered 8/5 at 7:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.