I cannot access the livepatch service

Network access to the Ubuntu Livepatch Service (https://livepatch.canonical.com:443) is necessary as well as snapd version 2.15 - check your snapd version with snap version.

In addition to that, sometimes it could be a problem with the proxy configurations. Please check out this guide on how to configure the Livepatch client to use a proxy.

Hi @alesstimec,

If appropriate, can we add the following section regarding livepatch proxy issues to this page?

When a machine operates behind a proxy, users may experience an issue while enabling the default Livepatch service. The error occurs as follows:

Enabling default service livepatch
Stderr: Could not retrieve client information.:
GET request to "https://livepatch.canonical.com/v1/client/<id>/info" failed`

Unable to enable Livepatch: Failed running command '/snap/bin/canonical-livepatch enable <REDACTED>' [exit(1)].
Message: Could not retrieve client information.:
GET request to "https://livepatch.canonical.com/v1/client/<id>/info" failed

First, detach the machine from the Pro service. This will allow you to modify the proxy settings without affecting the current Pro service configuration.

sudo pro detach

Before proceeding, ensure that the HTTP_PROXY and HTTPS_PROXY environment variables are set with the correct values.

Set the proxy configurations for both the canonical-livepatch and pro services:

sudo pro config set http_proxy=${HTTP_PROXY}
sudo pro config set https_proxy=${HTTPS_PROXY}

sudo canonical-livepatch config http-proxy=${HTTP_PROXY}
sudo canonical-livepatch config https-proxy=${HTTPS_PROXY}

After setting the proxy configurations, re-attach the machine to the Pro service:

sudo pro attach

Best regards,

Hi @adilcan

Thanks for this! We were actually just about to add a separate page on how to configure the Livepatch Client to work behind a proxy. I think we can take what you’ve written up here and add it to a new page then link to that from here.

Hi @kian-parvin

Thanks for your reply! It’s great to know this will be useful. Please let me know if anything else is needed.

Best regards,

1 Like