Apt repo throwing 404 errors

Apt is throwing a 404 error on the 5.x repo. My source file contains

deb https://artifacts.elastic.co/packages/5.x/apt jessie main stable

The log output shows.

Hit http://security.debian.org jessie/updates InRelease
Hit http://cloudfront.debian.net jessie-backports InRelease
Get:1 http://cloudfront.debian.net jessie-backports/main Sources/DiffIndex [27.8 kB]
Hit http://security.debian.org jessie/updates/non-free Sources
Get:2 http://cloudfront.debian.net jessie-backports/main amd64 Packages/DiffIndex [27.8 kB]
Ign http://httpredir.debian.org jessie InRelease
Hit http://security.debian.org jessie/updates/non-free amd64 Packages
Hit http://httpredir.debian.org jessie-updates InRelease
Get:3 http://cloudfront.debian.net jessie-backports/main Translation-en/DiffIndex [27.8 kB]
Hit http://security.debian.org jessie/updates/non-free Translation-en
Hit http://httpredir.debian.org jessie Release.gpg
Hit http://security.debian.org jessie/updates/main Sources
Hit http://security.debian.org jessie/updates/contrib Sources
Get:4 https://artifacts.elastic.co jessie InRelease [310 B]
Ign https://artifacts.elastic.co jessie InRelease
Hit http://security.debian.org jessie/updates/main amd64 Packages
Hit http://httpredir.debian.org jessie-updates/main Sources
Hit http://security.debian.org jessie/updates/contrib amd64 Packages
Hit http://security.debian.org jessie/updates/contrib Translation-en
Get:5 https://artifacts.elastic.co jessie Release.gpg [312 B]
Hit http://security.debian.org jessie/updates/main Translation-en
Hit http://httpredir.debian.org jessie-updates/contrib Sources
Ign https://artifacts.elastic.co jessie Release.gpg
Hit http://httpredir.debian.org jessie-updates/non-free Sources
Get:6 https://artifacts.elastic.co jessie Release [308 B]
Ign https://artifacts.elastic.co jessie Release
Get:7 http://httpredir.debian.org jessie-updates/main amd64 Packages/DiffIndex [8,884 B]
Get:8 https://artifacts.elastic.co jessie/main amd64 Packages [331 B]
Hit http://httpredir.debian.org jessie-updates/contrib amd64 Packages
Get:9 https://artifacts.elastic.co jessie/stable amd64 Packages [333 B]
Get:10 http://httpredir.debian.org jessie-updates/non-free amd64 Packages/DiffIndex [736 B]
Get:11 https://artifacts.elastic.co jessie/main Translation-en_US [332 B]
Hit http://httpredir.debian.org jessie-updates/contrib Translation-en
Get:12 https://artifacts.elastic.co jessie/main Translation-en [329 B]
Get:13 http://httpredir.debian.org jessie-updates/main Translation-en/DiffIndex [3,688 B]
Get:14 https://artifacts.elastic.co jessie/stable Translation-en_US [334 B]
Get:15 http://httpredir.debian.org jessie-updates/non-free Translation-en/DiffIndex [736 B]
Get:16 https://artifacts.elastic.co jessie/stable Translation-en [331 B]
Hit http://httpredir.debian.org jessie Release
Get:17 https://artifacts.elastic.co jessie/main amd64 Packages [331 B]
Hit http://httpredir.debian.org jessie/main Sources
Get:18 https://artifacts.elastic.co jessie/stable amd64 Packages [333 B]
Hit http://httpredir.debian.org jessie/contrib Sources
Hit http://httpredir.debian.org jessie/non-free Sources
Get:19 https://artifacts.elastic.co jessie/main Translation-en_US [332 B]
Hit http://httpredir.debian.org jessie/main amd64 Packages
Get:20 https://artifacts.elastic.co jessie/main Translation-en [329 B]
Hit http://httpredir.debian.org jessie/contrib amd64 Packages
Get:21 https://artifacts.elastic.co jessie/stable Translation-en_US [334 B]
Hit http://httpredir.debian.org jessie/non-free amd64 Packages
Get:22 https://artifacts.elastic.co jessie/stable Translation-en [331 B]
Hit http://httpredir.debian.org jessie/contrib Translation-en
Get:23 https://artifacts.elastic.co jessie/main amd64 Packages [331 B]
Hit http://httpredir.debian.org jessie/main Translation-en
Get:24 https://artifacts.elastic.co jessie/stable amd64 Packages [333 B]
Hit http://httpredir.debian.org jessie/non-free Translation-en
Get:25 https://artifacts.elastic.co jessie/main Translation-en_US [332 B]
Get:26 https://artifacts.elastic.co jessie/main Translation-en [329 B]
Get:27 https://artifacts.elastic.co jessie/stable Translation-en_US [334 B]
Get:28 https://artifacts.elastic.co jessie/stable Translation-en [331 B]
Get:29 https://artifacts.elastic.co jessie/main amd64 Packages [331 B]
Get:30 https://artifacts.elastic.co jessie/stable amd64 Packages [333 B]
Get:31 https://artifacts.elastic.co jessie/main Translation-en_US [332 B]
Get:32 https://artifacts.elastic.co jessie/main Translation-en [329 B]
Get:33 https://artifacts.elastic.co jessie/stable Translation-en_US [334 B]
Get:34 https://artifacts.elastic.co jessie/stable Translation-en [331 B]
Get:35 https://artifacts.elastic.co jessie/main amd64 Packages [331 B]
Err https://artifacts.elastic.co jessie/main amd64 Packages
  HttpError404
Get:36 https://artifacts.elastic.co jessie/stable amd64 Packages [333 B]
Err https://artifacts.elastic.co jessie/stable amd64 Packages
  HttpError404
Get:37 https://artifacts.elastic.co jessie/main Translation-en_US [332 B]
Ign https://artifacts.elastic.co jessie/main Translation-en_US
Get:38 https://artifacts.elastic.co jessie/main Translation-en [329 B]
Ign https://artifacts.elastic.co jessie/main Translation-en
Get:39 https://artifacts.elastic.co jessie/stable Translation-en_US [334 B]
Ign https://artifacts.elastic.co jessie/stable Translation-en_US
Get:40 https://artifacts.elastic.co jessie/stable Translation-en [331 B]
Ign https://artifacts.elastic.co jessie/stable Translation-en
Fetched 97.4 kB in 6s (14.2 kB/s)
W: Failed to fetch https://artifacts.elastic.co/packages/5.x/apt/dists/jessie/main/binary-amd64/Packages  HttpError404

W: Failed to fetch https://artifacts.elastic.co/packages/5.x/apt/dists/jessie/stable/binary-amd64/Packages  HttpError404

Am I doing it wrong?

Where did you get that deb configuration from? The repo is not OS specific, so it should not include "jessie" as you have. See the docs:
https://www.elastic.co/guide/en/elasticsearch/reference/current/deb.html

1 Like

I thought the same thing. Taking out the distro still throws me one 404 error though.

Hit http://security.debian.org jessie/updates InRelease
Hit http://cloudfront.debian.net jessie-backports InRelease
Get:1 http://cloudfront.debian.net jessie-backports/main Sources/DiffIndex [27.8 kB]
Hit http://security.debian.org jessie/updates/non-free Sources
Get:2 http://cloudfront.debian.net jessie-backports/main amd64 Packages/DiffIndex [27.8 kB]
Hit http://security.debian.org jessie/updates/non-free amd64 Packages
Get:3 http://cloudfront.debian.net jessie-backports/main Translation-en/DiffIndex [27.8 kB]
Hit http://security.debian.org jessie/updates/non-free Translation-en
Ign http://httpredir.debian.org jessie InRelease
Hit http://security.debian.org jessie/updates/main Sources
Hit http://security.debian.org jessie/updates/contrib Sources
Hit http://security.debian.org jessie/updates/main amd64 Packages
Hit http://security.debian.org jessie/updates/contrib amd64 Packages
Hit http://security.debian.org jessie/updates/contrib Translation-en
Hit http://httpredir.debian.org jessie-updates InRelease
Get:4 https://artifacts.elastic.co main InRelease [308 B]
Ign https://artifacts.elastic.co main InRelease
Hit http://security.debian.org jessie/updates/main Translation-en
Get:5 https://artifacts.elastic.co main Release.gpg [310 B]
Ign https://artifacts.elastic.co main Release.gpg
Hit http://httpredir.debian.org jessie Release.gpg
Get:6 https://artifacts.elastic.co main Release [306 B]
Ign https://artifacts.elastic.co main Release
Get:7 https://artifacts.elastic.co main/stable amd64 Packages [331 B]
Hit http://httpredir.debian.org jessie-updates/main Sources
Get:8 https://artifacts.elastic.co main/stable Translation-en_US [332 B]
Hit http://httpredir.debian.org jessie-updates/contrib Sources
Get:9 https://artifacts.elastic.co main/stable Translation-en [329 B]
Get:10 https://artifacts.elastic.co main/stable amd64 Packages [331 B]
Hit http://httpredir.debian.org jessie-updates/non-free Sources
Get:11 https://artifacts.elastic.co main/stable Translation-en_US [332 B]
Get:12 http://httpredir.debian.org jessie-updates/main amd64 Packages/DiffIndex [8,884 B]
Hit http://httpredir.debian.org jessie-updates/contrib amd64 Packages
Get:13 http://httpredir.debian.org jessie-updates/non-free amd64 Packages/DiffIndex [736 B]
Hit http://httpredir.debian.org jessie-updates/contrib Translation-en
Get:14 http://httpredir.debian.org jessie-updates/main Translation-en/DiffIndex [3,688 B]
Get:15 http://httpredir.debian.org jessie-updates/non-free Translation-en/DiffIndex [736 B]
Hit http://httpredir.debian.org jessie Release
Get:16 https://artifacts.elastic.co main/stable Translation-en [329 B]
Get:17 https://artifacts.elastic.co main/stable amd64 Packages [331 B]
Hit http://httpredir.debian.org jessie/main Sources
Get:18 https://artifacts.elastic.co main/stable Translation-en_US [332 B]
Hit http://httpredir.debian.org jessie/contrib Sources
Hit http://httpredir.debian.org jessie/non-free Sources
Get:19 https://artifacts.elastic.co main/stable Translation-en [329 B]
Hit http://httpredir.debian.org jessie/main amd64 Packages
Get:20 https://artifacts.elastic.co main/stable amd64 Packages [331 B]
Hit http://httpredir.debian.org jessie/contrib amd64 Packages
Get:21 https://artifacts.elastic.co main/stable Translation-en_US [332 B]
Hit http://httpredir.debian.org jessie/non-free amd64 Packages
Get:22 https://artifacts.elastic.co main/stable Translation-en [329 B]
Get:23 https://artifacts.elastic.co main/stable amd64 Packages [331 B]
Err https://artifacts.elastic.co main/stable amd64 Packages
  HttpError404
Hit http://httpredir.debian.org jessie/contrib Translation-en
Get:24 https://artifacts.elastic.co main/stable Translation-en_US [332 B]
Ign https://artifacts.elastic.co main/stable Translation-en_US
Hit http://httpredir.debian.org jessie/main Translation-en
Get:25 https://artifacts.elastic.co main/stable Translation-en [329 B]
Ign https://artifacts.elastic.co main/stable Translation-en
Hit http://httpredir.debian.org jessie/non-free Translation-en
Fetched 97.4 kB in 3s (24.9 kB/s)
W: Failed to fetch https://artifacts.elastic.co/packages/5.x/apt/dists/main/stable/binary-amd64/Packages  HttpError404

Ugh,
1.) Always sleep on a problem before asking the internet.
2.) Double check the instructions

Swapping 'stable' and 'main ' in the source string solved this.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.