# APT Repositories are failing with 404

**URL:** https://discuss.elastic.co/t/apt-repositories-are-failing-with-404/47713
**Category:** Beats
**Created:** [April 18, 2016, 8:50pm UTC](https://discuss.elastic.co/t/apt-repositories-are-failing-with-404/47713 "2016-04-18T20:50:39Z")
**Posts on this page:** 16
**Page:** 1

<div class="post-metadata">

### Author: ![Bill\_Clark](https://avatars.discourse-cdn.com/v4/letter/b/c89c15/32.png) [@Bill\_Clark](https://discuss.elastic.co/u/Bill_Clark)
#### Post date: [April 18, 2016, 8:50pm UTC](https://discuss.elastic.co/t/apt-repositories-are-failing-with-404/47713/1 "2016-04-18T20:50:39Z")

</div>

Following the instructions to setup apt repository at: [https://www.elastic.co/guide/en/beats/libbeat/current/setup-repositories.html](https://www.elastic.co/guide/en/beats/libbeat/current/setup-repositories.html).

$ curl [https://packages.elasticsearch.org/GPG-KEY-elasticsearch](https://packages.elasticsearch.org/GPG-KEY-elasticsearch) | sudo apt-key add -  
% Total % Received % Xferd Average Speed Time Time Time Current  
Dload Upload Total Spent Left Speed  
100 1768 100 1768 0 0 3276 0 --:--:-- --:--:-- --:--:-- 3280  
OK

$ sudo apt-get update  
...  
Get:1 [https://packages.elastic.co](https://packages.elastic.co) trusty InRelease  
Ign [https://packages.elastic.co](https://packages.elastic.co) trusty InRelease  
Ign [https://packages.elastic.co](https://packages.elastic.co) trusty Release.gpg  
...  
Ign [https://packages.elastic.co](https://packages.elastic.co) trusty Release  
...  
Err [https://packages.elastic.co](https://packages.elastic.co) trusty/main amd64 Packages  
HttpError404  
Hit [http://archive.ubuntu.com](http://archive.ubuntu.com) trusty-backports/multiverse i386 Packages  
Err [https://packages.elastic.co](https://packages.elastic.co) trusty/stable amd64 Packages  
HttpError404  
Err [https://packages.elastic.co](https://packages.elastic.co) trusty/main i386 Packages  
HttpError404  
Hit [http://archive.ubuntu.com](http://archive.ubuntu.com) trusty-backports/main Translation-en  
Err [https://packages.elastic.co](https://packages.elastic.co) trusty/stable i386 Packages  
HttpError404  
Hit [http://archive.ubuntu.com](http://archive.ubuntu.com) trusty-backports/multiverse Translation-en  
Ign [https://packages.elastic.co](https://packages.elastic.co) trusty/main Translation-en\_US  
Ign [https://packages.elastic.co](https://packages.elastic.co) trusty/main Translation-en  
Hit [http://archive.ubuntu.com](http://archive.ubuntu.com) trusty-backports/restricted Translation-en  
Ign [https://packages.elastic.co](https://packages.elastic.co) trusty/stable Translation-en\_US  
Hit [http://archive.ubuntu.com](http://archive.ubuntu.com) trusty-backports/universe Translation-en  
Ign [https://packages.elastic.co](https://packages.elastic.co) trusty/stable Translation-en  
...  
W: Failed to fetch [https://packages.elastic.co/beats/apt/dists/trusty/main/binary-amd64/Packages](https://packages.elastic.co/beats/apt/dists/trusty/main/binary-amd64/Packages) HttpError404

W: Failed to fetch [https://packages.elastic.co/beats/apt/dists/trusty/stable/binary-amd64/Packages](https://packages.elastic.co/beats/apt/dists/trusty/stable/binary-amd64/Packages) HttpError404

W: Failed to fetch [https://packages.elastic.co/beats/apt/dists/trusty/main/binary-i386/Packages](https://packages.elastic.co/beats/apt/dists/trusty/main/binary-i386/Packages) HttpError404

W: Failed to fetch [https://packages.elastic.co/beats/apt/dists/trusty/stable/binary-i386/Packages](https://packages.elastic.co/beats/apt/dists/trusty/stable/binary-i386/Packages) HttpError404

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

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [April 18, 2016, 8:55pm UTC](https://discuss.elastic.co/t/apt-repositories-are-failing-with-404/47713/2 "2016-04-18T20:55:59Z")

</div>

What about the echo part for the sources, what did you do there?

---

<div class="post-metadata">

### Author: ![Bill\_Clark](https://avatars.discourse-cdn.com/v4/letter/b/c89c15/32.png) [@Bill\_Clark](https://discuss.elastic.co/u/Bill_Clark)
#### Post date: [April 18, 2016, 9:26pm UTC](https://discuss.elastic.co/t/apt-repositories-are-failing-with-404/47713/3 "2016-04-18T21:26:40Z")

</div>

Sorry, Mark. I'm not following you. Can you be more specific or list commands you'd like executed?

It would seem the S3 objects for [packages.elastic.co/beats/apt/](http://packages.elastic.co/beats/apt/)... are either missing or not accessible to public.

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [April 18, 2016, 9:31pm UTC](https://discuss.elastic.co/t/apt-repositories-are-failing-with-404/47713/4 "2016-04-18T21:31:06Z")

</div>

The second step in the docs is `echo "deb https://packages.elastic.co/beats/apt stable main" | sudo tee -a /etc/apt/sources.list.d/beats.list`, is that what you did?

I just tried the steps in the instructions then without any issues.

---

<div class="post-metadata">

### Author: ![Bill\_Clark](https://avatars.discourse-cdn.com/v4/letter/b/c89c15/32.png) [@Bill\_Clark](https://discuss.elastic.co/u/Bill_Clark)
#### Post date: [April 18, 2016, 9:41pm UTC](https://discuss.elastic.co/t/apt-repositories-are-failing-with-404/47713/5 "2016-04-18T21:41:14Z")

</div>

I must have clipped it when shortening the logs. Here's the full output.

`  
vagrant@dev:~$ curl [https://packages.elasticsearch.org/GPG-KEY-elasticsearch](https://packages.elasticsearch.org/GPG-KEY-elasticsearch) | sudo apt-key add -  
% Total % Received % Xferd Average Speed Time Time Time Current  
Dload Upload Total Spent Left Speed  
100 1768 100 1768 0 0 2095 0 --:--:-- --:--:-- --:--:-- 2094  
OK

vagrant@dev:~$ echo "deb [https://packages.elastic.co/beats/apt](https://packages.elastic.co/beats/apt) stable main" | sudo tee -a /etc/apt/sources.list.d/beats.list  
deb [https://packages.elastic.co/beats/apt](https://packages.elastic.co/beats/apt) stable main

vagrant@dev:~$ sudo apt-get update  
Ign [http://archive.ubuntu.com](http://archive.ubuntu.com) trusty InRelease  
Get:1 [http://security.ubuntu.com](http://security.ubuntu.com) trusty-security InRelease [65.9 kB]  
...  
Get:7 [http://security.ubuntu.com](http://security.ubuntu.com) trusty-security/universe Sources [35.5 kB]  
...  
Get:12 [https://packages.elastic.co](https://packages.elastic.co) trusty Release  
Ign [https://packages.elastic.co](https://packages.elastic.co) trusty Release  
...  
Get:15 [https://packages.elastic.co](https://packages.elastic.co) trusty/main amd64 Packages  
...  
Get:23 [https://packages.elastic.co](https://packages.elastic.co) stable/main i386 Packages  
...  
Get:25 [https://packages.elastic.co](https://packages.elastic.co) stable/main Translation-en\_US  
...  
Hit [http://archive.ubuntu.com](http://archive.ubuntu.com) trusty/multiverse i386 Packages  
Err [https://packages.elastic.co](https://packages.elastic.co) trusty/main amd64 Packages  
HttpError404  
Hit [http://archive.ubuntu.com](http://archive.ubuntu.com) trusty/main Translation-en  
Err [https://packages.elastic.co](https://packages.elastic.co) trusty/stable amd64 Packages  
HttpError404  
Hit [http://archive.ubuntu.com](http://archive.ubuntu.com) trusty/multiverse Translation-en  
Err [https://packages.elastic.co](https://packages.elastic.co) trusty/main i386 Packages  
HttpError404  
Hit [http://archive.ubuntu.com](http://archive.ubuntu.com) trusty/restricted Translation-en  
Err [https://packages.elastic.co](https://packages.elastic.co) trusty/stable i386 Packages  
HttpError404  
Ign [https://packages.elastic.co](https://packages.elastic.co) trusty/main Translation-en\_US  
Ign [https://packages.elastic.co](https://packages.elastic.co) trusty/main Translation-en  
Hit [http://archive.ubuntu.com](http://archive.ubuntu.com) trusty/universe Translation-en  
Ign [https://packages.elastic.co](https://packages.elastic.co) trusty/stable Translation-en\_US  
Ign [https://packages.elastic.co](https://packages.elastic.co) trusty/stable Translation-en  
Ign [https://packages.elastic.co](https://packages.elastic.co) stable/main Translation-en\_US  
Ign [https://packages.elastic.co](https://packages.elastic.co) stable/main Translation-en  
Ign [http://archive.ubuntu.com](http://archive.ubuntu.com) trusty/main Translation-en\_US  
Ign [http://archive.ubuntu.com](http://archive.ubuntu.com) trusty/multiverse Translation-en\_US  
Ign [http://archive.ubuntu.com](http://archive.ubuntu.com) trusty/restricted Translation-en\_US  
Ign [http://archive.ubuntu.com](http://archive.ubuntu.com) trusty/universe Translation-en\_US  
Fetched 4,163 kB in 10s (395 kB/s)  
W: Failed to fetch [https://packages.elastic.co/beats/apt/dists/trusty/main/binary-amd64/Packages](https://packages.elastic.co/beats/apt/dists/trusty/main/binary-amd64/Packages) HttpError404

W: Failed to fetch [https://packages.elastic.co/beats/apt/dists/trusty/stable/binary-amd64/Packages](https://packages.elastic.co/beats/apt/dists/trusty/stable/binary-amd64/Packages) HttpError404

W: Failed to fetch [https://packages.elastic.co/beats/apt/dists/trusty/main/binary-i386/Packages](https://packages.elastic.co/beats/apt/dists/trusty/main/binary-i386/Packages) HttpError404

W: Failed to fetch [https://packages.elastic.co/beats/apt/dists/trusty/stable/binary-i386/Packages](https://packages.elastic.co/beats/apt/dists/trusty/stable/binary-i386/Packages) HttpError404

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

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [April 18, 2016, 9:42pm UTC](https://discuss.elastic.co/t/apt-repositories-are-failing-with-404/47713/6 "2016-04-18T21:42:25Z")

</div>

What's the contents of `/etc/apt/sources.list.d/beats.list`.

---

<div class="post-metadata">

### Author: ![Bill\_Clark](https://avatars.discourse-cdn.com/v4/letter/b/c89c15/32.png) [@Bill\_Clark](https://discuss.elastic.co/u/Bill_Clark)
#### Post date: [April 18, 2016, 9:43pm UTC](https://discuss.elastic.co/t/apt-repositories-are-failing-with-404/47713/7 "2016-04-18T21:43:24Z")

</div>

vagrant@dev:/$ cat /etc/apt/sources.list.d/beats.list  
deb "[https://packages.elastic.co/beats/apt](https://packages.elastic.co/beats/apt)" trusty main stable  
deb [https://packages.elastic.co/beats/apt](https://packages.elastic.co/beats/apt) stable main

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [April 18, 2016, 9:44pm UTC](https://discuss.elastic.co/t/apt-repositories-are-failing-with-404/47713/8 "2016-04-18T21:44:01Z")

</div>

It should just be `deb https://packages.elastic.co/beats/apt stable main`, looks like that first line is bad.

---

<div class="post-metadata">

### Author: ![Bill\_Clark](https://avatars.discourse-cdn.com/v4/letter/b/c89c15/32.png) [@Bill\_Clark](https://discuss.elastic.co/u/Bill_Clark)
#### Post date: [April 18, 2016, 9:48pm UTC](https://discuss.elastic.co/t/apt-repositories-are-failing-with-404/47713/9 "2016-04-18T21:48:11Z")

</div>

That worked! Thanks for your help. Now I need to determine if the TopBeat Chef recipes corrupted this file or something else I did.

Thanks for the quick feedback!

---

<div class="post-metadata">

### Author: ![Bill\_Clark](https://avatars.discourse-cdn.com/v4/letter/b/c89c15/32.png) [@Bill\_Clark](https://discuss.elastic.co/u/Bill_Clark)
#### Post date: [April 18, 2016, 10:29pm UTC](https://discuss.elastic.co/t/apt-repositories-are-failing-with-404/47713/10 "2016-04-18T22:29:47Z")

</div>

@warkolm Was there a change to the repository? I used the TopBeat chef recipe last week to deploy topbeat and didn't have any issues. This week it fails if 'trusty' is in `/etc/apt/sources.list.d/beats.list`

Chef output of content diffs.  
==\> dev: - deb "[https://packages.elastic.co/beats/apt](https://packages.elastic.co/beats/apt)" `trusty` stable main  
==\> dev:  
==\> dev: + deb "[https://packages.elastic.co/beats/apt](https://packages.elastic.co/beats/apt)" stable main

Why would it have worked last week but not today?

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [April 18, 2016, 10:33pm UTC](https://discuss.elastic.co/t/apt-repositories-are-failing-with-404/47713/11 "2016-04-18T22:33:57Z")

</div>

There hasn't been any changes since the last release.  
I don't know Chef so cannot comment more on that area sorry.

---

<div class="post-metadata">

### Author: ![Bill\_Clark](https://avatars.discourse-cdn.com/v4/letter/b/c89c15/32.png) [@Bill\_Clark](https://discuss.elastic.co/u/Bill_Clark)
#### Post date: [April 18, 2016, 10:43pm UTC](https://discuss.elastic.co/t/apt-repositories-are-failing-with-404/47713/12 "2016-04-18T22:43:21Z")

</div>

I was using 1.2.0 version of TopBeats. This week version 1.2.1 is available and APT repo started failing. Something changed on Elastic's end. Is there a specific reason the repo cannot support distribution code names?

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [April 18, 2016, 10:45pm UTC](https://discuss.elastic.co/t/apt-repositories-are-failing-with-404/47713/13 "2016-04-18T22:45:07Z")

</div>

We never have supported that because we don't specifically release for distros.

You can see here that the docs for the repo haven't changed anytime recently [https://github.com/elastic/beats/commits/1.2/libbeat/docs/repositories.asciidoc](https://github.com/elastic/beats/commits/1.2/libbeat/docs/repositories.asciidoc)

---

<div class="post-metadata">

### Author: ![Bill\_Clark](https://avatars.discourse-cdn.com/v4/letter/b/c89c15/32.png) [@Bill\_Clark](https://discuss.elastic.co/u/Bill_Clark)
#### Post date: [April 18, 2016, 10:49pm UTC](https://discuss.elastic.co/t/apt-repositories-are-failing-with-404/47713/14 "2016-04-18T22:49:38Z")

</div>

@warkolm Ok. Since beats are not built for any particular distro, I'll submit a pull request for the TopBeat Chef cookbook.

Thanks for your help.

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [April 18, 2016, 10:50pm UTC](https://discuss.elastic.co/t/apt-repositories-are-failing-with-404/47713/15 "2016-04-18T22:50:16Z")

</div>

No worries. I have asked the Beats team about this as well, so will see if they come back with anything.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 5, 2017, 9:53pm UTC](https://discuss.elastic.co/t/apt-repositories-are-failing-with-404/47713/16 "2017-07-05T21:53:03Z")

</div>


