[SOLVED] Bad Gateway for ookla.bintray.com/debian generic

Spirog

Member
Jan 31, 2022
230
40
18
Chicago, IL
I am using Proxmox version 7.1.1

Code:
proxmox-ve: 7.1-1 (running kernel: 5.13.19-3-pve)
pve-manager: 7.1-10 (running version: 7.1-10/6ddebafe)
pve-kernel-helper: 7.1-8
pve-kernel-5.13: 7.1-6
pve-kernel-5.4: 6.4-11
pve-kernel-5.13.19-3-pve: 5.13.19-7
pve-kernel-5.13.19-2-pve: 5.13.19-4
pve-kernel-5.4.157-1-pve: 5.4.157-1
pve-kernel-5.4.73-1-pve: 5.4.73-1
ceph-fuse: 15.2.15-pve1
corosync: 3.1.5-pve2
criu: 3.15-1+pve-1
glusterfs-client: 9.2-1
ifupdown: 0.8.36+pve1
ksm-control-daemon: 1.4-1
libjs-extjs: 7.0.0-1
libknet1: 1.22-pve2
libproxmox-acme-perl: 1.4.1
libproxmox-backup-qemu0: 1.2.0-1
libpve-access-control: 7.1-6
libpve-apiclient-perl: 3.2-1
libpve-common-perl: 7.1-2
libpve-guest-common-perl: 4.0-3
libpve-http-server-perl: 4.1-1
libpve-storage-perl: 7.0-15
libqb0: 1.0.5-1
libspice-server1: 0.14.3-2.1
lvm2: 2.03.11-2.1
lxc-pve: 4.0.11-1
lxcfs: 4.0.11-pve1
novnc-pve: 1.3.0-1
proxmox-backup-client: 2.1.4-1
proxmox-backup-file-restore: 2.1.4-1
proxmox-mini-journalreader: 1.3-1
proxmox-widget-toolkit: 3.4-5
pve-cluster: 7.1-3
pve-container: 4.1-3
pve-docs: 7.1-2
pve-edk2-firmware: 3.20210831-2
pve-firewall: 4.2-5
pve-firmware: 3.3-4
pve-ha-manager: 3.3-3
pve-i18n: 2.6-2
pve-qemu-kvm: 6.1.0-3
pve-xtermjs: 4.16.0-1
qemu-server: 7.1-4
smartmontools: 7.2-pve2
spiceterm: 3.2-2
swtpm: 0.7.0~rc1+2
vncterm: 1.7-1
zfsutils-linux: 2.1.2-pve1


--
when trying to update via GUI I see a 502 error Bad Gateway for ookla.bintray.com/debian generic

Do I just remove this or is there an update I need to add in-place of this ?

Code:
starting apt-get update
Hit:1 http://security.debian.org/debian-security bullseye-security InRelease
Hit:2 http://download.proxmox.com/debian/pve bullseye InRelease
Hit:3 http://download.proxmox.com/debian/ceph-octopus bullseye InRelease
Hit:4 http://ftp.debian.org/debian bullseye InRelease
Err:5 https://ookla.bintray.com/debian generic InRelease
  502  Bad Gateway [IP: 54.189.239.169 443]
Hit:6 http://ftp.debian.org/debian bullseye-updates InRelease
Reading package lists...
W: Failed to fetch https://ookla.bintray.com/debian/dists/generic/InRelease  502  Bad Gateway [IP: 54.189.239.169 443]
W: Some index files failed to download. They have been ignored, or old ones used instead.
TASK OK

Thanks
Spiro
 
You are using the old repo. Use the new one as described here:
https://www.speedtest.net/apps/cli
Do i follow the instructions for debian and remove the old one and install the new and do i remove the line in the repositories in Proxmox under updates..

after I remove it, following the code below
will there be a line in that same section in repositories or will I need to add something there myself ?

Code:
## If migrating from prior bintray install instructions please first...
# sudo rm /etc/apt/sources.list.d/speedtest.list
# sudo apt-get update
# sudo apt-get remove speedtest
## Other non-official binaries will conflict with Speedtest CLI
# Example how to remove using apt-get
# sudo apt-get remove speedtest-cli
sudo apt-get install curl
curl -s https://install.speedtest.net/app/cli/install.deb.sh | sudo bash
sudo apt-get install speedtest


thanks so much for your help I am new to this so please I apologize for all the questions

Kind Regards,
Spiro
 
You need to look at the bash script that this will run. curl -s https://install.speedtest.net/app/cli/install.deb.sh | sudo bash will basically download a bash script, run it and that script will setup the keys for the repo and set the repo up for you.
 
  • Like
Reactions: Spirog
You need to look at the bash script that this will run. curl -s https://install.speedtest.net/app/cli/install.deb.sh | sudo bash will basically download a bash script, run it and that script will setup the keys for the repo and set the repo up for you.
ok perfect will uninstall the old one and try this now.. Totally appreciate you for your help

Spiro
 
You need to look at the bash script that this will run. curl -s https://install.speedtest.net/app/cli/install.deb.sh | sudo bash will basically download a bash script, run it and that script will setup the keys for the repo and set the repo up for you.
I did the instructions but removed sudo since I am logged in as root
but the last part | bash did not work so i removed the | sudo Bash
and just ran this line
Code:
curl -s https://install.speedtest.net/app/cli/install.deb.sh
now what can I type in SSH to get that to run ?

please and thanks
Spiro
 
You need to run it with bash. If you are logged in as root you should try curl -s https://install.speedtest.net/app/cli/install.deb.sh | bash
 
You need to run it with bash. If you are logged in as root you should try curl -s https://install.speedtest.net/app/cli/install.deb.sh | bash
I get error ?

Code:
root@proxmox:~# curl -s https://install.speedtest.net/app/cli/install.deb.sh | bash
Detected operating system as /11.
Checking for curl...
Detected curl...
Checking for gpg...
Detected gpg...
Running apt-get update... done.
Installing apt-transport-https... done.
Installing /etc/apt/sources.list.d/ookla_speedtest-cli.list...curl: (22) The requested URL returned error: 404


Unable to download repo config from: https://packagecloud.io/install/repositories/ookla/speedtest-cli/config_file.list?os=&dist=11&source=script

This usually happens if your operating system is not supported by
packagecloud.io, or this script's OS detection failed.

You can override the OS detection by setting os= and dist= prior to running this script.
You can find a list of supported OSes and distributions on our website: https://packagecloud.io/docs#os_distro_version

For example, to force Ubuntu Trusty: os=ubuntu dist=trusty ./script.sh

If you are running a supported OS, please email support@packagecloud.io and report this.
root@proxmox:~#
 
Then you should try it with cd /tmp && curl -s https://install.speedtest.net/app/cli/install.deb.sh && os=debian dist=bullseye ./install.deb.sh
 
Then you should try it with cd /tmp && curl -s https://install.speedtest.net/app/cli/install.deb.sh && os=debian dist=bullseye ./install.deb.sh
Again an error ?
so sorry fpr the headache if you can please help me more would be awesome

Code:
root@proxmox:/tmp# cd /tmp && curl -s https://install.speedtest.net/app/cli/install.deb.sh && os=debian dist=bullseye ./install.deb.sh
#!/usr/bin/env bash

OS_RELEASE_ID=$(grep "^ID=" /etc/os-release | cut -d '=' -f 2- | sed 's|"||g')
OS_RELEASE_VERSION_ID=$(grep "^VERSION_ID=" /etc/os-release | cut -d '=' -f 2- | sed 's|"||g')

# Matches supported platforms at: https://packagecloud.io/ookla/speedtest-cli

SUPPORTED=false
[[ "${OS_RELEASE_ID}" == "ubuntu" && "${OS_RELEASE_VERSION_ID}" =~ "16.04" ]] && SUPPORTED=true
[[ "${OS_RELEASE_ID}" == "ubuntu" && "${OS_RELEASE_VERSION_ID}" =~ "16.10" ]] && SUPPORTED=true
[[ "${OS_RELEASE_ID}" == "ubuntu" && "${OS_RELEASE_VERSION_ID}" =~ "17.04" ]] && SUPPORTED=true
[[ "${OS_RELEASE_ID}" == "ubuntu" && "${OS_RELEASE_VERSION_ID}" =~ "17.10" ]] && SUPPORTED=true

[[ "${OS_RELEASE_ID}" == "ubuntu" && "${OS_RELEASE_VERSION_ID}" =~ "18.04" ]] && SUPPORTED=true
[[ "${OS_RELEASE_ID}" == "ubuntu" && "${OS_RELEASE_VERSION_ID}" =~ "18.10" ]] && SUPPORTED=true
[[ "${OS_RELEASE_ID}" == "ubuntu" && "${OS_RELEASE_VERSION_ID}" =~ "19.04" ]] && SUPPORTED=true
[[ "${OS_RELEASE_ID}" == "ubuntu" && "${OS_RELEASE_VERSION_ID}" =~ "19.10" ]] && SUPPORTED=true

[[ "${OS_RELEASE_ID}" == "ubuntu" && "${OS_RELEASE_VERSION_ID}" =~ "20.04" ]] && SUPPORTED=true
[[ "${OS_RELEASE_ID}" == "ubuntu" && "${OS_RELEASE_VERSION_ID}" =~ "20.10" ]] && SUPPORTED=true
[[ "${OS_RELEASE_ID}" == "ubuntu" && "${OS_RELEASE_VERSION_ID}" =~ "21.04" ]] && SUPPORTED=true
[[ "${OS_RELEASE_ID}" == "ubuntu" && "${OS_RELEASE_VERSION_ID}" =~ "21.10" ]] && SUPPORTED=true

[[ "${OS_RELEASE_ID}" == "debian" && "${OS_RELEASE_VERSION_ID}" == "8"     ]] && SUPPORTED=true
[[ "${OS_RELEASE_ID}" == "debian" && "${OS_RELEASE_VERSION_ID}" == "9"     ]] && SUPPORTED=true
[[ "${OS_RELEASE_ID}" == "debian" && "${OS_RELEASE_VERSION_ID}" == "10"    ]] && SUPPORTED=true
[[ "${OS_RELEASE_ID}" == "debian" && "${OS_RELEASE_VERSION_ID}" == "11"    ]] && SUPPORTED=true

[[ "${SUPPORTED}" == "false" ]] && echo "This distribution version is not currently supported via package management, please use the direct download builds per architecture found at https://www.speedtest.net/apps/cli" && exit 1

## Inlined PackageCloud installation script below
## -- source: https://packagecloud.io/install/repositories/ookla/speedtest-cli/script.deb.sh

unknown_os ()
{
  echo "Unfortunately, your operating system distribution and version are not supported by this script."
  echo
  echo "You can override the OS detection by setting os= and dist= prior to running this script."
  echo "You can find a list of supported OSes and distributions on our website: https://packagecloud.io/docs#os_distro_version"
  echo
  echo "For example, to force Ubuntu Trusty: os=ubuntu dist=trusty ./script.sh"
  echo
  echo "Please email support@packagecloud.io and let us know if you run into any issues."
  exit 1
}

gpg_check ()
{
  echo "Checking for gpg..."
  if command -v gpg > /dev/null; then
    echo "Detected gpg..."
  else
    echo "Installing gnupg for GPG verification..."
    apt-get install -y gnupg
    if [ "$?" -ne "0" ]; then
      echo "Unable to install GPG! Your base system has a problem; please check your default OS's package repositories because GPG should work."
      echo "Repository installation aborted."
      exit 1
    fi
  fi
}

curl_check ()
{
  echo "Checking for curl..."
  if command -v curl > /dev/null; then
    echo "Detected curl..."
  else
    echo "Installing curl..."
    apt-get install -q -y curl
    if [ "$?" -ne "0" ]; then
      echo "Unable to install curl! Your base system has a problem; please check your default OS's package repositories because curl should work."
      echo "Repository installation aborted."
      exit 1
    fi
  fi
}

install_debian_keyring ()
{
  if [ "${os}" = "debian" ]; then
    echo "Installing debian-archive-keyring which is needed for installing "
    echo "apt-transport-https on many Debian systems."
    apt-get install -y debian-archive-keyring &> /dev/null
  fi
}


detect_os ()
{
  if [[ ( -z "${os}" ) && ( -z "${dist}" ) ]]; then
    # some systems dont have lsb-release yet have the lsb_release binary and
    # vice-versa
    if [ -e /etc/lsb-release ]; then
      . /etc/lsb-release

      if [ "${ID}" = "raspbian" ]; then
        os=${ID}
        dist=`cut --delimiter='.' -f1 /etc/debian_version`
      else
        os=${DISTRIB_ID}
        dist=${DISTRIB_CODENAME}

        if [ -z "$dist" ]; then
          dist=${DISTRIB_RELEASE}
        fi
      fi

    elif [ `which lsb_release 2>/dev/null` ]; then
      dist=`lsb_release -c | cut -f2`
      os=`lsb_release -i | cut -f2 | awk '{ print tolower($1) }'`

    elif [ -e /etc/debian_version ]; then
      # some Debians have jessie/sid in their /etc/debian_version
      # while others have '6.0.7'
      os=`cat /etc/issue | head -1 | awk '{ print tolower($1) }'`
      if grep -q '/' /etc/debian_version; then
        dist=`cut --delimiter='/' -f1 /etc/debian_version`
      else
        dist=`cut --delimiter='.' -f1 /etc/debian_version`
      fi

    else
      unknown_os
    fi
  fi

  if [ -z "$dist" ]; then
    unknown_os
  fi

  # remove whitespace from OS and dist name
  os="${os// /}"
  dist="${dist// /}"

  echo "Detected operating system as $os/$dist."
}

main ()
{
  detect_os
  curl_check
  gpg_check

  # Need to first run apt-get update so that apt-transport-https can be
  # installed
  echo -n "Running apt-get update... "
  apt-get update &> /dev/null
  echo "done."

  # Install the debian-archive-keyring package on debian systems so that
  # apt-transport-https can be installed next
  install_debian_keyring

  echo -n "Installing apt-transport-https... "
  apt-get install -y apt-transport-https &> /dev/null
  echo "done."


  gpg_key_url="https://packagecloud.io/ookla/speedtest-cli/gpgkey"
  apt_config_url="https://packagecloud.io/install/repositories/ookla/speedtest-cli/config_file.list?os=${os}&dist=${dist}&source=script"

  apt_source_path="/etc/apt/sources.list.d/ookla_speedtest-cli.list"
  gpg_keyring_path="/usr/share/keyrings/ookla_speedtest-cli-archive-keyring.gpg"

  echo -n "Installing $apt_source_path..."

  # create an apt config file for this repository
  curl -sSf "${apt_config_url}" > $apt_source_path
  curl_exit_code=$?

  if [ "$curl_exit_code" = "22" ]; then
    echo
    echo
    echo -n "Unable to download repo config from: "
    echo "${apt_config_url}"
    echo
    echo "This usually happens if your operating system is not supported by "
    echo "packagecloud.io, or this script's OS detection failed."
    echo
    echo "You can override the OS detection by setting os= and dist= prior to running this script."
    echo "You can find a list of supported OSes and distributions on our website: https://packagecloud.io/docs#os_distro_version"
    echo
    echo "For example, to force Ubuntu Trusty: os=ubuntu dist=trusty ./script.sh"
    echo
    echo "If you are running a supported OS, please email support@packagecloud.io and report this."
    [ -e $apt_source_path ] && rm $apt_source_path
    exit 1
  elif [ "$curl_exit_code" = "35" -o "$curl_exit_code" = "60" ]; then
    echo "curl is unable to connect to packagecloud.io over TLS when running: "
    echo "    curl ${apt_config_url}"
    echo "This is usually due to one of two things:"
    echo
    echo " 1.) Missing CA root certificates (make sure the ca-certificates package is installed)"
    echo " 2.) An old version of libssl. Try upgrading libssl on your system to a more recent version"
    echo
    echo "Contact support@packagecloud.io with information about your system for help."
    [ -e $apt_source_path ] && rm $apt_source_path
    exit 1
  elif [ "$curl_exit_code" -gt "0" ]; then
    echo
    echo "Unable to run: "
    echo "    curl ${apt_config_url}"
    echo
    echo "Double check your curl installation and try again."
    [ -e $apt_source_path ] && rm $apt_source_path
    exit 1
  else
    echo "done."
  fi

  echo -n "Importing packagecloud gpg key... "
  # import the gpg key
  curl -fsSL "${gpg_key_url}" | gpg --dearmor > ${gpg_keyring_path}
  echo "done."

  echo -n "Running apt-get update... "
  # update apt on this system
  apt-get update &> /dev/null
  echo "done."

  echo
  echo "The repository is setup! You can now install packages."
}

main

-bash: ./install.deb.sh: No such file or directory
 
cd /tmp && curl -s https://install.speedtest.net/app/cli/install.deb.sh && os=debian dist=11 ./install.deb.sh?
 
  • Like
Reactions: Spirog
cd /tmp && curl -s https://install.speedtest.net/app/cli/install.deb.sh && os=debian dist=11 ./install.deb.sh?
still error

Code:
echo -n "Importing packagecloud gpg key... "
  # import the gpg key
  curl -fsSL "${gpg_key_url}" | gpg --dearmor > ${gpg_keyring_path}
  echo "done."

  echo -n "Running apt-get update... "
  # update apt on this system
  apt-get update &> /dev/null
  echo "done."

  echo
  echo "The repository is setup! You can now install packages."
}

main

-bash: ./install.deb.sh?: No such file or directory
 
curl -s https://install.speedtest.net/app/cli/install.deb.sh | os=debian dist=bullseye bash or
curl -s https://install.speedtest.net/app/cli/install.deb.sh | os=debian dist=11 bash?
 
  • Like
Reactions: Spirog
curl -s https://install.speedtest.net/app/cli/install.deb.sh | os=debian dist=bullseye bash or
curl -s https://install.speedtest.net/app/cli/install.deb.sh | os=debian dist=11 bash?
ok it worked with the first line above

Code:
root@proxmox:~# curl -s https://install.speedtest.net/app/cli/install.deb.sh | os=debian dist=bullseye bash
Detected operating system as debian/bullseye.
Checking for curl...
Detected curl...
Checking for gpg...
Detected gpg...
Running apt-get update... done.
Installing debian-archive-keyring which is needed for installing
apt-transport-https on many Debian systems.
Installing apt-transport-https... done.
Installing /etc/apt/sources.list.d/ookla_speedtest-cli.list...done.
Importing packagecloud gpg key... done.
Running apt-get update... done.

The repository is setup! You can now install packages.

I was then able to apt-get install speedtest

Code:
root@proxmox:~# curl -s https://install.speedtest.net/app/cli/install.deb.sh | os=debian dist=bullseye bash
Detected operating system as debian/bullseye.
Checking for curl...
Detected curl...
Checking for gpg...
Detected gpg...
Running apt-get update... done.
Installing debian-archive-keyring which is needed for installing
apt-transport-https on many Debian systems.
Installing apt-transport-https... done.
Installing /etc/apt/sources.list.d/ookla_speedtest-cli.list...done.
Importing packagecloud gpg key... done.
Running apt-get update... done.

The repository is setup! You can now install packages.
root@proxmox:~# apt-get install speedtest
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  speedtest
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,055 kB of archives.
After this operation, 2,549 kB of additional disk space will be used.
Get:1 https://packagecloud.io/ookla/speedtest-cli/debian bullseye/main amd64 speedtest amd64 1.1.1.28-1.c732eb82cf [1,055 kB]
Fetched 1,055 kB in 0s (2,345 kB/s)
Selecting previously unselected package speedtest.
(Reading database ... 71820 files and directories currently installed.)
Preparing to unpack .../speedtest_1.1.1.28-1.c732eb82cf_amd64.deb ...
Unpacking speedtest (1.1.1.28-1.c732eb82cf) ...
dpkg: error processing archive /var/cache/apt/archives/speedtest_1.1.1.28-1.c732eb82cf_amd64.deb (--unpack):
 trying to overwrite '/usr/bin/speedtest', which is also in package speedtest-cli 2.1.3-2
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/speedtest_1.1.1.28-1.c732eb82cf_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@proxmox:~#

not sure what the last line is E: sub-[rpcess error code (1)

I see the line in repository and seems to not throw any errors when I click Refresh in Proxmox

Code:
starting apt-get update
Hit:1 http://security.debian.org/debian-security bullseye-security InRelease
Hit:2 http://download.proxmox.com/debian/pve bullseye InRelease
Hit:3 http://download.proxmox.com/debian/ceph-octopus bullseye InRelease
Hit:4 http://ftp.debian.org/debian bullseye InRelease
Hit:5 http://ftp.debian.org/debian bullseye-updates InRelease
Hit:6 https://packagecloud.io/ookla/speedtest-cli/debian bullseye InRelease
Reading package lists...
TASK OK


SO i assume its working :)

you are a wonderful person and so helpful..
I totally appreciate you
can I buy you a beer or a coffee. do you have setup any Paypal you can DM me and I can send you

thank you if it all looks good now.. I am so Grateful

Warm Regards,
Spiro
 
  • Like
Reactions: Dunuin
Nice to hear that its works.
Hello I just had a quick question I never asked.

do we need this speed test cli installed on Proxmox, or is it just used for speed testing your system?
does it have any affect on the speed of which it download packages and updates of Proxmox or Debian?

I know I installed it cause the old ones were there before from my Hosting Co. but i just installed Proxmox on a new test VPS to see how it installs and the only options we have when fresh install is for PVE no subscription enterprise and Ceph.

so that's what made me wonder if this is something every Proxmox server admin installs after the fact or just a admin addon if they want to test the speed of server and any other special use case they may have.

sorry for the dumb question still learning. :)
Kind Regards,
Spiro
 
Its just for benchmarking your internets up-/download bandwidth and latency.
 
Last edited:
  • Like
Reactions: Spirog
Its just for benchmarking your internets up-/fownload bandwidth and latency.
just by any chance can you give me (an example( via a command line to test ?

thanks so much for taking the time to answer :)

Kind Regards,
Spiro



EDIT - i tried speedtest cli and get errors

Code:
root@proxmox:~# speedtest cli

   Speedtest by Ookla

[error] Error: [111] Connection refused
[error] Error: [101] Network unreachable
[error] Error: [111] Connection refused
[error] Error: [111] Connection refused
[error] Error: [111] Connection refused
[error] Error: [111] Connection refused
[error] Error: [111] Connection refused
[error] Error: [101] Network unreachable
[error] Error: [101] Network unreachable
[error] Error: [111] Connection refused
[error] Server Selection - Failed to find a working test server. (NoServers)
root@proxmox:~#

EDIT #2

its ports are being blocked by my CSF Configserver Firewall
on my other test PVE on a VM
I got

PING ms
20
DOWNLOAD Mbps
4677.60
UPLOAD Mbps
4202.10

not that bad I suppose ?

EDIT #3
ports 8080 or 5060 need tpo be open in /out in firewall


[to run test run the commands below]

speedtest cli ( this will choose an automatic location for you and run the test)
speedtest cli --servers ( this will give you a list of server you can choose from to run your test)
speedtest cli --server-id=10723 ( this will run a test on this selected server )

here is xml page with server ID's I found online. This will get you a list of servers - ID's close to your location

https://www.speedtest.net/speedtest-servers.php

* (10723is an example of the server id number from the --servers list you got running speedtest cli --servers )

thanks - for all your Help @Dunuin I got it working

my servers test results



PING ms
2
DOWNLOAD Mbps
9301.83
UPLOAD Mbps
8698.72
 
Last edited:
  • Like
Reactions: Dunuin

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!