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

connect() failed (111: Connection refused) while connecting to upstream #41

Closed
rawlingsj opened this issue Jul 26, 2016 · 32 comments
Closed

Comments

@rawlingsj
Copy link

After upgrading and building from master, (using config to increase server_names_hash_bucket_size + client_max_body_size) I'm not able to access my services via ingress routes.

The error I'm getting is..

[error] 26#26: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 10.36.5.79, server: gogs.default.beast.fabric8.io, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8181/", host: "gogs.default.beast.fabric8.io"

My Ingress looks like:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: gogs
spec:
  rules:
  - host: gogs.default.beast.fabric8.io
    http:
      paths:
      - backend:
          serviceName: gogs
          servicePort: 80
status:
  loadBalancer: {}

I can successfully access the gogs service from within the nginx ingress controller pod if I install curl and use the kubernetes service: curl http://gogs, so the cluster dns all seems to work fine.

By no means am I ruling out something I've done but I've checked a number of things and now out of ideas, I'm wondering if this upstream section in the logs is correct?

upstream default-gogs-gogs.default.beast.fabric8.io-gogs {

    server 127.0.0.1:8181;
}

The full log with the nginx config used and error at the bottom:

I0726 09:15:30.392509       1 nginx.go:234] Writing NGINX conf to /etc/nginx/nginx.conf

user  nginx;
worker_processes  1;

error_log  /var/log/nginx/error.log warn;
pid        /var/run/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    keepalive_timeout  65;

    #gzip  on;

    server_names_hash_max_size 1024;
    server_names_hash_bucket_size 512;

    include /etc/nginx/conf.d/*.conf;
}
I0726 09:15:30.393053       1 nginx.go:252] The main NGINX configuration file had been updated
I0726 09:15:30.393098       1 nginx.go:207] executing nginx
I0726 09:15:30.434586       1 controller.go:99] Adding service: elasticsearch
I0726 09:15:30.434629       1 controller.go:350] ignoring service elasticsearch: No ingress for service elasticsearch
I0726 09:15:30.434676       1 controller.go:99] Adding service: gogs-ssh
I0726 09:15:30.434680       1 controller.go:350] ignoring service gogs-ssh: No ingress for service gogs-ssh
I0726 09:15:30.434686       1 controller.go:99] Adding service: kube-dns
I0726 09:15:30.434689       1 controller.go:350] ignoring service kube-dns: No ingress for service kube-dns
I0726 09:15:30.434694       1 controller.go:99] Adding service: jenkinshift
I0726 09:15:30.434697       1 controller.go:350] ignoring service jenkinshift: No ingress for service jenkinshift
I0726 09:15:30.434709       1 controller.go:99] Adding service: kubernetes
I0726 09:15:30.434715       1 controller.go:350] ignoring service kubernetes: No ingress for service kubernetes
I0726 09:15:30.434720       1 controller.go:99] Adding service: nexus
I0726 09:15:30.434727       1 controller.go:350] ignoring service nexus: No ingress for service nexus
I0726 09:15:30.434732       1 controller.go:99] Adding service: elasticsearch-masters
I0726 09:15:30.434740       1 controller.go:350] ignoring service elasticsearch-masters: No ingress for service elasticsearch-masters
I0726 09:15:30.434745       1 controller.go:99] Adding service: fabric8-forge
I0726 09:15:30.434763       1 controller.go:350] ignoring service fabric8-forge: No ingress for service fabric8-forge
I0726 09:15:30.434770       1 controller.go:99] Adding service: grafana
I0726 09:15:30.434773       1 controller.go:350] ignoring service grafana: No ingress for service grafana
I0726 09:15:30.434780       1 controller.go:99] Adding service: kibana
I0726 09:15:30.434783       1 controller.go:350] ignoring service kibana: No ingress for service kibana
I0726 09:15:30.434792       1 controller.go:99] Adding service: prometheus
I0726 09:15:30.434796       1 controller.go:350] ignoring service prometheus: No ingress for service prometheus
I0726 09:15:30.434804       1 controller.go:99] Adding service: fabric8
I0726 09:15:30.434807       1 controller.go:350] ignoring service fabric8: No ingress for service fabric8
I0726 09:15:30.434816       1 controller.go:99] Adding service: gogs
I0726 09:15:30.434819       1 controller.go:350] ignoring service gogs: No ingress for service gogs
I0726 09:15:30.434829       1 controller.go:99] Adding service: jenkins-jnlp
I0726 09:15:30.434832       1 controller.go:350] ignoring service jenkins-jnlp: No ingress for service jenkins-jnlp
I0726 09:15:30.434837       1 controller.go:99] Adding service: fabric8-docker-registry
I0726 09:15:30.434862       1 controller.go:350] ignoring service fabric8-docker-registry: No ingress for service fabric8-docker-registry
I0726 09:15:30.434867       1 controller.go:99] Adding service: jenkins
I0726 09:15:30.434870       1 controller.go:350] ignoring service jenkins: No ingress for service jenkins
I0726 09:15:30.437675       1 controller.go:125] Adding endpoints: gogs-ssh
I0726 09:15:30.437707       1 controller.go:125] Adding endpoints: nexus
I0726 09:15:30.437713       1 controller.go:125] Adding endpoints: prometheus
I0726 09:15:30.437718       1 controller.go:125] Adding endpoints: elasticsearch-masters
I0726 09:15:30.437725       1 controller.go:125] Adding endpoints: fabric8-docker-registry
I0726 09:15:30.437730       1 controller.go:125] Adding endpoints: fabric8-forge
I0726 09:15:30.437734       1 controller.go:125] Adding endpoints: kube-controller-manager
I0726 09:15:30.437739       1 controller.go:125] Adding endpoints: kube-dns
I0726 09:15:30.437744       1 controller.go:125] Adding endpoints: elasticsearch
I0726 09:15:30.437750       1 controller.go:125] Adding endpoints: gogs
I0726 09:15:30.437755       1 controller.go:125] Adding endpoints: grafana
I0726 09:15:30.437759       1 controller.go:125] Adding endpoints: jenkins
I0726 09:15:30.437764       1 controller.go:125] Adding endpoints: kube-scheduler
I0726 09:15:30.437770       1 controller.go:125] Adding endpoints: fabric8
I0726 09:15:30.437778       1 controller.go:125] Adding endpoints: jenkins-jnlp
I0726 09:15:30.437782       1 controller.go:125] Adding endpoints: jenkinshift
I0726 09:15:30.437787       1 controller.go:125] Adding endpoints: kibana
I0726 09:15:30.437791       1 controller.go:125] Adding endpoints: kubernetes
I0726 09:15:30.437797       1 utils.go:70] Syncing default/gogs-ssh
I0726 09:15:30.437803       1 controller.go:257] Syncing endpoints default/gogs-ssh
I0726 09:15:30.437839       1 controller.go:350] ignoring service gogs-ssh: No ingress for service gogs-ssh
I0726 09:15:30.437845       1 utils.go:70] Syncing default/nexus
I0726 09:15:30.437848       1 controller.go:257] Syncing endpoints default/nexus
I0726 09:15:30.437852       1 controller.go:350] ignoring service nexus: No ingress for service nexus
I0726 09:15:30.437859       1 utils.go:70] Syncing default/prometheus
I0726 09:15:30.437862       1 controller.go:257] Syncing endpoints default/prometheus
I0726 09:15:30.437866       1 controller.go:350] ignoring service prometheus: No ingress for service prometheus
I0726 09:15:30.437870       1 utils.go:70] Syncing default/elasticsearch-masters
I0726 09:15:30.437872       1 controller.go:257] Syncing endpoints default/elasticsearch-masters
I0726 09:15:30.437876       1 controller.go:350] ignoring service elasticsearch-masters: No ingress for service elasticsearch-masters
I0726 09:15:30.437880       1 utils.go:70] Syncing default/fabric8-docker-registry
I0726 09:15:30.437882       1 controller.go:257] Syncing endpoints default/fabric8-docker-registry
I0726 09:15:30.437886       1 controller.go:350] ignoring service fabric8-docker-registry: No ingress for service fabric8-docker-registry
I0726 09:15:30.437890       1 utils.go:70] Syncing default/fabric8-forge
I0726 09:15:30.437892       1 controller.go:257] Syncing endpoints default/fabric8-forge
I0726 09:15:30.437896       1 controller.go:350] ignoring service fabric8-forge: No ingress for service fabric8-forge
I0726 09:15:30.437900       1 utils.go:70] Syncing kube-system/kube-controller-manager
I0726 09:15:30.437902       1 controller.go:257] Syncing endpoints kube-system/kube-controller-manager
I0726 09:15:30.437907       1 utils.go:70] Syncing kube-system/kube-dns
I0726 09:15:30.437909       1 controller.go:257] Syncing endpoints kube-system/kube-dns
I0726 09:15:30.437913       1 controller.go:350] ignoring service kube-dns: No ingress for service kube-dns
I0726 09:15:30.437919       1 utils.go:70] Syncing default/elasticsearch
I0726 09:15:30.437922       1 controller.go:257] Syncing endpoints default/elasticsearch
I0726 09:15:30.437926       1 controller.go:350] ignoring service elasticsearch: No ingress for service elasticsearch
I0726 09:15:30.437929       1 utils.go:70] Syncing default/gogs
I0726 09:15:30.437932       1 controller.go:257] Syncing endpoints default/gogs
I0726 09:15:30.437936       1 controller.go:350] ignoring service gogs: No ingress for service gogs
I0726 09:15:30.437939       1 utils.go:70] Syncing default/grafana
I0726 09:15:30.437942       1 controller.go:257] Syncing endpoints default/grafana
I0726 09:15:30.437946       1 controller.go:350] ignoring service grafana: No ingress for service grafana
I0726 09:15:30.437949       1 utils.go:70] Syncing default/jenkins
I0726 09:15:30.437952       1 controller.go:257] Syncing endpoints default/jenkins
I0726 09:15:30.437955       1 controller.go:350] ignoring service jenkins: No ingress for service jenkins
I0726 09:15:30.437959       1 utils.go:70] Syncing kube-system/kube-scheduler
I0726 09:15:30.437962       1 controller.go:257] Syncing endpoints kube-system/kube-scheduler
I0726 09:15:30.437965       1 utils.go:70] Syncing default/fabric8
I0726 09:15:30.437968       1 controller.go:257] Syncing endpoints default/fabric8
I0726 09:15:30.437972       1 controller.go:350] ignoring service fabric8: No ingress for service fabric8
I0726 09:15:30.437975       1 utils.go:70] Syncing default/jenkins-jnlp
I0726 09:15:30.437978       1 controller.go:257] Syncing endpoints default/jenkins-jnlp
I0726 09:15:30.437981       1 controller.go:350] ignoring service jenkins-jnlp: No ingress for service jenkins-jnlp
I0726 09:15:30.437985       1 utils.go:70] Syncing default/jenkinshift
I0726 09:15:30.437988       1 controller.go:257] Syncing endpoints default/jenkinshift
I0726 09:15:30.437993       1 controller.go:350] ignoring service jenkinshift: No ingress for service jenkinshift
I0726 09:15:30.437997       1 utils.go:70] Syncing default/kibana
I0726 09:15:30.438000       1 controller.go:257] Syncing endpoints default/kibana
I0726 09:15:30.438003       1 controller.go:350] ignoring service kibana: No ingress for service kibana
I0726 09:15:30.438007       1 utils.go:70] Syncing default/kubernetes
I0726 09:15:30.438009       1 controller.go:257] Syncing endpoints default/kubernetes
I0726 09:15:30.438013       1 controller.go:350] ignoring service kubernetes: No ingress for service kubernetes
I0726 09:15:30.438149       1 controller.go:73] Adding Ingress: gogs
I0726 09:15:30.438168       1 utils.go:70] Syncing default/gogs
I0726 09:15:30.438174       1 controller.go:316] Syncing default/gogs
I0726 09:15:30.438179       1 controller.go:331] Adding or Updating Ingress: default/gogs
I0726 09:15:30.438218       1 nginx.go:110] Updating NGINX configuration
I0726 09:15:30.438579       1 nginx.go:156] Writing NGINX conf to /etc/nginx/conf.d/default-gogs.conf

upstream default-gogs-gogs.default.beast.fabric8.io-gogs {

    server 127.0.0.1:8181;
}


server {
    listen 80;



    server_name gogs.default.beast.fabric8.io;





    location / {
        proxy_connect_timeout 60s;
        proxy_read_timeout 60s;
        client_max_body_size 2000m;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Host $host;
        proxy_set_header X-Forwarded-Port $server_port;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_pass http://default-gogs-gogs.default.beast.fabric8.io-gogs;
    }
}
I0726 09:15:30.439027       1 nginx.go:176] NGINX configuration file had been updated
I0726 09:15:30.439044       1 nginx.go:207] executing nginx -s reload
2016/07/26 09:15:30 [notice] 21#21: signal process started
I0726 09:15:30.456051       1 controller.go:160] Adding ConfigMap: nginx-config
I0726 09:15:30.456121       1 utils.go:70] Syncing default/nginx-config
I0726 09:15:30.456129       1 controller.go:279] Syncing configmap default/nginx-config
I0726 09:15:30.456265       1 nginx.go:234] Writing NGINX conf to /etc/nginx/nginx.conf

user  nginx;
worker_processes  1;

error_log  /var/log/nginx/error.log warn;
pid        /var/run/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

I0726 09:15:30.456419       1 nginx.go:252] The main NGINX configuration file had been updated
    access_log  /var/log/nginx/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    keepalive_timeout  65;

    #gzip  on;

    server_names_hash_max_size 1024;
    server_names_hash_bucket_size 256;

    include /etc/nginx/conf.d/*.conf;
}
I0726 09:15:30.456468       1 utils.go:70] Syncing default/gogs
I0726 09:15:30.456489       1 controller.go:316] Syncing default/gogs
I0726 09:15:30.456494       1 controller.go:331] Adding or Updating Ingress: default/gogs
I0726 09:15:30.456505       1 nginx.go:110] Updating NGINX configuration
I0726 09:15:30.456715       1 nginx.go:156] Writing NGINX conf to /etc/nginx/conf.d/default-gogs.conf

upstream default-gogs-gogs.default.beast.fabric8.io-gogs {

    server 127.0.0.1:8181;
}


server {
    listen 80;



    server_name gogs.default.beast.fabric8.io;





    location / {
        proxy_connect_timeout 10s;
        proxy_read_timeout 10s;
        client_max_body_size 2000m;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Host $host;
        proxy_set_header X-Forwarded-Port $server_port;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_pass http://default-gogs-gogs.default.beast.fabric8.io-gogs;
    }
}
I0726 09:15:30.456979       1 nginx.go:176] NGINX configuration file had been updated
I0726 09:15:30.457230       1 nginx.go:207] executing nginx -s reload
2016/07/26 09:15:30 [notice] 25#25: signal process started
I0726 09:15:30.500502       1 controller.go:136] Endpoints kube-scheduler changed, syncing
I0726 09:15:30.500525       1 utils.go:70] Syncing kube-system/kube-scheduler
I0726 09:15:30.500529       1 controller.go:257] Syncing endpoints kube-system/kube-scheduler
I0726 09:15:32.522029       1 controller.go:136] Endpoints kube-controller-manager changed, syncing
I0726 09:15:32.522068       1 utils.go:70] Syncing kube-system/kube-controller-manager
I0726 09:15:32.522074       1 controller.go:257] Syncing endpoints kube-system/kube-controller-manager
I0726 09:15:32.716975       1 controller.go:136] Endpoints kube-scheduler changed, syncing
I0726 09:15:32.717006       1 utils.go:70] Syncing kube-system/kube-scheduler
I0726 09:15:32.717011       1 controller.go:257] Syncing endpoints kube-system/kube-scheduler
2016/07/26 09:15:34 [error] 26#26: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 10.36.5.79, server: gogs.default.beast.fabric8.io, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8181/", host: "gogs.default.beast.fabric8.io"
10.36.5.79 - - [26/Jul/2016:09:15:34 +0000] "GET / HTTP/1.1" 502 575 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36" "-"
2016/07/26 09:15:34 [error] 26#26: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 10.36.5.79, server: gogs.default.beast.fabric8.io, request: "GET /favicon.ico HTTP/1.1", upstream: "http://127.0.0.1:8181/favicon.ico", host: "gogs.default.beast.fabric8.io", referrer: "http://gogs.default.beast.fabric8.io/"
10.36.5.79 - - [26/Jul/2016:09:15:34 +0000] "GET /favicon.ico HTTP/1.1" 502 575 "http://gogs.default.beast.fabric8.io/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36" "-"
I0726 09:15:34.618370       1 controller.go:136] Endpoints kube-controller-manager changed, syncing
@rawlingsj
Copy link
Author

I've just gone back to the previous nginx controller I was using based on git sha 3138c71 and this works (although now I can't override the server_names_hash_bucket_size as it's an old version which causes a different issue) however I can see that the nginx config upstream section does in fact have the correct gogs kubernetes service IP and not server 127.0.0.1:8181; as the latest version from the logs above does.

So I'm thinking this is bug in the nginx controller?

upstream default-gogs-gogs.default.beast.fabric8.io-gogs {

    server 10.233.20.156:80;
}

server {
    listen 80;
    client_max_body_size 2000M;

  server_name gogs.default.beast.fabric8.io;

  location / {
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Host $host;
    proxy_set_header X-Forwarded-Port $server_port;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_pass http://default-gogs-gogs.default.beast.fabric8.io-gogs;
  }
}

@rawlingsj
Copy link
Author

I've just tested the last two versioned nginx-ingress images and checked the upstream sections. They do in fact differ and the 0.3 doesn't have the correct Kubernetes service IP, so I suspect this is a recent regression.

Both were tested using the exact same ingress rule.

nginxdemos/nginx-ingress:0.3

I0726 10:40:13.536967       1 nginx.go:140] Writing NGINX conf to /etc/nginx/conf.d/default-gogs.conf

upstream default-gogs-gogs.default.beast.fabric8.io-gogs {

    server 127.0.0.1:8181;
}

nginxdemos/nginx-ingress:0.2

I0726 10:40:13.542624       1 nginx.go:140] Writing NGINX conf to /etc/nginx/conf.d/default-gogs.conf

upstream default-gogs-gogs.default.beast.fabric8.io-gogs {

    server 10.233.20.156:80;
}

@rawlingsj
Copy link
Author

rawlingsj commented Jul 26, 2016

I tracked it down to this code here https://github.com/nginxinc/kubernetes-ingress/blob/master/nginx-controller/nginx/configurator.go#L210

The port.Port and servicePort don't match, in my gogs example the values are:

port.Port=3000
servicePort=80

This is reflected in the gogs service..

apiVersion: v1
kind: Service
metadata:
  annotations:
    fabric8.io/iconUrl: https://cdn.rawgit.com/fabric8io/fabric8-devops/master/gogs/src/main/fabric8/icon.png
  labels:
    group: io.fabric8.devops.apps
    package: cd-pipeline
    project: gogs
    provider: fabric8
    version: 2.2.218
  name: gogs
  namespace: default
spec:
  clusterIP: 10.233.20.156
  ports:
  - nodePort: 31095
    port: 80
    protocol: TCP
    targetPort: 3000
  selector:
    group: io.fabric8.devops.apps
    project: gogs
    provider: fabric8
  sessionAffinity: None
  type: LoadBalancer
status:
  loadBalancer: {}

It looks like the nginx-controller code gets the port.Port from the kubernetes endpoints and when I check that from the CLI it does in fact use the service targetPort and not the port..

kubectl get endpoints
NAME                      ENDPOINTS             AGE
gogs                      10.233.110.2:3000     1d

@rawlingsj
Copy link
Author

So it's definitely an issue where the nginx-controller is using the kubernetes Endpoints resource to set the nginx upstream config ip address and port which is incorrect. Certainly in my setup the Endpoints use the pod ip and port not the kubernetes Service ip and port which should be used for pod to pod communication.

So either:

Could someone take a look to confirm if indeed these are the two options please, if it's the latter I'd expect everyone to be affected by it. Thanks in advance.

@pleshakov
Copy link
Contributor

Thanks for the thorough investigation!

this is a problem with my cluster where for some reason kubectl get endpoints returns the pod ip + port and not the kubernetes service details

an endpoint must contain the IP address of a pod + targetPort . The output from kubectl get endpoints command looks correct.

or the nginx-controller should set the upstream section of the nginx config to the kubernetes service and not get the details from the endpoints https://github.com/nginxinc/kubernetes-ingress/blob/master/nginx-controller/nginx/configurator.go#L188

This is a bug in the controller, it should've used the target port instead of service port.

As a temporal workaround I suggest to change the port in your Ingress resouce from the service port 80 to the targetport 3000. Does it help? In the mean time I provide a bug fix

@rawlingsj
Copy link
Author

Yes changing the Ingress servicePort to match the targetPort works, this is a decent workaround, thanks.

rawlingsj added a commit to rawlingsj/gofabric8 that referenced this issue Jul 27, 2016
@ahume
Copy link

ahume commented Sep 1, 2016

I think I'm seeing this same issue but noticed via another symptom. Because requests aren't forwarded to the Service IP:port, they are not load-balanced across pods. All requests into the load balancer are forwarded to a single pod.

(Also, how do I configure the Controller to output the more detailed logs, as in the comments above?)

@pleshakov
Copy link
Contributor

the port mapping issue was fixed in #54

@rawlingsj
Copy link
Author

thanks @pleshakov

Can I just check something please? Has that fix been released in dockerhub? Only our GKE instances have started to fail for new deployments and I'm wondering if this fix has been pushed and replaced the 0.3 tag in dockerhub?

@pleshakov
Copy link
Contributor

@rawlingsj

yes, it did get pushed to the dockerhub. Is the failing related to the port mapping?

I will update the tag 0.3 to the previous version and push the new one with the 0.3.1 tag, since the update may affect some users because of the port mapping changes. Thanks for pointing that out!

@const-bon
Copy link

The issue with incorrect upstream is still present.

@const-bon
Copy link

const-bon commented Oct 13, 2016

[root@localhost ~]# kubectl logs ingress-nginx-1948358904-sqhb4 --namespace=fabric8-system
\I1013 21:03:35.436652       1 nginx.go:240] Writing NGINX conf to /etc/nginx/nginx.conf
user  nginx;
worker_processes  1;
error_log  /var/log/nginx/error.log warn;
pid        /var/run/nginx.pid;
events {
    worker_connections  1024;
}
http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;
    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';
    access_log  /var/log/nginx/access.log  main;
    sendfile        on;
    #tcp_nopush     on;
    keepalive_timeout  65;
    #gzip  on;
    server_names_hash_max_size 512;

    map $http_upgrade $connection_upgrade {
        default upgrade;
        ''      close;
    }
    include /etc/nginx/conf.d/*.conf;
}
I1013 21:03:35.442537       1 nginx.go:258] The main NGINX configuration file had been updated
I1013 21:03:35.442591       1 nginx.go:213] executing nginx
I1013 21:03:37.706976       1 controller.go:143] Adding endpoints: fabric8-docker-registry
I1013 21:03:37.706995       1 controller.go:143] Adding endpoints: fabric8-forge
I1013 21:03:37.707002       1 controller.go:143] Adding endpoints: gogs
I1013 21:03:37.707007       1 controller.go:143] Adding endpoints: kubernetes
I1013 21:03:37.707012       1 controller.go:143] Adding endpoints: heapster
I1013 21:03:37.707017       1 controller.go:143] Adding endpoints: monitoring-grafana
I1013 21:03:37.707022       1 controller.go:143] Adding endpoints: monitoring-influxdb
I1013 21:03:37.707027       1 controller.go:143] Adding endpoints: jenkinshift
I1013 21:03:37.707033       1 controller.go:143] Adding endpoints: jenkins
I1013 21:03:37.707040       1 controller.go:143] Adding endpoints: jenkins-jnlp
I1013 21:03:37.707045       1 controller.go:143] Adding endpoints: elasticsearch-logging
I1013 21:03:37.707050       1 controller.go:143] Adding endpoints: kibana-logging
I1013 21:03:37.707055       1 controller.go:143] Adding endpoints: kube-dns
I1013 21:03:37.707062       1 controller.go:143] Adding endpoints: nexus
I1013 21:03:37.707095       1 controller.go:143] Adding endpoints: kubedash
I1013 21:03:37.707101       1 controller.go:143] Adding endpoints: kubernetes-dashboard
I1013 21:03:37.707106       1 controller.go:143] Adding endpoints: fabric8
I1013 21:03:37.707111       1 controller.go:143] Adding endpoints: gogs-ssh
I1013 21:03:37.707118       1 utils.go:70] Syncing fabric8/fabric8-docker-registry
I1013 21:03:37.707125       1 controller.go:275] Syncing endpoints fabric8/fabric8-docker-registry
I1013 21:03:37.707132       1 utils.go:70] Syncing fabric8/fabric8-forge
I1013 21:03:37.707135       1 controller.go:275] Syncing endpoints fabric8/fabric8-forge
I1013 21:03:37.707139       1 utils.go:70] Syncing fabric8/gogs
I1013 21:03:37.707142       1 controller.go:275] Syncing endpoints fabric8/gogs
I1013 21:03:37.707146       1 utils.go:70] Syncing default/kubernetes
I1013 21:03:37.707149       1 controller.go:275] Syncing endpoints default/kubernetes
I1013 21:03:37.707153       1 utils.go:70] Syncing kube-system/heapster
I1013 21:03:37.707155       1 controller.go:275] Syncing endpoints kube-system/heapster
I1013 21:03:37.707160       1 utils.go:70] Syncing kube-system/monitoring-grafana
I1013 21:03:37.707162       1 controller.go:275] Syncing endpoints kube-system/monitoring-grafana
I1013 21:03:37.707166       1 utils.go:70] Syncing kube-system/monitoring-influxdb
I1013 21:03:37.707169       1 controller.go:275] Syncing endpoints kube-system/monitoring-influxdb
I1013 21:03:37.707173       1 utils.go:70] Syncing fabric8/jenkinshift
I1013 21:03:37.707175       1 controller.go:275] Syncing endpoints fabric8/jenkinshift
I1013 21:03:37.707179       1 utils.go:70] Syncing fabric8/jenkins
I1013 21:03:37.707182       1 controller.go:275] Syncing endpoints fabric8/jenkins
I1013 21:03:37.707186       1 utils.go:70] Syncing fabric8/jenkins-jnlp
I1013 21:03:37.707188       1 controller.go:275] Syncing endpoints fabric8/jenkins-jnlp
I1013 21:03:37.707192       1 utils.go:70] Syncing kube-system/elasticsearch-logging
I1013 21:03:37.707195       1 controller.go:275] Syncing endpoints kube-system/elasticsearch-logging
I1013 21:03:37.707199       1 utils.go:70] Syncing kube-system/kibana-logging
I1013 21:03:37.707202       1 controller.go:275] Syncing endpoints kube-system/kibana-logging
I1013 21:03:37.707206       1 utils.go:70] Syncing kube-system/kube-dns
I1013 21:03:37.707208       1 controller.go:275] Syncing endpoints kube-system/kube-dns
I1013 21:03:37.707212       1 utils.go:70] Syncing fabric8/nexus
I1013 21:03:37.707215       1 controller.go:275] Syncing endpoints fabric8/nexus
I1013 21:03:37.707219       1 utils.go:70] Syncing kube-system/kubedash
I1013 21:03:37.707221       1 controller.go:275] Syncing endpoints kube-system/kubedash
I1013 21:03:37.707225       1 utils.go:70] Syncing kube-system/kubernetes-dashboard
I1013 21:03:37.707228       1 controller.go:275] Syncing endpoints kube-system/kubernetes-dashboard
I1013 21:03:37.707352       1 utils.go:70] Syncing fabric8/fabric8
I1013 21:03:37.707359       1 controller.go:275] Syncing endpoints fabric8/fabric8
I1013 21:03:37.707365       1 utils.go:70] Syncing fabric8/gogs-ssh
I1013 21:03:37.707368       1 controller.go:275] Syncing endpoints fabric8/gogs-ssh
I1013 21:03:37.709512       1 controller.go:85] Adding Ingress: fabric8
I1013 21:03:37.709591       1 controller.go:85] Adding Ingress: gogs-ssh
I1013 21:03:37.709601       1 controller.go:85] Adding Ingress: jenkins-jnlp
I1013 21:03:37.709607       1 controller.go:85] Adding Ingress: jenkinshift
I1013 21:03:37.709612       1 controller.go:85] Adding Ingress: nexus
I1013 21:03:37.709618       1 controller.go:85] Adding Ingress: fabric8-docker-registry
I1013 21:03:37.709623       1 controller.go:85] Adding Ingress: fabric8-forge
I1013 21:03:37.709676       1 controller.go:85] Adding Ingress: jenkins
I1013 21:03:37.709690       1 controller.go:85] Adding Ingress: gogs
I1013 21:03:37.709699       1 utils.go:70] Syncing fabric8/fabric8
I1013 21:03:37.709703       1 controller.go:334] Syncing fabric8/fabric8
I1013 21:03:37.709708       1 controller.go:349] Adding or Updating Ingress: fabric8/fabric8
I1013 21:03:37.709789       1 controller.go:436] Error getting service fabric8: service fabric8/fabric8 doesn't exists
W1013 21:03:37.709801       1 controller.go:423] Error retrieving endpoints for the service fabric8: service fabric8/fabric8 doesn't exists
I1013 21:03:37.709823       1 nginx.go:108] Updating NGINX configuration
upstream fabric8-fabric8-fabric8.fabric8.cluster.local-fabric8 {

        server 127.0.0.1:8181;
}
server {
        listen 80;


        server_name fabric8.fabric8.cluster.local;



        location / {
                proxy_http_version 1.1;

                proxy_connect_timeout 60s;
                proxy_read_timeout 60s;
                client_max_body_size 1m;
                proxy_set_header Host $host;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-Forwarded-Host $host;
                proxy_set_header X-Forwarded-Port $server_port;
                proxy_set_header X-Forwarded-Proto $scheme;
                proxy_pass http://fabric8-fabric8-fabric8.fabric8.cluster.local-fabric8;
        }
}
I1013 21:03:37.719800       1 nginx.go:154] Writing NGINX conf to /etc/nginx/conf.d/fabric8-fabric8.conf
I1013 21:03:37.720050       1 controller.go:117] Adding service: jenkins
I1013 21:03:37.720076       1 controller.go:117] Adding service: monitoring-influxdb
I1013 21:03:37.720105       1 controller.go:368] ignoring service monitoring-influxdb: No ingress for service monitoring-influxdb
I1013 21:03:37.720113       1 controller.go:117] Adding service: fabric8-docker-registry
I1013 21:03:37.720120       1 controller.go:117] Adding service: fabric8-forge
I1013 21:03:37.720127       1 controller.go:117] Adding service: gogs-ssh
I1013 21:03:37.720134       1 controller.go:117] Adding service: jenkins-jnlp
I1013 21:03:37.720159       1 controller.go:117] Adding service: kubernetes-dashboard
I1013 21:03:37.720164       1 controller.go:368] ignoring service kubernetes-dashboard: No ingress for service kubernetes-dashboard
I1013 21:03:37.720169       1 controller.go:117] Adding service: fabric8
I1013 21:03:37.720178       1 controller.go:117] Adding service: gogs
I1013 21:03:37.720185       1 controller.go:117] Adding service: jenkinshift
I1013 21:03:37.720192       1 controller.go:117] Adding service: nexus
I1013 21:03:37.720199       1 controller.go:117] Adding service: elasticsearch-logging
I1013 21:03:37.720203       1 controller.go:368] ignoring service elasticsearch-logging: No ingress for service elasticsearch-logging
I1013 21:03:37.720208       1 controller.go:117] Adding service: kube-dns
I1013 21:03:37.720212       1 controller.go:368] ignoring service kube-dns: No ingress for service kube-dns
I1013 21:03:37.720219       1 controller.go:117] Adding service: kubedash
I1013 21:03:37.720224       1 controller.go:368] ignoring service kubedash: No ingress for service kubedash
I1013 21:03:37.720228       1 controller.go:117] Adding service: monitoring-grafana
I1013 21:03:37.720297       1 controller.go:368] ignoring service monitoring-grafana: No ingress for service monitoring-grafana
I1013 21:03:37.720307       1 controller.go:117] Adding service: kubernetes
I1013 21:03:37.720312       1 controller.go:368] ignoring service kubernetes: No ingress for service kubernetes
I1013 21:03:37.720316       1 controller.go:117] Adding service: heapster
I1013 21:03:37.720321       1 controller.go:368] ignoring service heapster: No ingress for service heapster
I1013 21:03:37.720325       1 controller.go:117] Adding service: kibana-logging
I1013 21:03:37.720329       1 controller.go:368] ignoring service kibana-logging: No ingress for service kibana-logging
I1013 21:03:37.722619       1 controller.go:178] Adding ConfigMap: nginx-config
I1013 21:03:37.722736       1 utils.go:70] Syncing fabric8-system/nginx-config
I1013 21:03:37.722746       1 controller.go:297] Syncing configmap fabric8-system/nginx-config
I1013 21:03:37.723439       1 nginx.go:174] NGINX configuration file had been updated
I1013 21:03:37.723553       1 nginx.go:213] executing nginx -t
I1013 21:03:37.757461       1 nginx.go:213] executing nginx -s reload
2016/10/13 21:03:37 [notice] 19#19: signal process started
I1013 21:03:37.764115       1 utils.go:70] Syncing fabric8/gogs-ssh
I1013 21:03:37.764159       1 controller.go:334] Syncing fabric8/gogs-ssh
I1013 21:03:37.764173       1 controller.go:349] Adding or Updating Ingress: fabric8/gogs-ssh
I1013 21:03:37.764218       1 controller.go:448] Error getting endpoints for service gogs-ssh port {0 2222 }: No port {0 2222 } in service gogs-ssh
W1013 21:03:37.764459       1 controller.go:423] Error retrieving endpoints for the service gogs-ssh: No port {0 2222 } in service gogs-ssh
I1013 21:03:37.764497       1 nginx.go:108] Updating NGINX configuration
I1013 21:03:37.767371       1 nginx.go:154] Writing NGINX conf to /etc/nginx/conf.d/fabric8-gogs-ssh.conf
I1013 21:03:37.768007       1 nginx.go:174] NGINX configuration file had been updated
I1013 21:03:37.768084       1 nginx.go:213] executing nginx -t
upstream fabric8-gogs-ssh-gogs-ssh.fabric8.cluster.local-gogs-ssh {

        server 127.0.0.1:8181;
}
server {
        listen 80;


        server_name gogs-ssh.fabric8.cluster.local;



        location / {
                proxy_http_version 1.1;

                proxy_connect_timeout 60s;
                proxy_read_timeout 60s;
                client_max_body_size 1m;
                proxy_set_header Host $host;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-Forwarded-Host $host;
                proxy_set_header X-Forwarded-Port $server_port;
                proxy_set_header X-Forwarded-Proto $scheme;
                proxy_pass http://fabric8-gogs-ssh-gogs-ssh.fabric8.cluster.local-gogs-ssh;
        }
}
I1013 21:03:37.785456       1 nginx.go:213] executing nginx -s reload
2016/10/13 21:03:37 [notice] 24#24: signal process started
I1013 21:03:37.793741       1 utils.go:70] Syncing fabric8/jenkins-jnlp
I1013 21:03:37.793762       1 controller.go:334] Syncing fabric8/jenkins-jnlp
I1013 21:03:37.793771       1 controller.go:349] Adding or Updating Ingress: fabric8/jenkins-jnlp
I1013 21:03:37.793815       1 nginx.go:108] Updating NGINX configuration
I1013 21:03:37.794099       1 nginx.go:154] Writing NGINX conf to /etc/nginx/conf.d/fabric8-jenkins-jnlp.conf
I1013 21:03:37.794727       1 nginx.go:174] NGINX configuration file had been updated
I1013 21:03:37.794774       1 nginx.go:213] executing nginx -t
upstream fabric8-jenkins-jnlp-jenkins-jnlp.fabric8.cluster.local-jenkins-jnlp {

        server 172.16.82.9:50000;
}
server {
        listen 80;


        server_name jenkins-jnlp.fabric8.cluster.local;



        location / {
                proxy_http_version 1.1;

                proxy_connect_timeout 60s;
                proxy_read_timeout 60s;
                client_max_body_size 1m;
                proxy_set_header Host $host;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-Forwarded-Host $host;
                proxy_set_header X-Forwarded-Port $server_port;
                proxy_set_header X-Forwarded-Proto $scheme;
                proxy_pass http://fabric8-jenkins-jnlp-jenkins-jnlp.fabric8.cluster.local-jenkins-jnlp;
        }
}
I1013 21:03:37.803803       1 nginx.go:213] executing nginx -s reload
2016/10/13 21:03:37 [notice] 28#28: signal process started
I1013 21:03:37.813758       1 utils.go:70] Syncing fabric8/jenkinshift
I1013 21:03:37.813785       1 controller.go:334] Syncing fabric8/jenkinshift
I1013 21:03:37.813794       1 controller.go:349] Adding or Updating Ingress: fabric8/jenkinshift
I1013 21:03:37.813832       1 controller.go:448] Error getting endpoints for service jenkinshift port {0 9191 }: No port {0 9191 } in service jenkinshift
W1013 21:03:37.813842       1 controller.go:423] Error retrieving endpoints for the service jenkinshift: No port {0 9191 } in service jenkinshift
I1013 21:03:37.814002       1 nginx.go:108] Updating NGINX configuration
upstream fabric8-jenkinshift-jenkinshift.fabric8.cluster.local-jenkinshift {

        server 127.0.0.1:8181;
}
server {
        listen 80;


        server_name jenkinshift.fabric8.cluster.local;



        location / {
                proxy_http_version 1.1;

                proxy_connect_timeout 60s;
                proxy_read_timeout 60s;
                client_max_body_size 1m;
                proxy_set_header Host $host;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-Forwarded-Host $host;
                proxy_set_header X-Forwarded-Port $server_port;
                proxy_set_header X-Forwarded-Proto $scheme;
                proxy_pass http://fabric8-jenkinshift-jenkinshift.fabric8.cluster.local-jenkinshift;
        }
}
I1013 21:03:37.814425       1 nginx.go:154] Writing NGINX conf to /etc/nginx/conf.d/fabric8-jenkinshift.conf
I1013 21:03:37.814861       1 nginx.go:174] NGINX configuration file had been updated
I1013 21:03:37.814882       1 nginx.go:213] executing nginx -t
I1013 21:03:37.824927       1 nginx.go:213] executing nginx -s reload
2016/10/13 21:03:37 [notice] 32#32: signal process started
I1013 21:03:37.832921       1 utils.go:70] Syncing fabric8/nexus
I1013 21:03:37.832954       1 controller.go:334] Syncing fabric8/nexus
I1013 21:03:37.832967       1 controller.go:349] Adding or Updating Ingress: fabric8/nexus
I1013 21:03:37.833026       1 controller.go:448] Error getting endpoints for service nexus port {0 8081 }: No port {0 8081 } in service nexus
W1013 21:03:37.833042       1 controller.go:423] Error retrieving endpoints for the service nexus: No port {0 8081 } in service nexus
I1013 21:03:37.833066       1 nginx.go:108] Updating NGINX configuration
upstream fabric8-nexus-nexus.fabric8.cluster.local-nexus {

        server 127.0.0.1:8181;
}
server {
        listen 80;


        server_name nexus.fabric8.cluster.local;



        location / {
                proxy_http_version 1.1;

                proxy_connect_timeout 60s;
                proxy_read_timeout 60s;
                client_max_body_size 1m;
                proxy_set_header Host $host;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-Forwarded-Host $host;
                proxy_set_header X-Forwarded-Port $server_port;
                proxy_set_header X-Forwarded-Proto $scheme;
                proxy_pass http://fabric8-nexus-nexus.fabric8.cluster.local-nexus;
        }
}
I1013 21:03:37.833672       1 nginx.go:154] Writing NGINX conf to /etc/nginx/conf.d/fabric8-nexus.conf
I1013 21:03:37.834196       1 nginx.go:174] NGINX configuration file had been updated
I1013 21:03:37.834218       1 nginx.go:213] executing nginx -t
I1013 21:03:37.849163       1 nginx.go:213] executing nginx -s reload
2016/10/13 21:03:37 [notice] 36#36: signal process started
I1013 21:03:37.857008       1 utils.go:70] Syncing fabric8/fabric8-docker-registry
I1013 21:03:37.857671       1 controller.go:334] Syncing fabric8/fabric8-docker-registry
I1013 21:03:37.857689       1 controller.go:349] Adding or Updating Ingress: fabric8/fabric8-docker-registry
I1013 21:03:37.857720       1 nginx.go:240] Writing NGINX conf to /etc/nginx/nginx.conf
I1013 21:03:37.857722       1 controller.go:448] Error getting endpoints for service fabric8-docker-registry port {0 5000 }: No port {0 5000 } in service fabric8-docker-registry
W1013 21:03:37.857783       1 controller.go:423] Error retrieving endpoints for the service fabric8-docker-registry: No port {0 5000 } in service fabric8-docker-registry
user  nginx;
worker_processes  1;
error_log  /var/log/nginx/error.log warn;
pid        /var/run/nginx.pid;
events {
    worker_connections  1024;
}
http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;
    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';
    access_log  /var/log/nginx/access.log  main;
    sendfile        on;
    #tcp_nopush     on;
    keepalive_timeout  65;
    #gzip  on;
    server_names_hash_max_size 1024;
    server_names_hash_bucket_size 256;
    map $http_upgrade $connection_upgrade {
        default upgrade;
        ''      close;
    }
    include /etc/nginx/conf.d/*.conf;
}
upstream fabric8-fabric8-docker-registry-fabric8-docker-registry.fabric8.cluster.local-fabric8-docker-registry {

        server 127.0.0.1:8181;
}
server {
        listen 80;


        server_name fabric8-docker-registry.fabric8.cluster.local;



        location / {
                proxy_http_version 1.1;

                proxy_connect_timeout 10s;
                proxy_read_timeout 10s;
                client_max_body_size 2000m;
                proxy_set_header Host $host;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-Forwarded-Host $host;
                proxy_set_header X-Forwarded-Port $server_port;
                proxy_set_header X-Forwarded-Proto $scheme;
                proxy_pass http://fabric8-fabric8-docker-registry-fabric8-docker-registry.fabric8.cluster.local-fabric8-docker-registry;
        }
}
I1013 21:03:37.857911       1 nginx.go:258] The main NGINX configuration file had been updated
I1013 21:03:37.858166       1 nginx.go:108] Updating NGINX configuration
I1013 21:03:37.858520       1 nginx.go:154] Writing NGINX conf to /etc/nginx/conf.d/fabric8-fabric8-docker-registry.conf
I1013 21:03:37.859125       1 nginx.go:174] NGINX configuration file had been updated
I1013 21:03:37.859141       1 nginx.go:213] executing nginx -t
I1013 21:03:37.882220       1 nginx.go:213] executing nginx -s reload
2016/10/13 21:03:37 [notice] 41#41: signal process started
I1013 21:03:37.891204       1 utils.go:70] Syncing fabric8/fabric8-forge
I1013 21:03:37.891228       1 controller.go:334] Syncing fabric8/fabric8-forge
I1013 21:03:37.891267       1 controller.go:349] Adding or Updating Ingress: fabric8/fabric8-forge
I1013 21:03:37.891302       1 controller.go:448] Error getting endpoints for service fabric8-forge port {0 8080 }: No port {0 8080 } in service fabric8-forge
W1013 21:03:37.891311       1 controller.go:423] Error retrieving endpoints for the service fabric8-forge: No port {0 8080 } in service fabric8-forge
I1013 21:03:37.891327       1 nginx.go:108] Updating NGINX configuration
I1013 21:03:37.891955       1 nginx.go:154] Writing NGINX conf to /etc/nginx/conf.d/fabric8-fabric8-forge.conf
upstream fabric8-fabric8-forge-fabric8-forge.fabric8.cluster.local-fabric8-forge {

        server 127.0.0.1:8181;
}
server {
        listen 80;


        server_name fabric8-forge.fabric8.cluster.local;



        location / {
                proxy_http_version 1.1;

                proxy_connect_timeout 10s;
                proxy_read_timeout 10s;
                client_max_body_size 2000m;
                proxy_set_header Host $host;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-Forwarded-Host $host;
                proxy_set_header X-Forwarded-Port $server_port;
                proxy_set_header X-Forwarded-Proto $scheme;
                proxy_pass http://fabric8-fabric8-forge-fabric8-forge.fabric8.cluster.local-fabric8-forge;
        }
}
I1013 21:03:37.893166       1 nginx.go:174] NGINX configuration file had been updated
I1013 21:03:37.893184       1 nginx.go:213] executing nginx -t
I1013 21:03:37.909329       1 nginx.go:213] executing nginx -s reload
2016/10/13 21:03:37 [notice] 45#45: signal process started
I1013 21:03:37.918322       1 utils.go:70] Syncing fabric8/jenkins
I1013 21:03:37.918356       1 controller.go:334] Syncing fabric8/jenkins
I1013 21:03:37.918368       1 controller.go:349] Adding or Updating Ingress: fabric8/jenkins
I1013 21:03:37.918407       1 controller.go:448] Error getting endpoints for service jenkins port {0 8080 }: No port {0 8080 } in service jenkins
W1013 21:03:37.918416       1 controller.go:423] Error retrieving endpoints for the service jenkins: No port {0 8080 } in service jenkins
I1013 21:03:37.918437       1 nginx.go:108] Updating NGINX configuration
I1013 21:03:37.918693       1 nginx.go:154] Writing NGINX conf to /etc/nginx/conf.d/fabric8-jenkins.conf
upstream fabric8-jenkins-jenkins.fabric8.cluster.local-jenkins {

        server 127.0.0.1:8181;
}
server {
        listen 80;


        server_name jenkins.fabric8.cluster.local;



        location / {
                proxy_http_version 1.1;

                proxy_connect_timeout 10s;
                proxy_read_timeout 10s;
                client_max_body_size 2000m;
                proxy_set_header Host $host;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-Forwarded-Host $host;
                proxy_set_header X-Forwarded-Port $server_port;
                proxy_set_header X-Forwarded-Proto $scheme;
                proxy_pass http://fabric8-jenkins-jenkins.fabric8.cluster.local-jenkins;
        }
}
I1013 21:03:37.926156       1 nginx.go:174] NGINX configuration file had been updated
I1013 21:03:37.927928       1 nginx.go:213] executing nginx -t
I1013 21:03:37.936540       1 nginx.go:213] executing nginx -s reload
2016/10/13 21:03:37 [notice] 49#49: signal process started
I1013 21:03:37.944579       1 utils.go:70] Syncing fabric8/gogs
I1013 21:03:37.944600       1 controller.go:334] Syncing fabric8/gogs
I1013 21:03:37.944609       1 controller.go:349] Adding or Updating Ingress: fabric8/gogs
I1013 21:03:37.944641       1 controller.go:448] Error getting endpoints for service gogs port {0 3000 }: No port {0 3000 } in service gogs
W1013 21:03:37.944649       1 controller.go:423] Error retrieving endpoints for the service gogs: No port {0 3000 } in service gogs
I1013 21:03:37.944665       1 nginx.go:108] Updating NGINX configuration
I1013 21:03:37.944953       1 nginx.go:154] Writing NGINX conf to /etc/nginx/conf.d/fabric8-gogs.conf
upstream fabric8-gogs-gogs.fabric8.cluster.local-gogs {

        server 127.0.0.1:8181;
}
server {
        listen 80;


        server_name gogs.fabric8.cluster.local;



        location / {
                proxy_http_version 1.1;

                proxy_connect_timeout 10s;
                proxy_read_timeout 10s;
                client_max_body_size 2000m;
                proxy_set_header Host $host;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-Forwarded-Host $host;
                proxy_set_header X-Forwarded-Port $server_port;
                proxy_set_header X-Forwarded-Proto $scheme;
                proxy_pass http://fabric8-gogs-gogs.fabric8.cluster.local-gogs;
        }
}
I1013 21:03:37.945423       1 nginx.go:174] NGINX configuration file had been updated
I1013 21:03:37.945928       1 nginx.go:213] executing nginx -t
I1013 21:03:37.955342       1 nginx.go:213] executing nginx -s reload
2016/10/13 21:03:37 [notice] 53#53: signal process started
I1013 21:03:37.963360       1 utils.go:70] Syncing fabric8/fabric8
I1013 21:03:37.963384       1 controller.go:334] Syncing fabric8/fabric8
I1013 21:03:37.963393       1 controller.go:349] Adding or Updating Ingress: fabric8/fabric8
I1013 21:03:37.963427       1 controller.go:448] Error getting endpoints for service fabric8 port {0 9090 }: No port {0 9090 } in service fabric8
W1013 21:03:37.963442       1 controller.go:423] Error retrieving endpoints for the service fabric8: No port {0 9090 } in service fabric8
I1013 21:03:37.963460       1 nginx.go:108] Updating NGINX configuration
upstream fabric8-fabric8-fabric8.fabric8.cluster.local-fabric8 {

        server 127.0.0.1:8181;
}
server {
        listen 80;


        server_name fabric8.fabric8.cluster.local;



        location / {
                proxy_http_version 1.1;

                proxy_connect_timeout 10s;
                proxy_read_timeout 10s;
                client_max_body_size 2000m;
                proxy_set_header Host $host;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-Forwarded-Host $host;
                proxy_set_header X-Forwarded-Port $server_port;
                proxy_set_header X-Forwarded-Proto $scheme;
                proxy_pass http://fabric8-fabric8-fabric8.fabric8.cluster.local-fabric8;
        }
}
I1013 21:03:37.963727       1 nginx.go:154] Writing NGINX conf to /etc/nginx/conf.d/fabric8-fabric8.conf
I1013 21:03:37.964126       1 nginx.go:174] NGINX configuration file had been updated
I1013 21:03:37.964189       1 nginx.go:213] executing nginx -t
I1013 21:03:37.977390       1 nginx.go:213] executing nginx -s reload
2016/10/13 21:03:37 [notice] 57#57: signal process started
I1013 21:03:37.988544       1 utils.go:70] Syncing fabric8/gogs-ssh
I1013 21:03:37.988571       1 controller.go:334] Syncing fabric8/gogs-ssh
I1013 21:03:37.988581       1 controller.go:349] Adding or Updating Ingress: fabric8/gogs-ssh
I1013 21:03:37.988616       1 controller.go:448] Error getting endpoints for service gogs-ssh port {0 2222 }: No port {0 2222 } in service gogs-ssh
W1013 21:03:37.988629       1 controller.go:423] Error retrieving endpoints for the service gogs-ssh: No port {0 2222 } in service gogs-ssh
I1013 21:03:37.988651       1 nginx.go:108] Updating NGINX configuration
upstream fabric8-gogs-ssh-gogs-ssh.fabric8.cluster.local-gogs-ssh {

        server 127.0.0.1:8181;
}
server {
        listen 80;


        server_name gogs-ssh.fabric8.cluster.local;



        location / {
                proxy_http_version 1.1;

                proxy_connect_timeout 10s;
                proxy_read_timeout 10s;
                client_max_body_size 2000m;
                proxy_set_header Host $host;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-Forwarded-Host $host;
                proxy_set_header X-Forwarded-Port $server_port;
                proxy_set_header X-Forwarded-Proto $scheme;
                proxy_pass http://fabric8-gogs-ssh-gogs-ssh.fabric8.cluster.local-gogs-ssh;
        }
}
I1013 21:03:37.989056       1 nginx.go:154] Writing NGINX conf to /etc/nginx/conf.d/fabric8-gogs-ssh.conf
I1013 21:03:37.989512       1 nginx.go:174] NGINX configuration file had been updated
I1013 21:03:37.989578       1 nginx.go:213] executing nginx -t
I1013 21:03:38.003927       1 nginx.go:213] executing nginx -s reload
2016/10/13 21:03:38 [notice] 62#62: signal process started
I1013 21:03:38.012020       1 utils.go:70] Syncing fabric8/nexus
I1013 21:03:38.012048       1 controller.go:334] Syncing fabric8/nexus
I1013 21:03:38.012057       1 controller.go:349] Adding or Updating Ingress: fabric8/nexus
I1013 21:03:38.012102       1 controller.go:448] Error getting endpoints for service nexus port {0 8081 }: No port {0 8081 } in service nexus
W1013 21:03:38.012115       1 controller.go:423] Error retrieving endpoints for the service nexus: No port {0 8081 } in service nexus
I1013 21:03:38.012131       1 nginx.go:108] Updating NGINX configuration
upstream fabric8-nexus-nexus.fabric8.cluster.local-nexus {

        server 127.0.0.1:8181;
}
server {
        listen 80;


        server_name nexus.fabric8.cluster.local;



        location / {
                proxy_http_version 1.1;

                proxy_connect_timeout 10s;
                proxy_read_timeout 10s;
                client_max_body_size 2000m;
                proxy_set_header Host $host;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-Forwarded-Host $host;
                proxy_set_header X-Forwarded-Port $server_port;
                proxy_set_header X-Forwarded-Proto $scheme;
                proxy_pass http://fabric8-nexus-nexus.fabric8.cluster.local-nexus;
        }
}
I1013 21:03:38.012569       1 nginx.go:154] Writing NGINX conf to /etc/nginx/conf.d/fabric8-nexus.conf
I1013 21:03:38.012900       1 nginx.go:174] NGINX configuration file had been updated
I1013 21:03:38.012968       1 nginx.go:213] executing nginx -t
I1013 21:03:38.023058       1 nginx.go:213] executing nginx -s reload
2016/10/13 21:03:38 [notice] 66#66: signal process started
I1013 21:03:38.031124       1 utils.go:70] Syncing fabric8/jenkins-jnlp
I1013 21:03:38.031173       1 controller.go:334] Syncing fabric8/jenkins-jnlp
I1013 21:03:38.031183       1 controller.go:349] Adding or Updating Ingress: fabric8/jenkins-jnlp
I1013 21:03:38.031266       1 nginx.go:108] Updating NGINX configuration
I1013 21:03:38.032503       1 nginx.go:154] Writing NGINX conf to /etc/nginx/conf.d/fabric8-jenkins-jnlp.conf
upstream fabric8-jenkins-jnlp-jenkins-jnlp.fabric8.cluster.local-jenkins-jnlp {

        server 172.16.82.9:50000;
}
server {
        listen 80;


        server_name jenkins-jnlp.fabric8.cluster.local;



        location / {
                proxy_http_version 1.1;

                proxy_connect_timeout 10s;
                proxy_read_timeout 10s;
                client_max_body_size 2000m;
                proxy_set_header Host $host;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-Forwarded-Host $host;
                proxy_set_header X-Forwarded-Port $server_port;
                proxy_set_header X-Forwarded-Proto $scheme;
                proxy_pass http://fabric8-jenkins-jnlp-jenkins-jnlp.fabric8.cluster.local-jenkins-jnlp;
        }
}
I1013 21:03:38.032834       1 nginx.go:174] NGINX configuration file had been updated
I1013 21:03:38.032948       1 nginx.go:213] executing nginx -t
I1013 21:03:38.046180       1 nginx.go:213] executing nginx -s reload
2016/10/13 21:03:38 [notice] 70#70: signal process started
I1013 21:03:38.055664       1 utils.go:70] Syncing fabric8/jenkinshift
I1013 21:03:38.055690       1 controller.go:334] Syncing fabric8/jenkinshift
I1013 21:03:38.055699       1 controller.go:349] Adding or Updating Ingress: fabric8/jenkinshift
I1013 21:03:38.055734       1 controller.go:448] Error getting endpoints for service jenkinshift port {0 9191 }: No port {0 9191 } in service jenkinshift
W1013 21:03:38.055753       1 controller.go:423] Error retrieving endpoints for the service jenkinshift: No port {0 9191 } in service jenkinshift
I1013 21:03:38.055778       1 nginx.go:108] Updating NGINX configuration
I1013 21:03:38.056027       1 nginx.go:154] Writing NGINX conf to /etc/nginx/conf.d/fabric8-jenkinshift.conf
upstream fabric8-jenkinshift-jenkinshift.fabric8.cluster.local-jenkinshift {

        server 127.0.0.1:8181;
}
server {
        listen 80;


        server_name jenkinshift.fabric8.cluster.local;



        location / {
                proxy_http_version 1.1;

                proxy_connect_timeout 10s;
                proxy_read_timeout 10s;
                client_max_body_size 2000m;
                proxy_set_header Host $host;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-Forwarded-Host $host;
                proxy_set_header X-Forwarded-Port $server_port;
                proxy_set_header X-Forwarded-Proto $scheme;
                proxy_pass http://fabric8-jenkinshift-jenkinshift.fabric8.cluster.local-jenkinshift;
        }
}
I1013 21:03:38.056500       1 nginx.go:174] NGINX configuration file had been updated
I1013 21:03:38.056566       1 nginx.go:213] executing nginx -t
I1013 21:03:38.066161       1 nginx.go:213] executing nginx -s reload
2016/10/13 21:03:38 [notice] 74#74: signal process started
I1013 21:03:38.073886       1 utils.go:70] Syncing fabric8/fabric8-docker-registry
I1013 21:03:38.073907       1 controller.go:334] Syncing fabric8/fabric8-docker-registry
I1013 21:03:38.073916       1 controller.go:349] Adding or Updating Ingress: fabric8/fabric8-docker-registry
I1013 21:03:38.073950       1 controller.go:448] Error getting endpoints for service fabric8-docker-registry port {0 5000 }: No port {0 5000 } in service fabric8-docker-registry
W1013 21:03:38.073960       1 controller.go:423] Error retrieving endpoints for the service fabric8-docker-registry: No port {0 5000 } in service fabric8-docker-registry
I1013 21:03:38.073985       1 nginx.go:108] Updating NGINX configuration
upstream fabric8-fabric8-docker-registry-fabric8-docker-registry.fabric8.cluster.local-fabric8-docker-registry {

        server 127.0.0.1:8181;
}
server {
        listen 80;


        server_name fabric8-docker-registry.fabric8.cluster.local;



        location / {
                proxy_http_version 1.1;

                proxy_connect_timeout 10s;
                proxy_read_timeout 10s;
                client_max_body_size 2000m;
                proxy_set_header Host $host;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-Forwarded-Host $host;
                proxy_set_header X-Forwarded-Port $server_port;
                proxy_set_header X-Forwarded-Proto $scheme;
                proxy_pass http://fabric8-fabric8-docker-registry-fabric8-docker-registry.fabric8.cluster.local-fabric8-docker-registry;
        }
}
I1013 21:03:38.074262       1 nginx.go:154] Writing NGINX conf to /etc/nginx/conf.d/fabric8-fabric8-docker-registry.conf
I1013 21:03:38.074572       1 nginx.go:174] NGINX configuration file had been updated
I1013 21:03:38.074632       1 nginx.go:213] executing nginx -t
I1013 21:03:38.082571       1 nginx.go:213] executing nginx -s reload
2016/10/13 21:03:38 [notice] 78#78: signal process started
(reverse-i-search)`ingress': kubectl get deployment ingress-nginx --namespace=fabric8-system -o yaml > ^Cgress-nginx.yml
[root@localhost ~]# kubectl get endpoints
NAME                      ENDPOINTS           AGE
fabric8                   172.16.71.5:9090    1h
fabric8-docker-registry   172.16.82.5:5000    1h
fabric8-forge             172.16.82.8:8080    1h
gogs                      172.16.82.7:3000    1h
gogs-ssh                  172.16.82.7:2222    1h
jenkins                   172.16.82.9:8080    1h
jenkins-jnlp              172.16.82.9:50000   1h
jenkinshift               172.16.71.5:9191    1h
nexus                     172.16.82.6:8081    1h
[root@localhost ~]# kubectl get svc
NAME                      CLUSTER-IP      EXTERNAL-IP   PORT(S)     AGE
fabric8                   10.254.132.99   nodes         80/TCP      1h
fabric8-docker-registry   10.254.199.48   <none>        80/TCP      1h
fabric8-forge             10.254.27.65    <none>        80/TCP      1h
gogs                      10.254.32.167   <none>        80/TCP      1h
gogs-ssh                  10.254.79.197   <none>        22/TCP      1h
jenkins                   10.254.5.237    <none>        80/TCP      1h
jenkins-jnlp              10.254.74.189   <none>        50000/TCP   1h
jenkinshift               10.254.120.57   <none>        80/TCP      1h
nexus                     10.254.2.109    <none>        80/TCP      1h

@const-bon
Copy link

I'm using image v0.3.1.
Only enpoint with the port same to service was detected correctly.

@pleshakov
Copy link
Contributor

@comeanother could you provide the ingress resource for fabric8/fabric8-docker-registry or fabric8/jenkinshift ?

The correct behaviour is the following: the port specified in an Ingress resource (by the name or the port number) must much the port declared in the corresponding service file.

@const-bon
Copy link

Sorry, these are the correct one

[root@localhost ~]# kubectl get ingress
NAME                      RULE                                            BACKEND   ADDRESS   AGE
fabric8                   -                                                                   2h
                          fabric8.fabric8.cluster.local
                                                                          fabric8:9090
fabric8-docker-registry   -                                                                   2h
                          fabric8-docker-registry.fabric8.cluster.local
                                                                          fabric8-docker-registry:5000
fabric8-forge             -                                                                   2h
                          fabric8-forge.fabric8.cluster.local
                                                                          fabric8-forge:8080
gogs                      -                                                                   2h
                          gogs.fabric8.cluster.local
                                                                          gogs:3000
gogs-ssh                  -                                                                   2h
                          gogs-ssh.fabric8.cluster.local
                                                                          gogs-ssh:2222
jenkins                   -                                                                   2h
                          jenkins.fabric8.cluster.local
                                                                          jenkins:8080
jenkins-jnlp              -                                                                   2h
                          jenkins-jnlp.fabric8.cluster.local
                                                                          jenkins-jnlp:50000
jenkinshift               -                                                                   2h
                          jenkinshift.fabric8.cluster.local
                                                                          jenkinshift:9191
nexus                     -                                                                   2h
                          nexus.fabric8.cluster.local
                                                                          nexus:8081

@const-bon
Copy link

Am I right: port declared in ingress must match port (not target port) declared in service?

@pleshakov
Copy link
Contributor

You're right.

version 0.3 and before (incorrect behavior): port declared in ingress must match the target port declared in service
version 0.3.1 (correct behavior): port declared in ingress must match port (not target port) declared in service

@rawlingsj
Copy link
Author

@pleshakov @comeanother I'm one of the fabric8 committers and created the exposecontroller that generates the ingress rules in the sample above.

we originally had to use the target port until this current issue was fixed as the code explains here https://github.com/fabric8io/exposecontroller/blob/master/exposestrategy/ingress.go#L86

but my guess is that this fix was originally pushed to the 0.3 tag which has since been reverted and moved to 3.1 (I think that's right)

on the fabric8 project we will need to update the exposecontroller to work with this fix and version 3.1 of the nginx ingress controller.

@const-bon
Copy link

const-bon commented Oct 13, 2016

@rawlingsj I installed two fabric8 environments.
The first (older) igresses are using targetPorts.
The second (newer) ingresses are all using only 80 port.
Is that suppose to be?
Older environment I installed about 6 hours ago and newer about an hour ago.

@pleshakov
Copy link
Contributor

@rawlingsj correct, the fix was applied to 0.3 initially, but then the 0.3 image has been reverted to the previous version.

The fix was applied to 0.3.1 image

@rawlingsj
Copy link
Author

@comeanother until we update exposecontroller and perform a fabric8 release which includes the upgrade to nginxdemos/nginx-ingress:0.3.1 then we will need to stick to using targetPorts and 0.3

As @pleshakov just confirmed the issue here is that the nginxdemos/nginx-ingress:0.3 tag was working but for a short amount of time had a change pushed over it which has since been reverted see #56

I can try to update fabric8 to use the 0.3.1 tag but in the interest of time the easiest approach I think would be to force a

docker pull nginxdemos/nginx-ingress:0.3

on the node that's running the pod or if no ssh access change the pull policy of the ingress controller deployment in the fabric8-system namespace to Always

@const-bon
Copy link

@rawlingsj I'm trying now

@const-bon
Copy link

@rawlingsj Still no luck. 'server 127.0.0.1:8181' in the upstreams.
Do you have an issue in your repository, so we can continue there?

@rawlingsj
Copy link
Author

@pleshakov thanks for the quick and great responses BTW!

I had a quick look at updating the ingress rule in our exposecontroller but I wasn't 100% what I needed to change to with this port mapping fix. Where I was using a targetPort before should this now be port.Port ?

https://github.com/fabric8io/exposecontroller/blob/master/exposestrategy/ingress.go#L85-L86

@const-bon
Copy link

@rawlingsj Yes,

version 0.3.1 (correct behavior): port declared in ingress must match port (not target port) declared in service

@rawlingsj
Copy link
Author

@comeanother fabric8 can update that mapping and reference the new version of nginxdemos/nginx-ingress:0.3.1 but that's going to require a new fabric8 release which can't happen until tomorrow and providing everything works. (it's gone 11 pm here in the UK)

Regardless of the changes needed you shouldn't be affected by this if you've been able to pull the 0.3 tag again, now that the change has been reverted.

@pleshakov
Copy link
Contributor

@comeanother please redeploy the Ingress controller. The 0.3 wasn't fixed by mistake.

@it-svit
Copy link

it-svit commented Oct 14, 2016

Thanks @pleshakov Now 0.3 is working.
I'll test 0.3.1 soon.

@rawlingsj
Copy link
Author

0.3.1 tested successfully - thanks @pleshakov!

@sheoransumit
Copy link

server {
listen 80;
server_name example1.com;
location / {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}

server {
listen 80;
server_name example2.com;
location / {
proxy_pass http://localhost:8080;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}

Error Log :
2020/03/17 14:13:44 [error] 1880#1880: *88 connect() failed (111: Connection refused) while connecting to upstream, client: 157.37.238.120, server: example1.com, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:3000/", host: "www.example1.com"
2020/03/17 14:13:44 [error] 1880#1880: *88 connect() failed (111: Connection refused) while connecting to upstream, client: 157.37.238.120, server: example.com, request: "GET /favicon.ico HTTP/1.1", upstream: "http://127.0.0.1:3000/favicon.ico", host: "www.example1.com", referrer: "http://www.example1.com/"

@viktor-lt
Copy link

kubectl get endpoints

Have you been able to make it work ?

I am still unable to (#8207)

@brianehlert
Copy link
Collaborator

@vikomte the issue you link to is the K8s community nginx ingress controller project. Which is distinct in function and notation from this one.
Can you please clarify which you are deploying?

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

8 participants