From 95837c8fff1816e9ff3ab7516596c1c2cdcb1664 Mon Sep 17 00:00:00 2001 From: jpic Date: Mon, 8 Jul 2019 21:19:49 +0200 Subject: [PATCH] Stop marking 127.0.0.1 as upstream and as down This patch fixes a critical condition in which the whole LB is down. [emerg] 28#28: invalid number of arguments in "upstream" directive And: Generated '/etc/nginx/conf.d/default.conf' from 12 containers Running 'nginx -s reload' Error running notify command: nginx -s reload, exit status 1 Received event start for container 5c6cb0bf8e05 What is 127.0.0.1 ? Isn't it the nginx-proxy container ? How can it be an upstream at all ? Related: #1132 #1106 Comments (not OP) of: #375 Maybe: #1144 --- nginx.tmpl | 5 ----- 1 file changed, 5 deletions(-) diff --git a/nginx.tmpl b/nginx.tmpl index a9fc479..a5936f8 100644 --- a/nginx.tmpl +++ b/nginx.tmpl @@ -15,8 +15,6 @@ # {{ .Container.Name }} {{ if .Network.IP }} server {{ .Network.IP }} down; - {{ else }} - server 127.0.0.1 down; {{ end }} {{ end }} @@ -142,9 +140,6 @@ upstream {{ $upstream_name }} { {{ $address := where $container.Addresses "Port" $port | first }} {{ template "upstream" (dict "Container" $container "Address" $address "Network" $containerNetwork) }} {{ end }} - {{ else }} - # Cannot connect to network of this container - server 127.0.0.1 down; {{ end }} {{ end }} {{ end }}