Repository giving a 404 when behind apt-cacher


(Tim Bourne) #1

Our network requires that we use an apt-cacher server for outbound access to debian/ubuntu repositories. I successfully set up elasticsearch and was able to install that through our apt-cacher server. However I’m getting a 404 from the graylog2 repo server. Here’s the output from an apt-get update:

Has anyone else run into this? Thanks for any help you can give!


(Jochen) #2

You’re using the wrong URL.

$ curl -L -I http://packages.graylog2.org/repo/debian/dists/stable/2.2/binary-amd64/Packages
HTTP/1.1 302 Found
Server: Cowboy
Connection: keep-alive
Date: Tue, 02 May 2017 14:27:50 GMT
Location: http://graylog2-package-repository.s3.amazonaws.com/debian/dists/stable/2.2/binary-amd64/Packages?AWSAccessKeyId=AKIAIJSI6MCSPXFVDPIA&Expires=1493735870&Signature=CJL9DtG7xP7zHXc%2FrT8jzZwR%2B2U%3D
Via: 1.1 vegur

HTTP/1.1 403 Forbidden
x-amz-request-id: 993F4348E0687305
x-amz-id-2: zOJF2nnYJa/iGqGeIBS8iM8KNf1CnuFmSttWi8u1DE4q4mXW6Az5urcPH5WO7K0rLKGzrBNHEQk=
Content-Type: application/xml
Transfer-Encoding: chunked
Date: Tue, 02 May 2017 14:27:50 GMT
Server: AmazonS3
$ curl -L -I http://packages.graylog2.org/debian/dists/stable/2.2/binary-amd64/Packages
HTTP/1.1 200 OK
Server: Cowboy
Connection: keep-alive
Date: Tue, 02 May 2017 14:27:57 GMT
Content-Type: text/html
Content-Length: 2181
Via: 1.1 vegur

(Tim Bourne) #3

jochen, thanks for the response! You’ll have to enlighten me on how to change that. I manually downloaded/installed the graylog-2.2-repository_latest.deb and then ran apt-get update, at which point I got the 404. The line I have in /etc/apt/sources.list.d/graylog.list is:

deb http://packages.graylog2.org/repo/debian/ stable 2.2

What should I update that to?


(Jochen) #4

Oh, I’m sorry. Forget my last post, your URI is correct, mine was wrong. It points to the HTML page (text/html) listing the contents of the package repository instead of providing the binary contents of the listed files.

This being said, your original URI works for me:

curl -Ls http://packages.graylog2.org/repo/debian/dists/stable/2.2/binary-amd64/Packages | tail -n20
Version: 2.2.3-1
License: GPLv3
Vendor: graylog
Architecture: all
Maintainer: Graylog, Inc. <hello@graylog.org>
Installed-Size: 105137
Depends: uuid-runtime
Conflicts: graylog2-web, graylog-web
Replaces: graylog2-server
Section: net
Priority: extra
Homepage: https://www.graylog.org/
Description: Graylog server
Filename: pool/stable/2.2/g/graylog-server/graylog-server_2.2.3-1_all.deb
MD5sum: c8b795c67e4eeeb1ca39d89ccd93a07f
SHA1: 4c828157eefa2e68bcea4133cc80630bb826dd3b
SHA256: abf0928e6fbb817365e3035f47598dce95ccc73d3b48a97ff6aebc801f81d747
SHA512: 5446a1e065fab93761612dd508a9a5fd05557948ed0c9b211c47dede83fb70282a68736ab048ac0c0ed516c4ca587cad23b47984b30dc3367a58377c41b8d96e
Size: 97541418

Maybe there’s a proxy delivering the wrong response in your network?


(Tim Bourne) #5

After further inspection, it appears that packages.graylog2.org has a 302 on it to graylog2-package-repository.s3.amazonaws.com. I had to add this URL to our firewall to allow the traffic from our apt-cacher server. Hopefully me bumping my head on this will help someone else.

Thanks for your help, jochen!