Troubleshooting Ubuntu Pro
- 1 Frequently Reported Issues
- 1.1 1. Invalid Token error when running command: sudo pro attach $(vmware-rpctool "info-get guestinfo.ut.vss.ubuntu_pro.token")
- 1.2 2. Error: Failed to attach machine. See https://ubuntu.com/pro/dashboard" Solution:Ensure you can connect to the contract url: https://vss-ubuntu-pro.eis.utoronto.ca
- 1.3 3. Error when refreshing or updating Ubuntu Pro:Error connecting to /v1/contracts/cAK_rvDKBntn7BB0ruAJUHrk34967cvhR4KRVUB5CQ08/machine-activity/56b0f2f01cec4317bae42dfa96b5ec9f: 401 {"code":401,"message":"token parsing failed"}
- 1.4 4. Error when refreshing or updating Ubuntu Pro: error executing status: livepatchd error: daemon shutting down
- 1.5
- 2 References
Frequently Reported Issues
1. Invalid Token error when running command: sudo pro attach $(vmware-rpctool "info-get guestinfo.ut.vss.ubuntu_pro.token")
Solution:
Ensure the virtual machine is running on any of the clusters listed above.
vss-cli compute vm get {vm_id-or-name} domain
output:
MOREF : domain-c5877
NAME : FD3
Run the following command through the vss-cli
to attach Ubuntu Pro to your virtual machine
vss-cli --wait compute vm set {vm_id-or-name} ubuntu-pro attach
output:
id : B399A
status : SUBMITTED
task_id : 29870123-XXXX-4a03-894a-f350481XXXXX
message : Request has been accepted for processing
⏳ Waiting for request B399A to complete...
🎉 Request B399A completed successfully:
warnings : Ubuntu Pro settings have been re-applied.
errors :
Once you receive the confirmation that the Ubuntu Pro token is set up, proceed with updating packages on the desired virtual machine using the following commands:
sudo apt install ubuntu-advantage-pro ubuntu-advantage-tools
sudo pro attach $(vmware-rpctool "info-get guestinfo.ut.vss.ubuntu_pro.token")
2. Error: Failed to attach machine. See https://ubuntu.com/pro/dashboard"
Solution:
Ensure you can connect to the contract url: https://vss-ubuntu-pro.eis.utoronto.ca
Try the following command:
curl https://vss-ubuntu-pro.eis.utoronto.ca
output:
404 page not found
If your output is different, this means that you have a firewall or proxy configuration that is not allowing you to connect to our Ubuntu Pro instance. Feel free to contact us to troubleshoot further this issue.
3. Error when refreshing or updating Ubuntu Pro:
Error connecting to /v1/contracts/cAK_rvDKBntn7BB0ruAJUHrk34967cvhR4KRVUB5CQ08/machine-activity/56b0f2f01cec4317bae42dfa96b5ec9f: 401 {"code":401,"message":"token parsing failed"}
Solution:
Before accessing the virtual machine, execute the following
vss-cli
command to activate Ubuntu Pro environment variables.vss-cli --wait compute vm set {vm_id-or-name} ubuntu-pro attach
Access the virtual machine via ssh and upgrade to
sudo
permissions.ssh <USER>@<IP_ADDRESS> [-p <PORT>]
Download and execute the following script
#!/bin/bash CONFIG_FILE="/etc/ubuntu-advantage/uaclient.conf" EXPECTED_URL="https://vss-ubuntu-pro.eis.utoronto.ca" CONTRACT_LINE=$(grep "^contract_url:" "$CONFIG_FILE" 2>/dev/null) if [[ "$CONTRACT_LINE" == "contract_url: $EXPECTED_URL" ]]; then # Step 1: Detach Ubuntu Livepatch canonical-livepatch disable if [ $? -ne 0 ]; then echo "Error: Unable to Disable Ubuntu Pro Livepatch. Contact the VSS Team at <vss@eis.utoronto.ca>" exit 1 fi # Step 2: Detach Ubuntu Pro pro detach --assume-yes if [ $? -ne 0 ]; then echo "Error: Unable to detach Ubuntu Pro. Contact the VSS Team at <vss@eis.utoronto.ca>" exit 2 fi # Step 3: Install the new version of Ubuntu Pro Client apt install -y ubuntu-pro-client if [ $? -ne 0 ]; then echo "Error: Unable to install the ubuntu-pro-client package." exit 3 fi # Step 4: Attach Ubuntu Livepatch canonical-livepatch enable $(vmware-rpctool "info-get guestinfo.ut.vss.ubuntu_pro.livepatch.token") if [ $? -ne 0 ]; then echo "Error: Command failed" exit 4 fi # Step 5: Attach Ubuntu Pro pro attach $(vmware-rpctool "info-get guestinfo.ut.vss.ubuntu_pro.token") if [ $? -ne 0 ]; then echo "Error: Unable to Attach Ubuntu Pro. Contact the VSS Team at <vss@eis.utoronto.ca>" exit 5 fi else echo "This virtual machine doesn't run Ubuntu Pro with VSS-Public configuration" exit 10 fi
Test the Ubuntu Pro is working properly as admin
pro refresh
4. Error when refreshing or updating Ubuntu Pro: error executing status: livepatchd error: daemon shutting down
Restart the
snap.canonical-livepatch.canonical-livepatchd.service
servicesystemctl restart snap.canonical-livepatch.canonical-livepatchd.service
Check the status of the
snap.canonical-livepatch.canonical-livepatchd.service
servicesystemctl status snap.canonical-livepatch.canonical-livepatchd.service
References
University of Toronto - Since 1827