Failed to fetch packages

I am having issues updating Webmin on my Virtualmin Pro installation running Ubuntu 14.04.

When I run

sudo apt-get update

I get:

Err http://software.virtualmin.com virtualmin-trusty/main amd64 Packages
  401  Unauthorized
Err http://software.virtualmin.com virtualmin-trusty/main i386 Packages       
  401  Unauthorized
Err http://software.virtualmin.com virtualmin-universal/main amd64 Packages   
  401  Unauthorized
Err http://software.virtualmin.com virtualmin-universal/main i386 Packages    
  401  Unauthorized

and

W: Failed to fetch http://software.virtualmin.com/ubuntu/dists/virtualmin-trusty/main/binary-amd64/Packages  401  Unauthorized

W: Failed to fetch http://software.virtualmin.com/ubuntu/dists/virtualmin-trusty/main/binary-i386/Packages  401  Unauthorized

W: Failed to fetch http://software.virtualmin.com/ubuntu/dists/virtualmin-universal/main/binary-amd64/Packages  401  Unauthorized

W: Failed to fetch http://software.virtualmin.com/ubuntu/dists/virtualmin-universal/main/binary-i386/Packages  401  Unauthorized

E: Some index files failed to download. They have been ignored, or old ones used instead.

Comments

Howdy -- sorry that you're having problems updating!

What is the output of these commands:

cat /etc/virtualmin-license
cat /etc/apt/sources.list

Ok - so when running

cat /etc/virtualmin-license

I noticed that it wasn't updated - I purchased a new license 2 weeks ago. So I ran the

virtualmin change-license

command with the new serial number and code.

It now says

sudo cat /etc/virtualmin-license
autorenew=1
doms=100
LicenseKey=mykey
last=1487259791
err=""
expiry=2018-02-04
servers=1
SerialNumber=5559373
used_servers=1
status=0

After restarting webmin I still get the same errors.

output of cat /etc/apt/sources.list

(I removed the license key in the URLs for the virtualmin repo)

sudo cat /etc/apt/sources.list
#

# deb cdrom:[Ubuntu-Server 12.04.1 LTS _Precise Pangolin_ - Release amd64 (20120817.3)]/ dists/precise/main/binary-i386/
# deb cdrom:[Ubuntu-Server 12.04.1 LTS _Precise Pangolin_ - Release amd64 (20120817.3)]/ dists/precise/restricted/binary-i386/
# deb cdrom:[Ubuntu-Server 12.04.1 LTS _Precise Pangolin_ - Release amd64 (20120817.3)]/ precise main restricted

# deb cdrom:[Ubuntu-Server 12.04.1 LTS _Precise Pangolin_ - Release amd64 (20120817.3)]/ dists/precise/main/binary-i386/
# deb cdrom:[Ubuntu-Server 12.04.1 LTS _Precise Pangolin_ - Release amd64 (20120817.3)]/ dists/precise/restricted/binary-i386/
# deb cdrom:[Ubuntu-Server 12.04.1 LTS _Precise Pangolin_ - Release amd64 (20120817.3)]/ precise main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ trusty main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ trusty universe
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty universe
deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates universe
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://us.archive.ubuntu.com/ubuntu/ trusty multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty multiverse
deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu trusty-security main restricted
deb-src http://security.ubuntu.com/ubuntu trusty-security main restricted
deb http://security.ubuntu.com/ubuntu trusty-security universe
deb-src http://security.ubuntu.com/ubuntu trusty-security universe
deb http://security.ubuntu.com/ubuntu trusty-security multiverse
deb-src http://security.ubuntu.com/ubuntu trusty-security multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu precise partner
# deb-src http://archive.canonical.com/ubuntu precise partner

## Uncomment the following two lines to add software from Ubuntu's
## 'extras' repository.
## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
# deb http://extras.ubuntu.com/ubuntu precise main
# deb-src http://extras.ubuntu.com/ubuntu precise main
deb http://5559373:mykey@software.virtualmin.com/ubuntu/ virtualmin-trusty main # disabled on upgrade to trusty
deb http://5559373:mykey@software.virtualmin.com/ubuntu/ virtualmin-universal main # disabled on upgrade to trusty

Did you by chance upgrade to a Virtualmin 100 recently?

It looks like the license information you're using there is for an older Virtualmin 50 license that is currently expired; though there's a new Virtualmin 100 license listed in your account.

You can see the license information for it by going into Account -> Software Licenses.

Does updating to the Virtualmin 100 resolve the issue you're seeing there?

Whoops forgot to update the serial number after buying the new license. Updates are working now, thanks.

Status: Active » Fixed