TASK ERROR: command 'apt-get update' failed: exit code 100

MoxProxxer

Well-Known Member
Apr 25, 2018
86
36
58
53
So I have been greeted today morning with this entry in the task log on the machine. Called apt-get update manually and behold:

..all good before this...
Ign:9 https://enterprise.proxmox.com/debian/pve stretch/pve-enterprise all Packages
Err:10 https://enterprise.proxmox.com/debian/pve stretch/pve-enterprise amd64 Packages
401 Unauthorized
Ign:11 https://enterprise.proxmox.com/debian/pve stretch/pve-enterprise Translation-en_US
Ign:12 https://enterprise.proxmox.com/debian/pve stretch/pve-enterprise Translation-en
Fetched 91.0 kB in 1s (64.6 kB/s)
Reading package lists... Done
W: The repository 'https://enterprise.proxmox.com/debian/pve stretch Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch https://enterprise.proxmox.com/debian/pve/dists/stretch/pve-enterprise/binary-amd64/Packages 401 Unauthorized
E: Some index files failed to download. They have been ignored, or old ones used instead.

So I just commented out the line in /etc/apt/sources.list.d/pve-enterprise.list

Not sure if this is the right thing to do, though.
 
I am aware of that, it's just that it happened by default. I believe there are other threads here that suggest to not include the enterprise repo in the default install.

By the way - today morning:

-----------
Task viewer: Update package database

OutputStatus

Stop
error reading cached package status in /var/lib/pve-manager/pkgupdates

TASK ERROR: fileparse(): need a valid pathname at /usr/share/perl5/PVE/API2/APT.pm line 91.

-------------

Not sure what to make of this. Happens in the get_changelog_url anonymous sub, seems $info->{FileName} is undefined or malformed.




ceterum censeo: It is next to impossible to paste code - or any text - into this discussion forum.
 
Investigating this further, a manual "apt update" revealed:

...
Fetched 185 kB in 0s (259 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
5 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: Problem unlinking the file auxfiles - Clean (21: Is a directory)

and I'm not the first one: https://askubuntu.com/questions/772846/apt-get-update-unlinking

I can confirm, that after a rm -rf /var/lib/apt/lists followed by apt update the problem is gone. For apt. Proxmox updater still hangs there

CHmynio.png
 
Unfortunately neither nor.

pve-enterprise is commented out, there's only the pve-no-subscription repo.

I restarted the pveproxy service and reloaded the page. That Perl error is still there.

apt update works.

However...

Can it be, that there is a problem/incompatibility with https://wiki.debian.org/AptCacherNg ?

# apt update
Hit:1 http://download.proxmox.com/debian/pve stretch InRelease
Hit:2 http://vmhost:3142/security.debian.org stretch/updates InRelease
Ign:3 http://vmhost:3142/ftp.de.debian.org/debian stretch InRelease
Get:4 http://vmhost:3142/ftp.de.debian.org/debian stretch-updates InRelease [91.0 kB]
Hit:5 http://vmhost:3142/ftp.de.debian.org/debian stretch Release
Fetched 91.0 kB in 0s (97.7 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
 
Not on the machine in question, but another node - basically otherwise identical in configuration does not use it and does not experience these problems. Which regular expression do I need to correct in the source so these caching URLs are supported too? :)
 
Somehow I read that advice two times already.

Here's mine:

You could add to the Developer Documentation the relevant parts. Like e.g. how to debug the stuff.

because neither print/say, nor `cat $xxx > /dev/tmp` nor die "some message" in the source is working when one tries to see what is going on.

After adding a die, restarting pveproxy, having now the same error message + 1 line (line 92) I know the die is there, but it's simply ignored. Good job.

Looking in /var/log/pveproxy reveals also ... nothing, except lots of useless access.log messages "GET /api2/json/nodes/xxxxxx/status HTTP/1.1" 200 every second - seriously?

/var/log/pve/tasks

contains the error I see on the screen and nothing else. Ok, looking up the inheritance hierarchy ... Somehow syslog should be used. Yeah I will dig into where you catch the dies and the output. When there's time.


Sure, I may be new to Proxmox and many things may become clear later on, but please at least consider some of the entry barriers mentioned.

edit:

o_O

3 days later my die is found...

error reading cached package status in /var/lib/pve-manager/pkgupdates
Use of uninitialized value in die at /usr/share/perl5/PVE/API2/APT.pm line 91.

TASK ERROR: Died at /usr/share/perl5/PVE/API2/APT.pm line 91.


needless to say that I did restart pveproxy...
Seems like the APT upstream package AptPkg has a problem with the AptCacheNg, because PVE::API2::APT is getting a undefined value already. I will try to find out how to rectify that with upstream.
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!