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 ingress controller can not startup when enable the opentracing #3268

Closed
hchenxa opened this issue Oct 19, 2018 · 9 comments
Closed

nginx ingress controller can not startup when enable the opentracing #3268

hchenxa opened this issue Oct 19, 2018 · 9 comments

Comments

@hchenxa
Copy link
Contributor

hchenxa commented Oct 19, 2018

Is this a request for help? (If yes, you should use our troubleshooting guide and community support channels, see https://kubernetes.io/docs/tasks/debug-application-cluster/troubleshooting/.):

What keywords did you search in NGINX Ingress controller issues before filing this one? (If you have found any duplicates, you should instead reply there.):


Is this a BUG REPORT or FEATURE REQUEST? (choose one):

NGINX Ingress controller version:
0.19.0

Kubernetes version (use kubectl version):
v1.11.1

Environment:

  • Cloud provider or hardware configuration:
  • OS (e.g. from /etc/os-release): ubuntu 16.04
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

What happened:
refer the logs below:

I1018 03:58:51.638064       8 controller.go:935] Ingress "default/date-server" defines a backend but no rule. Using it to configure the catch-all server "_"
I1018 03:58:51.638131       8 controller.go:171] Configuration changes detected, backend reload required.
I1018 03:58:51.639383       8 util.go:68] rlimit.max=1048576
I1018 03:58:51.639441       8 nginx.go:525] Maximum number of open file descriptors: 64512
E1018 03:58:51.679437       8 controller.go:183] Unexpected failure reloading the backend:

-------------------------------------------------------------------------------
Error: exit status 1
2018/10/18 03:58:51 [error] 125#125: Failed to construct tracer: Error resolving address: Name or service not known
nginx: [error] Failed to construct tracer: Error resolving address: Name or service not known
nginx: configuration file /tmp/nginx-cfg604005121 test failed

-------------------------------------------------------------------------------
W1018 03:58:51.679462       8 queue.go:130] requeuing kube-system/custom-metrics-adapter, err
-------------------------------------------------------------------------------
Error: exit status 1
2018/10/18 03:58:51 [error] 125#125: Failed to construct tracer: Error resolving address: Name or service not known
nginx: [error] Failed to construct tracer: Error resolving address: Name or service not known
nginx: configuration file /tmp/nginx-cfg604005121 test failed

-------------------------------------------------------------------------------
I1018 03:58:54.752851       8 main.go:158] Received SIGTERM, shutting down
I1018 03:58:54.752893       8 nginx.go:341] Shutting down controller queues
I1018 03:58:54.752918       8 status.go:119] updating status of Ingress rules (remove)

the nginx ingress controller can not startup when opentracing enabled.

What you expected to happen:

the ingress should be startup

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know:

@hchenxa
Copy link
Contributor Author

hchenxa commented Oct 19, 2018

the issue seems only exist when the JaegerServiceName can not be solved.

@aledbf
Copy link
Member

aledbf commented Oct 19, 2018

Error resolving address: Name or service not known

Please check the FQDN of the opentracing server is valid. If you are using a service don't use just the name

@hchenxa
Copy link
Contributor Author

hchenxa commented Oct 19, 2018

@aledbf, the service name can be solved, as I append above, I think the root cause was the JaegerServiceName which configed in nginx ingress configmap was unreachable during startup, after I recover the jaeger service, the nginx ingress controller now startup.

@aledbf
Copy link
Member

aledbf commented Oct 19, 2018

was unreachable during startup

This is because NGINX resolves dns only at the start. There's no much we can do about this.

@hchenxa
Copy link
Contributor Author

hchenxa commented Oct 19, 2018

but this should not block the nginx ingress controller startup.

and I try to use zikpin host for as the opentracing collect host and did not found the same issue even if the zikpin host can not resolved.

@aledbf
Copy link
Member

aledbf commented Oct 19, 2018

but this should not block the nginx ingress controller startup.

How? This error is produced when we run nginx -t, there's no way to bypass an error in the configuration file. If we just reload NGINX it means we break the configuration and NGINX will not respond any request.

@hchenxa
Copy link
Contributor Author

hchenxa commented Oct 19, 2018

when nginx ingress controller restarted.

@aledbf
Copy link
Member

aledbf commented Oct 19, 2018

when nginx ingress controller restarted.

Again, If the NGINX check fails there is nothing we can do. If you kill the pod and the host is not valid, NGINX will not start (reload in this case)

@premjha9625
Copy link

Hi @hchenxa how you recovered the jaeger service name ?

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