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

kubernetes: Undefined backend 'X/' for frontend X/" #1026

Closed
abh opened this issue Jan 9, 2017 · 1 comment
Closed

kubernetes: Undefined backend 'X/' for frontend X/" #1026

abh opened this issue Jan 9, 2017 · 1 comment

Comments

@abh
Copy link

abh commented Jan 9, 2017

What version of Traefik are you using (traefik version)?

1.1.2

What is your environment & configuration (arguments, toml...)?

--web --kubernetes --kubernetes.namespaces=perlweb,xyz

What did you do?

traffic is running in the ingress namespace, the following ingress definition is setup in the perlweb namespace.

apiVersion: v1
items:
- apiVersion: extensions/v1beta1
  kind: Ingress
  metadata:
    creationTimestamp: 2017-01-09T09:52:31Z
    generation: 1
    name: perlweb-ingress
    namespace: perlweb
    resourceVersion: "414600"
    selfLink: /apis/extensions/v1beta1/namespaces/perlweb/ingresses/perlweb-ingress
    uid: 56c378f0-d651-11e6-86f0-525400f93bbc
  spec:
    rules:
    - host: www.perl.org
      http:
        paths:
        - backend:
            serviceName: web
            servicePort: 8235
          path: /
    - host: noc.perl.org
      http:
        paths:
        - backend:
            serviceName: web
            servicePort: 8235
          path: /
  status:
    loadBalancer: {}
kind: List
metadata: {}
resourceVersion: ""
selfLink: ""

What did you expect to see?

Working routes.

What did you see instead?

time="2017-01-09T09:52:31Z" level=debug msg="Received event from kubernetes map[type:ADDED object:map[kind:Ingress apiVersion:extensions/v1beta1 metadata:map[generation:1 creationTimestamp:2017-01-09T09:52:31Z name:perlweb-ingress namespace:perlweb selfLink:/apis/extensions/v1beta1/namespaces/perlweb/ingresses/perlweb-ingress uid:56c378f0-d651-11e6-86f0-525400f93bbc resourceVersion:414600] spec:map[rules:[map[host:www.perl.org http:map[paths:[map[backend:map[serviceName:web servicePort:8235] path:/]]]] map[host:noc.perl.org http:map[paths:[map[path:/ backend:map[serviceName:web servicePort:8235]]]]]]] status:map[loadBalancer:map[]]]]"
time="2017-01-09T09:52:31Z" level=debug msg="Configuration received from provider kubernetes: {\"frontends\":{\"noc.perl.org/\":{\"entryPoints\":[\"http\"],\"backend\":\"noc.perl.org/\",\"routes\":{\"/\":{\"rule\":\"PathPrefix:/\"},\"noc.perl.org\":{\"rule\":\"Host:noc.perl.org\"}},\"passHostHeader\":true,\"priority\":1},\"www.perl.org/\":{\"entryPoints\":[\"http\"],\"backend\":\"www.perl.org/\",\"routes\":{\"/\":{\"rule\":\"PathPrefix:/\"},\"www.perl.org\":{\"rule\":\"Host:www.perl.org\"}},\"passHostHeader\":true,\"priority\":1}}}"
time="2017-01-09T09:52:31Z" level=debug msg="Creating frontend noc.perl.org/"
time="2017-01-09T09:52:31Z" level=debug msg="Wiring frontend noc.perl.org/ to entryPoint http"
time="2017-01-09T09:52:31Z" level=debug msg="Creating route noc.perl.org Host:noc.perl.org"
time="2017-01-09T09:52:31Z" level=debug msg="Creating backend noc.perl.org/"
time="2017-01-09T09:52:31Z" level=error msg="Undefined backend 'noc.perl.org/' for frontend noc.perl.org/"
time="2017-01-09T09:52:31Z" level=error msg="Skipping frontend noc.perl.org/..."

A request with Host: noc.perl.org just gets a 404 page.

If I add another Ingress that doesn't match on Host then that works correctly (but I still get a 404 when requesting Host: noc.perl.org).

@abh
Copy link
Author

abh commented Jan 9, 2017

Aha - my mistake was that the port number in my ingress didn't match the service one. The error message could have been better, maybe?

Thank you for træfik. Closing the issue.

@abh abh closed this as completed Jan 9, 2017
@traefik traefik locked and limited conversation to collaborators Sep 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants