After getting token from here and trying to enable livepatch:
sudo canonical-livepatch enable XXXXXXXXXXXXXXXXXX I get the following error message:
2020/08/31 17:19:57 error executing enable: cannot enable machine: bad temporary server status 500 (URL: ) server response: machine token already exists How could I solve this problem and enable Canonical livepatch?
Ubuntu details:
NAME="Ubuntu" VERSION="20.04.1 LTS (Focal Fossa)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 20.04.1 LTS" VERSION_ID="20.04" HOME_URL="" SUPPORT_URL="" BUG_REPORT_URL="" PRIVACY_POLICY_URL="" VERSION_CODENAME=focal UBUNTU_CODENAME=focal 4 Answers
EDIT (nearly 2 years later): This is the nuclear option, though I don't know of any cases where it has caused any real issues. Please try a simple disable and re-enable first. If that fails, try the snap remove and snap install steps. If the previous two things failed to fix it, read on:
I had this same problem today and I fixed it by doing the following:
- Disable Livepatch either through the GUI or by running
canonical-livepatch disableas root - Uninstall Livepatch with
snap remove canonical-livepatchas root (optional. Try it first without doing this) - Run the command
rm /etc/machine-idas root to remove your current machine ID (if it says the file or directory doesn't exist, you can safely ignore it) - Run the command
systemd-machine-id-setupas root to regenerate the ID - Reinstall Livepatch with
snap install canonical-livepatchas root (if you removed it earlier) - Either grab your key from and follow the instructions there to re-enable or use the Livepatch GUI
If this works for you, please mark this answer as correct so I can get enough reputation to do stuff.
Edit: @scoobydoo had to run rm /etc/machine-id /var/lib/dbus/machine-id in step 3.
I just did the following,.. as already had a token,.. that I had saved when 1st installed on my 18.04 m/c.
sudo canonical-livepatch disable # to remove old UUID stuff sudo canonical-livepatch enable xxxxxxxxxxxxxxxxxxxxxxxxxxxx and got the following responses
Successfully disabled device. Removed machine-token: xxxxxxxxxxxxxxxxxxxxxxxxxxx $ sudo canonical-livepatch enable xxxxxxxxxxxxxxxxxxxxxxxxxxxxx Successfully enabled device. Using machine-token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 1Don't regenerate your machine-id unless you absolutely have to: you might simply need to uninstall and reinstall live patch. Assuming you have already disabled it via the GUI or command line (you should be prompted for your sudo password):
snap remove canonical-livepatch snap install canonical-livepatch Hit your search key (Windows key on many keyboards), search for Livepatch, and now enable from the GUI again. That worked for me and I didn't need to regenerate remove and remake the machine id.
Make sure to disconnect from your VPN, if you are using one. That was causing this issue for me.
0