I'm having this problem (2-minute timeout during booting of Ubuntu 22.04) on my VPS right now. I've been fighting with this for half a day. Trying to read through tons of noise in this thread. And failing to understand if there is actually a fix here in this thread.
Running the command ( /lib/systemd/systemd-networkd-wait-online ) manually from bash under root does nothing but hanging for ~2 minutes and printing exactly the same error message as when run as a service during boot:
Code:
root@de:~# /lib/systemd/systemd-networkd-wait-online
Timeout occurred while waiting for network connectivity.
root@de:~#
And adding --timeout=0 to the command to disable the timing out just makes the command to hang for 18+ minutes, I didn't see a point to wait more and aborted it with Ctrl-C.