ovsdb-server.service from no where

43.4k views Asked by At

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.
2

There are 2 answers

0
buzz On BEST ANSWER

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)

0
Raffi On

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.