I am running Ubuntu 20.04 with kernel 5.11.0-40 and I am now experiencing a persistent error with Livepatch when starting my machine (the shield icon shows red). I have had this temporarily before, but it usually clears after a restart or rarely a software update.
The Software Updater window shows:
Canonical Livepatch has experienced an internal error. Please refer to https://wiki.ubuntu.com/Kernel/Livepatch#CommonIssues for further information.
canonical-livepatch status
shows:
last check: 4 minutes ago
kernel: 5.11.0-40.44~20.04.2-generic
server check-in: failed: livepatch check failed: POST request to "https://livepatch.canonical.com/v1/client/d42fa77my machine id /updates" failed
patch state: ✓ no livepatches needed for this kernel yet
tier: updates (Free usage; This machine beta tests new patches.)
machine id: removed for this post
The wiki and other questions have provided no help. All authoritative suggestions are greatly appreciated.
UPDATE 11.45 GMT
The error is on my desktop machine. I also have a laptop, which runs the same Ubuntu and kernel version, and Livepatch works fine there (nice green shield icon).
Note the following output from a terminal on the laptop:
$ uname -a
Linux nick-X555LAB 5.11.0-40-generic #44~20.04.2-Ubuntu SMP Tue Oct 26 18:07:44 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
$ sudo canonical-livepatch refresh
sudo: canonical-livepatch: command not found
$ canonical-livepatch refresh
2021/11/18 11:43:26 error executing refresh: please re-run using sudo
So pick the bones out of that - I can't!
UPDATE 2
I signed up for free Ubuntu Advantage and ran ua attach, as suggested somewhere.
The o/p was:
$ sudo ua attach SOME TOKEN OR MY MACHINE ID
Enabling default service esm-infra
Updating package lists
UA Infra: ESM enabled
Updating 'livepatch' on changed directives.
Disabling Livepatch prior to re-attach with new token
Canonical livepatch enabled.
This machine is now attached to 'MY EMAIL ADDRESS'
This really should not have been a necessary procedure to follow without any warning from Canonical. I'm not impressed.
I forgot to add: Livepatch now shows a green shield icon.
UPDATE 3
After a reboot it continued to work. It was solved, I thought, but NO. It is back showing the red shield and
canonical-livepatch status
last check: 24 seconds ago
kernel: 5.11.0-40.44~20.04.2-generic
server check-in: failed: livepatch check failed: POST request to "https://livepatch.canonical.com/v1/client/...private/updates" failed
UPDATE 4
It appears that my error has vanished now (0921 GMT, November 21st), without intervention from me. - and now it has come back again by 11.59