2

Trying to upgrade from 18.04. I'm getting a 401 unauthorized when trying to update && upgrade. I do not have UA nor have I ever. It seems to be trying to pull from ESM even without UA enabled. Because it's getting 401, it cannot update the packages, and because of this, I cannot release upgrade. Since this is a new account, I can't post too many URLs. Assume [ESMURL] = https://esm.ubuntu.com/infra/ubuntu

$ cat /etc/issue
 Ubuntu 18.04.6 LTS \n \l
 
 sudo do-release-upgrade
 Checking for a new Ubuntu release
 Please install all available updates for your release before upgrading.
 
 
 sudo apt update && sudo apt upgrade -y
 Hit:1 http://us.archive.ubuntu.com/ubuntu bionic InRelease
 Hit:2 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease           
 Hit:3 http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease                                               
 Hit:4 http://ppa.launchpad.net/tj/bugfixes/ubuntu bionic InRelease           
 Hit:5 [ESMURL] bionic-infra-security InRelease                    
 Hit:6 [ESMURL] bionic-infra-updates InRelease                     
 Hit:7 http://security.ubuntu.com/ubuntu bionic-security InRelease 
 Reading package lists... Done                      
 Building dependency tree       
 Reading state information... Done
 67 packages can be upgraded. Run 'apt list --upgradable' to see them.
 Reading package lists... Done
 Building dependency tree       
 Reading state information... Done
 Calculating upgrade... Done
 The following packages were automatically installed and are no longer required:
   augeas-lenses libaugeas0 python-asn1crypto python-attr python-automat python-cffi-backend python-click python-colorama python-configobj python-constantly python-cryptography python-enum34 python-gdbm
   python-hyperlink python-idna python-incremental python-ipaddress python-openssl python-pam python-pkg-resources python-pyasn1 python-pyasn1-modules python-pycurl python-serial python-service-identity
   python-six python-twisted-bin python-twisted-core python-twisted-web python-zope.interface python3-augeas python3-configargparse python3-future python3-ndg-httpsclient python3-parsedatetime
 Use 'sudo apt autoremove' to remove them.
 The following NEW packages will be installed:
   efibootmgr libefiboot1 libefivar1
 The following packages will be upgraded:
   apt-transport-https command-not-found command-not-found-data distro-info-data grub-common grub-pc grub-pc-bin grub2-common iptables klibc-utils landscape-client landscape-common libapt-inst2.0 libc-bin
   libc6 libcap2 libcap2-bin libip4tc0 libip6tc0 libiptc0 libkeyutils1 libklibc liblxc-common liblxc1 libnghttp2-14 libpython2.7 libpython2.7-minimal libpython2.7-stdlib libpython3.6 libpython3.6-minimal
   libpython3.6-stdlib libsensors4 libunwind8 libx11-6 libx11-data libxtables12 linux-firmware locales lxcfs lxd lxd-client multiarch-support open-iscsi open-vm-tools openssh-client openssh-server
   openssh-sftp-server python-apt python-apt-common python2.7 python2.7-minimal python3-apt python3-commandnotfound python3-requests python3-software-properties python3.6 python3.6-minimal
   software-properties-common sosreport tcpdump ubuntu-advantage-tools update-notifier-common vim vim-common vim-runtime vim-tiny xxd
 67 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
 Need to get 18.4 MB/118 MB of archives.
 After this operation, 761 kB disk space will be freed.
 Err:1 [ESMURL] bionic-infra-security/main amd64 libpython2.7 amd64 2.7.17-1~18.04ubuntu1.13
   401  Unauthorized [IP: 91.189.91.46 443]
 Err:2 [ESMURL] bionic-infra-security/main amd64 python2.7 amd64 2.7.17-1~18.04ubuntu1.13
   401  Unauthorized [IP: 91.189.91.46 443]
 Err:3 [ESMURL] bionic-infra-security/main amd64 libpython2.7-stdlib amd64 2.7.17-1~18.04ubuntu1.13
   401  Unauthorized [IP: 91.189.91.46 443]
 Err:4 [ESMURL] bionic-infra-security/main amd64 python2.7-minimal amd64
2.7.17-1~18.04ubuntu1.13
   401  Unauthorized [IP: 91.189.91.46 443]
 Err:5 [ESMURL] bionic-infra-security/main amd64 libpython2.7-minimal amd64 2.7.17-1~18.04ubuntu1.13
   401  Unauthorized [IP: 91.189.91.46 443]
 Err:6 [ESMURL] bionic-infra-security/main amd64 libpython3.6 amd64
3.6.9-1~18.04ubuntu1.13
   401  Unauthorized [IP: 91.189.91.46 443]
 Err:7 [ESMURL] bionic-infra-security/main amd64 python3.6 amd64 3.6.9-1~18.04ubuntu1.13
   401  Unauthorized [IP: 91.189.91.46 443]
 Err:8 [ESMURL] bionic-infra-security/main amd64 libpython3.6-stdlib amd64 3.6.9-1~18.04ubuntu1.13
   401  Unauthorized [IP: 91.189.91.46 443]
 Err:9 [ESMURL] bionic-infra-security/main amd64 python3.6-minimal amd64
3.6.9-1~18.04ubuntu1.13
   401  Unauthorized [IP: 91.189.91.46 443]
 Err:10 [ESMURL] bionic-infra-security/main amd64 libpython3.6-minimal amd64 3.6.9-1~18.04ubuntu1.13
   401  Unauthorized [IP: 91.189.91.46 443]
 Err:11 [ESMURL] bionic-infra-security/main amd64 libcap2 amd64 1:2.25-1.2ubuntu0.1~esm1
   401  Unauthorized [IP: 91.189.91.46 443]
 Err:12 [ESMURL] bionic-infra-security/main amd64 libcap2-bin amd64 1:2.25-1.2ubuntu0.1~esm1
   401  Unauthorized [IP: 91.189.91.46 443]
 Err:13 [ESMURL] bionic-infra-security/main amd64 vim amd64 2:8.0.1453-1ubuntu1.13+esm1
   401  Unauthorized [IP: 91.189.91.46 443]
 Err:14 [ESMURL] bionic-infra-security/main amd64 vim-tiny amd64 2:8.0.1453-1ubuntu1.13+esm1
   401  Unauthorized [IP: 91.189.91.46 443]
 Ign:15 [ESMURL] bionic-infra-security/main amd64 vim-runtime all 2:8.0.1453-1ubuntu1.13+esm1
 Err:16 [ESMURL] bionic-infra-security/main amd64 xxd amd64 2:8.0.1453-1ubuntu1.13+esm1
   401  Unauthorized [IP: 91.189.91.46 443]
 Ign:17 [ESMURL] bionic-infra-security/main amd64 vim-common all 2:8.0.1453-1ubuntu1.13+esm1
 Err:18 [ESMURL] bionic-infra-security/main amd64 libnghttp2-14 amd64
1.30.0-1ubuntu1+esm1
   401  Unauthorized [IP: 91.189.91.46 443]
 Ign:19 [ESMURL] bionic-infra-security/main amd64 libx11-data all 2:1.6.4-3ubuntu0.4+esm1
 Err:20 [ESMURL] bionic-infra-security/main amd64 libx11-6 amd64 2:1.6.4-3ubuntu0.4+esm1
   401  Unauthorized [IP: 91.189.91.46 443]
 Ign:21 [ESMURL] bionic-infra-security/main amd64 python3-requests all 2.18.4-2ubuntu0.1+esm1
 Err:15 [ESMURL] bionic-infra-security/main amd64 vim-runtime all 2:8.0.1453-1ubuntu1.13+esm1
   401  Unauthorized [IP: 91.189.91.46 443]
 Err:17 [ESMURL] bionic-infra-security/main amd64 vim-common all 2:8.0.1453-1ubuntu1.13+esm1
   401  Unauthorized [IP: 91.189.91.46 443]
 Err:19 [ESMURL] bionic-infra-security/main amd64 libx11-data all 2:1.6.4-3ubuntu0.4+esm1
   401  Unauthorized [IP: 91.189.91.46 443]
 Err:21 [ESMURL] bionic-infra-security/main amd64 python3-requests all 2.18.4-2ubuntu0.1+esm1
   401  Unauthorized [IP: 91.189.91.46 443]
 E: Failed to fetch [ESMURL]/pool/main/p/python2.7/libpython2.7_2.7.17-1~18.04ubuntu1.13_amd64.deb 401  Unauthorized [IP: 91.189.91.46 443]
 E: Failed to fetch [ESMURL]/pool/main/p/python2.7/python2.7_2.7.17-1~18.04ubuntu1.13_amd64.deb 401  Unauthorized [IP: 91.189.91.46 443]
 E: Failed to fetch [ESMURL]/pool/main/p/python2.7/libpython2.7-stdlib_2.7.17-1~18.04ubuntu1.13_amd64.deb 401  Unauthorized [IP: 91.189.91.46 443]
 E: Failed to fetch [ESMURL]/pool/main/p/python2.7/python2.7-minimal_2.7.17-1~18.04ubuntu1.13_amd64.deb 401  Unauthorized [IP: 91.189.91.46 443]
 E: Failed to fetch [ESMURL]/pool/main/p/python2.7/libpython2.7-minimal_2.7.17-1~18.04ubuntu1.13_amd64.deb 401  Unauthorized [IP: 91.189.91.46 443]
 E: Failed to fetch [ESMURL]/pool/main/p/python3.6/libpython3.6_3.6.9-1~18.04ubuntu1.13_amd64.deb 401  Unauthorized [IP: 91.189.91.46 443]
 E: Failed to fetch [ESMURL]/pool/main/p/python3.6/python3.6_3.6.9-1~18.04ubuntu1.13_amd64.deb 401  Unauthorized [IP: 91.189.91.46 443]
 E: Failed to fetch [ESMURL]/pool/main/p/python3.6/libpython3.6-stdlib_3.6.9-1~18.04ubuntu1.13_amd64.deb 401  Unauthorized [IP: 91.189.91.46 443]
 E: Failed to fetch [ESMURL]/pool/main/p/python3.6/python3.6-minimal_3.6.9-1~18.04ubuntu1.13_amd64.deb 401  Unauthorized [IP: 91.189.91.46 443]
 E: Failed to fetch [ESMURL]/pool/main/p/python3.6/libpython3.6-minimal_3.6.9-1~18.04ubuntu1.13_amd64.deb 401  Unauthorized [IP: 91.189.91.46 443]
 E: Failed to fetch [ESMURL]/pool/main/libc/libcap2/libcap2_2.25-1.2ubuntu0.1~esm1_amd64.deb 401  Unauthorized [IP: 91.189.91.46 443]
 E: Failed to fetch [ESMURL]/pool/main/libc/libcap2/libcap2-bin_2.25-1.2ubuntu0.1~esm1_amd64.deb 401  Unauthorized [IP: 91.189.91.46 443]
 E: Failed to fetch [ESMURL]/pool/main/v/vim/vim_8.0.1453-1ubuntu1.13+esm1_amd64.deb  401  Unauthorized [IP: 91.189.91.46 443]
 E: Failed to fetch [ESMURL]/pool/main/v/vim/vim-tiny_8.0.1453-1ubuntu1.13+esm1_amd64.deb  401  Unauthorized [IP: 91.189.91.46 443]
 E: Failed to fetch [ESMURL]/pool/main/v/vim/vim-runtime_8.0.1453-1ubuntu1.13+esm1_all.deb 401  Unauthorized [IP: 91.189.91.46 443]
 E: Failed to fetch [ESMURL]/pool/main/v/vim/xxd_8.0.1453-1ubuntu1.13+esm1_amd64.deb  401  Unauthorized [IP: 91.189.91.46 443]
 E: Failed to fetch [ESMURL]/pool/main/v/vim/vim-common_8.0.1453-1ubuntu1.13+esm1_all.deb  401  Unauthorized [IP: 91.189.91.46 443]
 E: Failed to fetch [ESMURL]/pool/main/n/nghttp2/libnghttp2-14_1.30.0-1ubuntu1+esm1_amd64.deb 401  Unauthorized [IP: 91.189.91.46 443]
 E: Failed to fetch [ESMURL]/pool/main/libx/libx11/libx11-data_1.6.4-3ubuntu0.4+esm1_all.deb 401  Unauthorized [IP: 91.189.91.46 443]
 E: Failed to fetch [ESMURL]/pool/main/libx/libx11/libx11-6_1.6.4-3ubuntu0.4+esm1_amd64.deb 401  Unauthorized [IP: 91.189.91.46 443]
 E: Failed to fetch [ESMURL]/pool/main/r/requests/python3-requests_2.18.4-2ubuntu0.1+esm1_all.deb 401  Unauthorized [IP: 91.189.91.46 443]
 E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
 
 
 ua status
 
 SERVICE       AVAILABLE  DESCRIPTION
 cc-eal        yes        Common Criteria EAL2 Provisioning Packages
 cis           yes        Security compliance and audit tools
 esm-infra     yes        UA Infra: Extended Security Maintenance (ESM)
 fips          yes        NIST-certified core packages
 fips-updates  yes        NIST-certified core packages with priority security updates
 livepatch     yes        Canonical Livepatch service
 
 This machine is not attached to a UA subscription.
 See https://ubuntu.com/advantage
Dan
  • 12,494
  • 7
  • 70
  • 94
Dan F
  • 23
  • 3
  • fooser@foo:~$ sudo mv /etc/apt/sources.list /etc/apt/sources.list.old [sudo] password for fooser: fooser@foo:~$ sudo apt update Get:1 https://esm.ubuntu.com/infra/ubuntu bionic-infra-security InRelease [7,539 B] Hit:2 http://ppa.launchpad.net/tj/bugfixes/ubuntu bionic InRelease Get:3 https://esm.ubuntu.com/infra/ubuntu bionic-infra-updates InRelease [7,511 B] Fetched 15.1 kB in 4s (3,784 B/s) Thoughts? – Dan F Jun 27 '23 at 13:28
  • Yes. there were other sources in that location. I removed them and the release upgrade is proceeding now. Thank you for your help. – Dan F Jun 27 '23 at 14:04

1 Answers1

1

[ESMURL] is not hard-coded into apt, so check your apt sources.

  • /etc/apt/sources.list (file)
  • /etc/apt/sources.list.d/ (directory)

It's there somewhere. Remove it, then try again.

user535733
  • 58,040
  • 10
  • 106
  • 136