Public bug reported: $ lsb_release -rd Description: Ubuntu 16.04.7 LTS Release: 16.04
Enabling a service results in an error: $ ua enable esm-infra One moment, checking your subscription first Unexpected error(s) occurred. For more details, see the log: /var/log/ubuntu-advantage.log To file a bug run: ubuntu-bug ubuntu-advantage-tools $ ua status SERVICE ENTITLED STATUS DESCRIPTION cis yes disabled Center for Internet Security Audit Tools esm-infra yes disabled UA Infra: Extended Security Maintenance (ESM) fips yes disabled NIST-certified core packages fips-updates yes disabled NIST-certified core packages with priority security updates livepatch yes n/a Canonical Livepatch service Contents of /var/log/ubuntu-advantage.log: 2021-11-10 09:25:35,161 - cli.py:(1456) [DEBUG]: Executed with sys.argv: ['/usr/bin/ua', 'enable', 'esm-infra'] 2021-11-10 09:25:35,162 - util.py:(425) [DEBUG]: Reading file: /var/lib/ubuntu-advantage/private/machine-token.json 2021-11-10 09:25:35,168 - util.py:(425) [DEBUG]: Reading file: /var/lib/ubuntu-advantage/notices.json 2021-11-10 09:25:35,168 - config.py:(508) [DEBUG]: File does not exist: /var/lib/ubuntu-advantage/notices.json 2021-11-10 09:25:35,168 - util.py:(682) [DEBUG]: Writing file: /var/lib/ubuntu-advantage/notices.json 2021-11-10 09:25:35,169 - util.py:(682) [DEBUG]: Writing file: /var/lib/ubuntu-advantage/private/lock 2021-11-10 09:25:35,170 - util.py:(425) [DEBUG]: Reading file: /var/lib/ubuntu-advantage/notices.json 2021-11-10 09:25:35,170 - util.py:(425) [DEBUG]: Reading file: /etc/os-release 2021-11-10 09:25:35,226 - util.py:(531) [DEBUG]: URL [POST]: https://contracts.canonical.com/v1/contracts/cAWDAc5Mn9nKYKY_N_99akawSxXgvmKkZSHB4ySCUaKA/context/machines/1ec59c1328c24dc88642e5ba37159708 f81, headers: {'Authorization': 'Bearer <REDACTED>', 'accept': 'application/json', 'content-type': 'application/json', 'user-agent': 'UA-Client/27.3~16.04.1'}, data: {"os": {"series": "xenial", "type": "Linux", "release": "16.04", "version": "16.04 LTS (Xenial Xerus)", "kernel": "4.10.8-docker-1", "distribution": "Ubuntu"}, "architecture": "amd64", "machineId": "1ec59c1328c24dc88642e5ba37159708\nf81"} 2021-11-10 09:25:35,229 - util.py:(425) [DEBUG]: Reading file: /var/lib/ubuntu-advantage/notices.json 2021-11-10 09:25:35,230 - util.py:(692) [DEBUG]: Removing file: /var/lib/ubuntu-advantage/notices.json 2021-11-10 09:25:35,230 - cli.py:(1426) [ERROR]: Unhandled exception, please file a bug Traceback (most recent call last): File "/usr/lib/python3/dist-packages/uaclient/cli.py", line 1385, in wrapper return func(*args, **kwargs) File "/usr/lib/python3/dist-packages/uaclient/cli.py", line 1471, in main return args.action(args, cfg=cfg) File "/usr/lib/python3/dist-packages/uaclient/cli.py", line 156, in new_f return f(*args, **kwargs) File "/usr/lib/python3/dist-packages/uaclient/cli.py", line 179, in new_f return f(args, cfg=cfg, **kwargs) File "/usr/lib/python3/dist-packages/uaclient/cli.py", line 137, in new_f retval = f(*args, cfg=cfg, **kwargs) File "/usr/lib/python3/dist-packages/uaclient/cli.py", line 820, in action_enable contract.request_updated_contract(cfg) File "/usr/lib/python3/dist-packages/uaclient/contract.py", line 452, in request_updated_contract machine_token=machine_token, contract_id=contract_id File "/usr/lib/python3/dist-packages/uaclient/contract.py", line 155, in request_machine_token_update detach=False, File "/usr/lib/python3/dist-packages/uaclient/contract.py", line 253, in _request_machine_token_update response, headers = self.request_url(url, **kwargs) File "/usr/lib/python3/dist-packages/uaclient/serviceclient.py", line 68, in request_url timeout=self.url_timeout, File "/usr/lib/python3/dist-packages/uaclient/util.py", line 535, in readurl resp = request.urlopen(req, timeout=timeout) File "/usr/lib/python3.5/urllib/request.py", line 163, in urlopen return opener.open(url, data, timeout) File "/usr/lib/python3.5/urllib/request.py", line 466, in open response = self._open(req, data) File "/usr/lib/python3.5/urllib/request.py", line 484, in _open '_open', req) File "/usr/lib/python3.5/urllib/request.py", line 444, in _call_chain result = func(*args) File "/usr/lib/python3.5/urllib/request.py", line 1304, in https_open context=self._context, check_hostname=self._check_hostname) File "/usr/lib/python3.5/urllib/request.py", line 1261, in do_open h.request(req.get_method(), req.selector, req.data, headers) File "/usr/lib/python3.5/http/client.py", line 1151, in request self._send_request(method, url, body, headers) File "/usr/lib/python3.5/http/client.py", line 1186, in _send_request self.putrequest(method, url, **skips) File "/usr/lib/python3.5/http/client.py", line 1003, in putrequest match.group())) http.client.InvalidURL: URL can't contain control characters. '/v1/contracts/cAWDAc5Mn9nKYKY_N_99akawSxXgvmKkZSHB4ySCUaKA/context/machines/1ec59c1328c24dc88642e5ba37159708\nf81' (found at least '\n') ProblemType: Bug DistroRelease: Ubuntu 16.04 Package: ubuntu-advantage-tools 27.3~16.04.1 Uname: Linux 4.10.8-docker-1 x86_64 ApportVersion: 2.20.1-0ubuntu2.30 Architecture: amd64 Date: Wed Nov 10 09:25:57 2021 ProcEnviron: TERM=xterm PATH=(custom, no user) XDG_RUNTIME_DIR=<set> LANG=en_US.UTF-8 SHELL=/bin/bash SourcePackage: ubuntu-advantage-tools UpgradeStatus: No upgrade log present (probably fresh install) ** Affects: ubuntu-advantage-tools (Ubuntu) Importance: Undecided Status: New ** Tags: amd64 apport-bug third-party-packages xenial -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1950433 Title: Enabling service results in error To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/ubuntu-advantage-tools/+bug/1950433/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs