状态:运行 canonical-livepatch 时检查失败

状态:运行 canonical-livepatch 时检查失败

我刚刚安装了规范的 livepatch snap 包:

sudo snap install canonical-livepatch
sudo canonical-livepatch enable (and the code)

我还设置了无人值守升级:

sudo apt install unattended-upgrades
sudo dpkg-reconfigure unattended-upgrades

但是,当我想通过执行以下操作来检查 livepatch 状态时:

canonical-livepatch status --verbose

我明白了:

client-version: "5"
machine-id: a144ba7b92ec478495cc5918743fe0e7
machine-token: 46a92999127246328b5091f493ee7be0
architecture: x86_64
cpu-model: Intel(R) Core(TM) i5 CPU       M 430  @ 2.27GHz
last-check: 2016-11-02T11:38:33.551353308+02:00
boot-time: 2016-11-02T11:40:22+02:00
uptime: 12m0s
status:
- kernel: 4.4.0-45.66-generic
  running: true
  livepatch:
    state: check-failed
    version: ""
    fixes: ""

我应该担心状态:检查失败消息?如果是,是什么原因造成的?我该如何修复?

答案1

是的,你应该担心。我也遇到过这个问题。我能做的最好的事情就是每天禁用并重新启用实时修补(它可以工作几个小时,然后停止)。

你可以看一下日志:

# systemctl status snap.canonical-livepatch.canonical-livepatchd.service

由于某种原因,它会在一段时间后停止验证服务:

● snap.canonical-livepatch.canonical-livepatchd.service - Service for snap application canonical-livepatch.canonical-livepatchd
   Loaded: loaded (/etc/systemd/system/snap.canonical-livepatch.canonical-livepatchd.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2016-10-22 11:38:29 EDT; 1 weeks 3 days ago
 Main PID: 8435 (canonical-livep)
   CGroup: /system.slice/snap.canonical-livepatch.canonical-livepatchd.service
           └─8435 /snap/canonical-livepatch/15/canonical-livepatchd

Nov 02 03:39:08 firstborn canonical-livepatch[8435]: No payload available.
Nov 02 04:39:09 firstborn canonical-livepatch[8435]: Checking with livepatch service.
Nov 02 04:39:09 firstborn canonical-livepatch[8435]: Bad server status code: 403. URL: https://livepatch.canonical.com/api/machine/<id> {"error": "Invalid Machine Token"}
Nov 02 04:39:09 firstborn canonical-livepatch[8435]: No payload available.
Nov 02 05:39:09 firstborn canonical-livepatch[8435]: Checking with livepatch service.
Nov 02 05:39:09 firstborn canonical-livepatch[8435]: Bad server status code: 403. URL: https://livepatch.canonical.com/api/machine/<id> {"error": "Invalid Machine Token"}
Nov 02 05:39:09 firstborn canonical-livepatch[8435]: No payload available.
Nov 02 06:39:09 firstborn canonical-livepatch[8435]: Checking with livepatch service.
Nov 02 06:39:09 firstborn canonical-livepatch[8435]: Bad server status code: 403. URL: https://livepatch.canonical.com/api/machine/<id> {"error": "Invalid Machine Token"}
Nov 02 06:39:09 firstborn canonical-livepatch[8435]: No payload available.

答案2

对于遇到此问题的其他任何人来说,这对我有用:

sudo rm /etc/machine-id /var/lib/dbus/machine-id && sudo systemd-machine-id-setup

然后

sudo canonical-livepatch enable XXXXyourtokenIDXXXX

相关内容