Additional observation NetworkManager is installed only because it is required by cockpit- networkmanager.
The system itself does not use NetworkManager to manage its primary network interface. The primary Ethernet interface (eno1) is configured using Netplan + systemd-networkd, which is the default configuration for this Ubuntu Server installation. As expected, NetworkManager reports the interface as unmanaged: GENERAL.STATE: unmanaged At the same time: systemd-networkd reports the interface as fully online (State: routable, Online state: online) apt update works normally Internet connectivity is fully functional curl https://connectivity-check.ubuntu.com/ returns HTTP 204 Despite this, NetworkManager reports only: connected (local only) and PackageKit internally reports: Network: offline NetworkState = 1 This suggests that PackageKit may be relying solely on NetworkManager's connectivity state, even on systems where the network is intentionally managed by systemd-networkd instead of NetworkManager. If that is the intended behaviour, PackageKit (and Cockpit Package Updates) may incorrectly consider an otherwise fully functional Ubuntu Server installation to be offline. Why this might be a bug Ubuntu Server installations commonly use systemd-networkd instead of NetworkManager. Installing Cockpit with the cockpit-networkmanager package automatically installs NetworkManager as a dependency, even if NetworkManager is not used to manage the system's network. This combination appears sufficient to reproduce the issue: Netplan + systemd-networkd manages the network. NetworkManager is installed but does not manage the Ethernet interface. PackageKit reports Network: offline. pkgcli refresh fails with "Cannot refresh cache whilst offline". Cockpit Package Updates cannot install updates, even though APT works correctly and the update candidate exists. It is possible that PackageKit should either: determine connectivity independently of NetworkManager when NetworkManager is not managing the active interface, or fall back to another connectivity source (for example, systemd-networkd), or avoid treating the system as offline solely because NetworkManager reports only local connectivity while the system demonstrably has Internet access. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2159048 Title: pkgcli refresh fails with "Cannot refresh cache whilst offline" although apt and network work correctly To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/packagekit/+bug/2159048/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
