401 when trying to install pve on Bullseye [SOLVED]

bikebore

New Member
Jul 27, 2022
7
1
3
Hi,

I'm trying to install pve 7.2 on Bullseye, but keep hitting the 401 unauthorized return code. If I try and hit the URL https://download.proxmox.com/debian/pve/dists/bullseye/pve-no-subscription/binary-amd64/Packages in the browser I get hit with a login prompt. I'me definitely using he non-subscription address:

Code:
[sources.list]

deb https://deb.debian.org/debian bullseye main
deb https://security.debian.org/debian-security bullseye-security main
deb https://deb.debian.org/debian bullseye-updates main

deb https://download.proxmox.com/debian/pve bullseye pve-no-subscription


[/etc/apt/sources.list.d/pve-install-repo.list]
deb [arch=amd64] http://download.proxmox.com/debian/pve bullseye pve-no-subscription

apt update error:

Code:
Err:6 https://download.proxmox.com/debian/pve bullseye/pve-no-subscription amd64 Packages
  401  Unauthorized [IP: 51.91.38.34 443]
Ign:7 https://download.proxmox.com/debian/pve bullseye/pve-no-subscription all Packages
Ign:8 https://download.proxmox.com/debian/pve bullseye/pve-no-subscription Translation-en_GB
Ign:9 https://download.proxmox.com/debian/pve bullseye/pve-no-subscription Translation-en
Reading package lists... Done
N: Ignoring file 'pve-install-repo.list.old' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
W: The repository 'https://download.proxmox.com/debian/pve bullseye 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://download.proxmox.com/debian/pve/dists/bullseye/pve-no-subscription/binary-amd64/Packages  401  Unauthorized [IP: 51.91.38.34 443]

There is definitely an authorization prompt on the non-sub endpoint. Is the option to install on debian using apt only available to subscribed accounts now? Is there a way I can install from the CD media using apt to avoid this?
 
I tried using the http address initially, it just hangs waiting for headers
can you curl it? maybe there's something intercepting your traffic?

try curl http://download.proxmox.com/debian/pve/dists/bullseye/pve-no-subscription/binary-amd64/Packages
 
If you try manually hitting that endpoint with I was just responding. Exactly, curl fails:

Code:
root@debian:/etc/apt/apt.conf.d# curl -v http://download.proxmox.com/debian/pve/dists/bullseye/pve-no-subscription/binary-amd64/Packages
*   Trying 51.91.38.34:80...
* Connected to download.proxmox.com (51.91.38.34) port 80 (#0)
> GET /debian/pve/dists/bullseye/pve-no-subscription/binary-amd64/Packages HTTP/1.1
> Host: download.proxmox.com
> User-Agent: curl/7.74.0
> Accept: */*
>
* Recv failure: Connection reset by peer
* Closing connection 0
curl: (56) Recv failure: Connection reset by peer

I've tried adding another workaround to the apt conf:

Code:
Acquire::http::Pipeline-Depth "0";

No effect. A browser can't hit that http endpoint, just times out.
 
Ah hang on..... <facepalm>

Code:
Connected to download.proxmox.com (51.91.38.34) port 80 (#0)

So the endpoint is responding. Must be something in my OS then, it's a fresh debian build
 
It is weird though, a `wget` also fails:

Code:
W: Failed to fetch http://download.proxmox.com/debian/pve/dists/bullseye/InRelease  Connection failed [IP: 51.91.38.34 80]
W: Some index files failed to download. They have been ignored, or old ones used instead.

root@debian:/etc/apt/apt.conf.d# wget http://download.proxmox.com/debian/pve/dists/bullseye/InRelease
--2022-07-27 15:35:11--  http://download.proxmox.com/debian/pve/dists/bullseye/InRelease
Resolving download.proxmox.com (download.proxmox.com)... 51.91.38.34, 2001:41d0:203:7470::34
Connecting to download.proxmox.com (download.proxmox.com)|51.91.38.34|:80... connected.
HTTP request sent, awaiting response... Read error (Connection reset by peer) in headers.
Retrying.

--2022-07-27 15:36:17--  (try: 2)  http://download.proxmox.com/debian/pve/dists/bullseye/InRelease
Connecting to download.proxmox.com (download.proxmox.com)|51.91.38.34|:80... connected.
HTTP request sent, awaiting response... Read error (Connection reset by peer) in headers.
Retrying
 
The address is a CNAME so turned down some security for apt, still fails:
Code:
root@debian:/etc/apt/apt.conf.d# apt-get update
Hit:1 https://security.debian.org/debian-security bullseye-security InRelease
Hit:2 https://deb.debian.org/debian bullseye InRelease
Hit:3 https://deb.debian.org/debian bullseye-updates InRelease
Err:4 http://download.proxmox.com/debian/pve bullseye InRelease
  Connection failed [IP: 51.91.38.34 80]
Reading package lists... Done
W: Failed to fetch http://download.proxmox.com/debian/pve/dists/bullseye/InRelease  Connection failed [IP: 51.91.38.34 80]
W: Some index files failed to download. They have been ignored, or old ones used instead.
 
hmm, that's really weird.

if i try to curl it from an external server (outside of proxmox network) i have no problem getting the packages, so it could be something related to your setup or location.

* where is your server located? e.g. hoster, self-hosted at home, workplace etc. (and which country)

* can you reach other http and https sites normally? e.g. curl https://www.google.com and curl http://www.google.com ?

* can you test: curl http://de.cdn.proxmox.com/debian/pve/dists/bullseye/pve-no-subscription/binary-amd64/Packages (to try the europe CDN)
 
Hey @oguz,

Apologies, was away for a few days. So my server is located at home, direct connection, not via proxy. The curl works fine:

root@debian:~# curl http://de.cdn.proxmox.com/debian/pve/dists/bullseye/pve-no-subscription/binary-amd64/Packages | more
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0Package: btrfs-progs-dbgsym
Architecture: amd64
Version: 5.16.2-1~bpo11+1
Auto-Built-Package: debug-symbols
Priority: optional
Section: debug
Source: btrfs-progs
Maintainer: Adam Borowski <kilobyte@angband.pl>

Obv. the google addresses also curl without issue. I agree, this appears OS related, but I've been unable to find any settings that would block

Update: So I've just retried the manual steps here and it works now! In the interim the only thing that has changed is I've switched to an Orbi wifi network from my telecoms router's default wifi, although still use that same router as GW for outbound traffic. So it appears the issue here was related to my wifi settings.

Thanks for the support!
 
  • Like
Reactions: oguz
Hey @oguz,

Apologies, was away for a few days. So my server is located at home, direct connection, not via proxy. The curl works fine:



Obv. the google addresses also curl without issue. I agree, this appears OS related, but I've been unable to find any settings that would block

Update: So I've just retried the manual steps here and it works now! In the interim the only thing that has changed is I've switched to an Orbi wifi network from my telecoms router's default wifi, although still use that same router as GW for outbound traffic. So it appears the issue here was related to my wifi settings.

Thanks for the support!
you're welcome, please mark the thread as [SOLVED] :)
 

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!