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

Rancher Ingress not initializing properly #7164

Closed
christianhuening opened this issue Dec 21, 2016 · 5 comments
Closed

Rancher Ingress not initializing properly #7164

christianhuening opened this issue Dec 21, 2016 · 5 comments

Comments

@christianhuening
Copy link

hint:
I think this relates to #7131 but with Kubernetes Environment instead of Cattle.

Rancher Version:
1.2.1
Docker Version:
1.12.3
OS and where are the hosts located? (cloud, bare metal, etc):
Ubuntu 16 LTS hosted on-prem, bare metal
Setup Details: (single node rancher vs. HA rancher, internal DB vs. external DB)
single node Rancher, internal DB
Environment Type: (Cattle/Kubernetes/Swarm/Mesos)
Kubernetes 1.5.1
Steps to Reproduce:
Deploy my Kubernetes App with a defined Ingress ressource.

Results:
Load Balancer gets started but stops with this message log:

21.12.2016 13:35:09time="2016-12-21T12:35:09Z" level=info msg="KUBERNETES_URL is not set, skipping init of kubernetes controller"
21.12.2016 13:35:09time="2016-12-21T12:35:09Z" level=info msg="Starting Rancher LB service"
21.12.2016 13:35:10time="2016-12-21T12:35:10Z" level=info msg="LB controller: rancher"
21.12.2016 13:35:10time="2016-12-21T12:35:10Z" level=info msg="LB provider: haproxy"
21.12.2016 13:35:10time="2016-12-21T12:35:10Z" level=info msg="starting rancher controller"
21.12.2016 13:35:10time="2016-12-21T12:35:10Z" level=info msg="Healthcheck handler is listening on :10241"
21.12.2016 13:35:11time="2016-12-21T12:35:11Z" level=info msg=" -- starting haproxy\n[ALERT] 355/123510 (37) : Starting frontend GLOBAL: cannot bind UNIX socket [/run/haproxy/admin.sock]\n"
21.12.2016 13:35:12time="2016-12-21T12:35:12Z" level=info msg=" -- reloading haproxy config with the new config changes\n[WARNING] 355/123512 (48) : config : 'option forwardfor' ignored for proxy 'default' as it requires HTTP mode.\n"

and as a result I can access my exposed web UI through the Ingress LB, but any further routing is not working.

Expected:
Ingress LB initializes properly and all ressources are accessable.

@pulberg
Copy link

pulberg commented Dec 21, 2016

I see the same error in an LB in a Cattle env -

12/21/2016 11:45:31 AMtime="2016-12-21T17:45:31Z" level=info msg="KUBERNETES_URL is not set, skipping init of kubernetes controller" 12/21/2016 11:45:32 AMtime="2016-12-21T17:45:32Z" level=info msg="Starting Rancher LB service" 12/21/2016 11:45:32 AMtime="2016-12-21T17:45:32Z" level=info msg="LB controller: rancher" 12/21/2016 11:45:32 AMtime="2016-12-21T17:45:32Z" level=info msg="LB provider: haproxy" 12/21/2016 11:45:32 AMtime="2016-12-21T17:45:32Z" level=info msg="starting rancher controller" 12/21/2016 11:45:32 AMtime="2016-12-21T17:45:32Z" level=info msg="Healthcheck handler is listening on :10241" 12/21/2016 11:45:33 AMtime="2016-12-21T17:45:33Z" level=info msg=" -- starting haproxy\n[ALERT] 355/174532 (27) : Starting frontend GLOBAL: cannot bind UNIX socket [/run/haproxy/admin.sock]\n"

@mheiniger
Copy link

Could be related to the startup scripts of HAproxy: rancher/lb-controller#56

@aemneina
Copy link

Closing due to inactivity. The ingress controller and lb has changed a lot. If you still can reproduce this behavior in a recent version please holler.

@Vespira
Copy link

Vespira commented Jun 1, 2017

Hi, I have typically the same issue with much newer version of Rancher and Kubernetes.

Rancher Version:
1.5.10
Docker Version:
1.12.6
OS and where are the hosts located? (cloud, bare metal, etc):
CoreOS 4.9.24 on private sub network
Setup Details: (single node rancher vs. HA rancher, internal DB vs. external DB)
HA Rancher, with external DB
Environment Type: (Cattle/Kubernetes/Swarm/Mesos)
Kubernetes 1.5.4
Steps to Reproduce:
Deploy my Kubernetes App with a defined Ingress ressource.

I have the same log as the initial post of this thread. I tried create the Ingress with this yaml file with:
>kubectl apply -f ingress.yml

file content:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: integration-ingress
spec:
  rules:
  - host: vm-docker1-dev.mycompany.com
    http:
      paths:
      - path: /purchases
        backend:
          serviceName: purchases
          servicePort: 8085
      - path: /products
        backend:
          serviceName: products
          servicePort: 8086
  - host: vm-docker2-dev.mycompany.com
    http:
      paths:
      - path: /purchases
        backend:
          serviceName: purchases
          servicePort: 8085
      - path: /products
        backend:
          serviceName: products
          servicePort: 8086

Can someone explain me how can we set this URL ? shouln't it be already done ? Thanks a lot !

@nathan-vp
Copy link

nathan-vp commented Jul 10, 2017

Initially I thought we encountered the same issue, but @superseb discovered a small typo in our YAML file - thanks for that!

@Vespira We run a newer version of Rancher, but for us the following YAML produces a working ingress. Can you try this?

demo-ingress.yml

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: nginx
  labels:
    name: nginx
spec:
 replicas: 3
 template:
   metadata:
     labels:
       app: nginx
   spec:
     containers:
     - name: nginx
       image: nginx
       ports:
       - containerPort: 80
---
kind: Service
apiVersion: v1
metadata:
  name: nginx
spec:
  selector:
    app: nginx
  ports:
  - port: 80
    targetPort: 80
    protocol: TCP
    name: http
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: ingress
  annotations:
    io.rancher.scheduler.global: "true"
spec:
  rules:
  - host: foo.bar.com
    http:
      paths:
      - backend:
          serviceName: nginx
          servicePort: 80

Apply: kubectl apply -f demo-ingress.yml

Our environment:

Rancher Version:
1.6.2
Docker Version:
1.12.6
OS and where are the hosts located? (cloud, bare metal, etc):
Ubuntu 14.04.5 LTS
Setup Details: (single node rancher vs. HA rancher, internal DB vs. external DB)
HA Rancher, external DB
Environment Type: (Cattle/Kubernetes/Swarm/Mesos)
Kubernetes 1.5.4

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

6 participants