Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nginx+ build fails (https://plus-pkgs.nginx.com/ missing packages) #230

Closed
multi-io opened this issue Jan 29, 2018 · 2 comments
Closed

nginx+ build fails (https://plus-pkgs.nginx.com/ missing packages) #230

multi-io opened this issue Jan 29, 2018 · 2 comments

Comments

@multi-io
Copy link

multi-io commented Jan 29, 2018

ubuntu@devbox(default):~/src/nginxinc/kubernetes-ingress/nginx-controller$ make DOCKERFILE=DockerfileForPlus PREFIX=localhost:4000/oklischat/nginxinc-ingress TAG=latest GENERATE_DEFAULT_CERT_AND_KEY=1
docker run --rm -v /home/ubuntu/src/nginxinc/kubernetes-ingress/nginx-controller/../:/go/src/github.com/nginxinc/kubernetes-ingress -w /go/src/github.com/nginxinc/kubernetes-ingress/nginx-controller/ golang:1.9 go test ./...
?       github.com/nginxinc/kubernetes-ingress/nginx-controller [no test files]
?       github.com/nginxinc/kubernetes-ingress/nginx-controller/controller      [no test files]
ok      github.com/nginxinc/kubernetes-ingress/nginx-controller/nginx   0.141s
?       github.com/nginxinc/kubernetes-ingress/nginx-controller/nginx/plus      [no test files]
ok      github.com/nginxinc/kubernetes-ingress/nginx-controller/nginx/templates 0.060s
./generate_default_cert_and_key.sh
Generating a 2048 bit RSA private key
....................................+++
...........................................................................+++
writing new private key to 'default.key'
-----
docker build -f DockerfileForPlus -t localhost:4000/oklischat/nginxinc-ingress:latest .
Sending build context to Docker daemon  25.61MB
Step 1/17 : FROM ubuntu:16.04
 ---> f7b3f317ec73
Step 2/17 : MAINTAINER NGINX Docker Maintainers "[email protected]"
 ---> Using cache
 ---> 5ae1f16a446d
Step 3/17 : RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
 ---> Using cache
 ---> 948744da85a5
Step 4/17 : RUN apt-get update && apt-get install -y -q wget lsb-release apt-transport-https
 ---> Using cache
 ---> 14be465c24c1
Step 5/17 : ADD nginx-repo.crt /etc/ssl/nginx/
 ---> Using cache
 ---> fc2e9a6ef151
Step 6/17 : ADD nginx-repo.key /etc/ssl/nginx/
 ---> Using cache
 ---> 844bc21248b8
Step 7/17 : RUN wget -q -O - http://nginx.org/keys/nginx_signing.key | apt-key add -
 ---> Using cache
 ---> 990dbd7f9cce
Step 8/17 : RUN wget -q -O /etc/apt/apt.conf.d/90nginx https://cs.nginx.com/static/files/90nginx
 ---> Using cache
 ---> c2ba638c2df9
Step 9/17 : RUN printf "deb https://plus-pkgs.nginx.com/ubuntu `lsb_release -cs` nginx-plus\n" >/etc/apt/sources.list.d/nginx-plus.list
 ---> Using cache
 ---> 385c48597160
Step 10/17 : RUN apt-get update && apt-get install -y nginx-plus
 ---> Running in b564d5ea5ffd
Hit:1 http://security.ubuntu.com/ubuntu xenial-security InRelease
Ign:2 https://plus-pkgs.nginx.com/ubuntu xenial InRelease
Hit:3 http://archive.ubuntu.com/ubuntu xenial InRelease
Ign:4 https://plus-pkgs.nginx.com/ubuntu xenial Release
Ign:5 https://plus-pkgs.nginx.com/ubuntu xenial/nginx-plus amd64 Packages
Ign:6 https://plus-pkgs.nginx.com/ubuntu xenial/nginx-plus all Packages
Ign:5 https://plus-pkgs.nginx.com/ubuntu xenial/nginx-plus amd64 Packages
Ign:6 https://plus-pkgs.nginx.com/ubuntu xenial/nginx-plus all Packages
Ign:5 https://plus-pkgs.nginx.com/ubuntu xenial/nginx-plus amd64 Packages
Ign:6 https://plus-pkgs.nginx.com/ubuntu xenial/nginx-plus all Packages
Ign:5 https://plus-pkgs.nginx.com/ubuntu xenial/nginx-plus amd64 Packages
Ign:6 https://plus-pkgs.nginx.com/ubuntu xenial/nginx-plus all Packages
Ign:5 https://plus-pkgs.nginx.com/ubuntu xenial/nginx-plus amd64 Packages
Ign:6 https://plus-pkgs.nginx.com/ubuntu xenial/nginx-plus all Packages
Err:5 https://plus-pkgs.nginx.com/ubuntu xenial/nginx-plus amd64 Packages
  error reading X.509 key or certificate file: Error while reading file.
Ign:6 https://plus-pkgs.nginx.com/ubuntu xenial/nginx-plus all Packages
Hit:7 http://archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:8 http://archive.ubuntu.com/ubuntu xenial-backports InRelease
Reading package lists...
W: The repository 'https://plus-pkgs.nginx.com/ubuntu xenial Release' does not have a Release file.
E: Failed to fetch https://plus-pkgs.nginx.com/ubuntu/dists/xenial/nginx-plus/binary-amd64/Packages  error reading X.509 key or certificate file: Error while reading file.
E: Some index files failed to download. They have been ignored, or old ones used instead.
The command '/bin/sh -c apt-get update && apt-get install -y nginx-plus' returned a non-zero code: 100
Makefile:37: recipe for target 'container' failed
make: *** [container] Error 100
ubuntu@devbox(default):~/src/nginxinc/kubernetes-ingress/nginx-controller$

If I RUN chmod 644 /etc/ssl/nginx/* in DockerfileForPlus right after the two ADDs to /etc/ssl/nginx/, I get " 400 Bad Request" instead of "error reading X.509 key or certificate file: Error while reading file.", but otherwise the same error.

@multi-io
Copy link
Author

multi-io commented Jan 29, 2018

Update: Tested with a 30-days trial license now, it works with that. The license above was my employer's; the corresponding certificate expired several years ago. Not sure if the problem still constitutes a bug or not.

@pleshakov
Copy link
Contributor

@multi-io
Thanks for reporting that. If the certificate and the key didn't have read permission enabled for any user, apt would fail with an error related to reading those files. #231 makes sure that the cert and the key have correct permissions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants