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

Panic when switching SSL Certs and Keys #1029

Closed
CBeerta opened this issue Jul 27, 2017 · 3 comments
Closed

Panic when switching SSL Certs and Keys #1029

CBeerta opened this issue Jul 27, 2017 · 3 comments

Comments

@CBeerta
Copy link

CBeerta commented Jul 27, 2017

Using the 0.9.0-beta.11 Version, i've experienced a Panic when accidentally uploading a TLS CRT als tls.key and a KEY as tls.crt to the Secrets store and using them in an Ingress rule:

E0727 07:03:46.107908       7 runtime.go:66] Observed a panic: "invalid memory address or nil pointer dereference" (runtime error: invalid memory address or nil pointer dereference)
/var/build/go/src/k8s.io/ingress/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:72
/var/build/go/src/k8s.io/ingress/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:65
/var/build/go/src/k8s.io/ingress/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:51
/usr/local/go/src/runtime/asm_amd64.s:514
/usr/local/go/src/runtime/panic.go:489
/usr/local/go/src/runtime/panic.go:63
/usr/local/go/src/runtime/signal_unix.go:290
/var/build/go/src/k8s.io/ingress/core/pkg/ingress/controller/backend_ssl.go:92
/var/build/go/src/k8s.io/ingress/core/pkg/ingress/controller/backend_ssl.go:44
/var/build/go/src/k8s.io/ingress/core/pkg/ingress/controller/controller.go:1213
/var/build/go/src/k8s.io/ingress/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:97
/var/build/go/src/k8s.io/ingress/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:98
/var/build/go/src/k8s.io/ingress/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:52
/var/build/go/src/k8s.io/ingress/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:43
/usr/local/go/src/runtime/asm_amd64.s:2197
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
        panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1210fb9]

goroutine 93 [running]:
k8s.io/ingress/vendor/k8s.io/apimachinery/pkg/util/runtime.HandleCrash(0x0, 0x0, 0x0)
        /var/build/go/src/k8s.io/ingress/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:58 +0x126
panic(0x13ad960, 0x1dc8330)
        /usr/local/go/src/runtime/panic.go:489 +0x2cf
k8s.io/ingress/core/pkg/ingress/controller.(*GenericController).getPemCertificate(0xc420260f20, 0xc42050b640, 0x17, 0x1, 0x0, 0x0)
        /var/build/go/src/k8s.io/ingress/core/pkg/ingress/controller/backend_ssl.go:92 +0x7c9
k8s.io/ingress/core/pkg/ingress/controller.(*GenericController).syncSecret(0xc420260f20)
        /var/build/go/src/k8s.io/ingress/core/pkg/ingress/controller/backend_ssl.go:44 +0xff
k8s.io/ingress/core/pkg/ingress/controller.(*GenericController).(k8s.io/ingress/core/pkg/ingress/controller.syncSecret)-fm()
        /var/build/go/src/k8s.io/ingress/core/pkg/ingress/controller/controller.go:1213 +0x2a
k8s.io/ingress/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil.func1(0xc4214aeee0)
        /var/build/go/src/k8s.io/ingress/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:97 +0x5e
k8s.io/ingress/vendor/k8s.io/apimachinery/pkg/util/wait.JitterUntil(0xc4214aeee0, 0x2540be400, 0x0, 0x1, 0xc4200a5020)
        /var/build/go/src/k8s.io/ingress/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:98 +0xbd
k8s.io/ingress/vendor/k8s.io/apimachinery/pkg/util/wait.Until(0xc4214aeee0, 0x2540be400, 0xc4200a5020)
        /var/build/go/src/k8s.io/ingress/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:52 +0x4d
k8s.io/ingress/vendor/k8s.io/apimachinery/pkg/util/wait.Forever(0xc4214aeee0, 0x2540be400)
        /var/build/go/src/k8s.io/ingress/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:43 +0x41
created by k8s.io/ingress/core/pkg/ingress/controller.GenericController.Start
        /var/build/go/src/k8s.io/ingress/core/pkg/ingress/controller/controller.go:1213 +0x4c3
[dumb-init] Received signal 17.
[dumb-init] A child with PID 7 exited with exit status 2.
[dumb-init] Forwarded signal 15 to children.
[dumb-init] Child exited with status 2. Goodbye.

The Ingress looks like:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: echoheaders
  annotations:
    kubernetes.io/ingress.class: "proxy"
spec:
  tls:
  - secretName: foo-secret
  rules:
  - http:
      paths:
      - path: /claus/echoheaders
        backend:
          serviceName: echoheaders
          servicePort: 80
@ChenPeng2013
Copy link

最新的master代码已经fix了

@aledbf
Copy link
Member

aledbf commented Jul 27, 2017

@CBeerta please update the image to quay.io/aledbf/nginx-ingress-controller:0.171

@aledbf
Copy link
Member

aledbf commented Jul 28, 2017

Closing. Please reopen if the issue persists after the update

@aledbf aledbf closed this as completed Jul 28, 2017
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

3 participants