3

On a Ubuntu Server LTS 20.x, with renderer : networkd, LAN / WAN Connectivity are all properly fucntional. However in Cockpit > Software Updates, it gives the error message:

Loading available updates failed    
Cannot refresh cache whilst offline    

Changing the setting to renderer : NetworkManager
makes Cockpit > Software Updates work flawlessly without impacting the Networking module in Cockpit.

But I would rather stick to renderer : networkd as this is a Server.

Any insight to get renderer : networkd to work ? Or Cockpit just 'needs' NetworkManager ?

Note:

sudo systemctl stop network-manager.service    
sudo systemctl disable network-manager.service     

Will make the Networking module in cockpit fail with error :

Network devices and graphs require NetworkManager
MarcoZen
  • 233
  • 1
  • 3
  • 12
  • Seems that is simply how the software works. https://dannyda.com/2020/04/08/how-to-fix-ubuntu-server-19-cockpit-cannot-refresh-cache-whilst-offline-and-cannot-refresh-cache-whilst-offline-errors/ – David Apr 24 '21 at 09:54
  • @David - disabling network-manager.service as advocated by that article disables the Networking module of Cockpit and gives error message -> Network devices and graphs require NetworkManager – MarcoZen Apr 24 '21 at 10:51
  • 1
    I should have been more clear there is no good way to do what you want to do. They are all bad ways. That is an example of another bad way. – David Apr 24 '21 at 10:52
  • @David - Hehehehee .... I understand where you are coming from buddy .... – MarcoZen Apr 24 '21 at 10:55

2 Answers2

3

Apparently Cockpit just 'needs' Network Manager.

That was hinted at in my question as well.

Changing the setting to renderer : NetworkManager makes Cockpit > Software Updates work flawlessly without impacting the Networking module in Cockpit.

Other workarounds cause some modules ( especially the Networking module ) to not function properly. Cockpit project github reference -> https://github.com/cockpit-project/cockpit/issues/15746

Note : This method also ensures that when you use Cockpit to manage your Virtual Machines, creating bridges etc work flawlessly as well.

MarcoZen
  • 233
  • 1
  • 3
  • 12
1

According to this, the easiest workaround until Ubuntu settles on a network manager is this:

nmcli con add type dummy con-name fake ifname fake0 ip4 1.2.3.4/24 gw4 1.2.3.1
Cees Timmerman
  • 604
  • 11
  • 26
  • 1
    Would just accepting NetworkManager ( nm ) as the default renderer be better than creating a dummy interface using the NetworkManager (nm -> nmcli ) ? For me, i just wanted consistency in the entire chain. I am just committed to nmcli now as its just very capable and well documented. The cockpit team also feels that this issue is NOT a bug for them, hence my decision to stick to NM – MarcoZen May 04 '21 at 15:00
  • Is there anything beyond that command required? I ran it and it still does not work. https://github.com/cockpit-project/cockpit/issues/8477#issuecomment-841398337 – JellyFilledNuts May 14 '21 at 17:44
  • @JellyFilledNuts A reboot might help. I can use Discover to update Code after adding the fake network so it doesn't mistakenly think it's offline. – Cees Timmerman May 16 '21 at 15:26