{"action":"created","issue":{"url":"https://api.github.com/repos/cloudfleet/blimp-nginx/issues/2","labels_url":"https://api.github.com/repos/cloudfleet/blimp-nginx/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/cloudfleet/blimp-nginx/issues/2/comments","events_url":"https://api.github.com/repos/cloudfleet/blimp-nginx/issues/2/events","html_url":"https://github.com/cloudfleet/blimp-nginx/issues/2","id":123504033,"number":2,"title":"502 Bad Gateway after Docker image rebuild","user":{"login":"metakermit","id":1818628,"avatar_url":"https://avatars.githubusercontent.com/u/1818628?v=3","gravatar_id":"","url":"https://api.github.com/users/metakermit","html_url":"https://github.com/metakermit","followers_url":"https://api.github.com/users/metakermit/followers","following_url":"https://api.github.com/users/metakermit/following{/other_user}","gists_url":"https://api.github.com/users/metakermit/gists{/gist_id}","starred_url":"https://api.github.com/users/metakermit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/metakermit/subscriptions","organizations_url":"https://api.github.com/users/metakermit/orgs","repos_url":"https://api.github.com/users/metakermit/repos","events_url":"https://api.github.com/users/metakermit/events{/privacy}","received_events_url":"https://api.github.com/users/metakermit/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-22T15:43:14Z","updated_at":"2015-12-22T16:24:02Z","closed_at":"2015-12-22T16:24:01Z","body":"After https://github.com/cloudfleet/blimp-nginx/commit/72107515cc49134cffde74b0aa3002dee8befbc5 the nginx server started returning \"502 Bad Gateway\" error pages. In a single request to the blimp host, logs state:\r\n```\r\n172.17.0.141 - - [22/Dec/2015:15:27:40 +0000] \"GET / HTTP/1.1\" 302 154 \"-\" \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36\"\r\n172.17.0.141 - - [22/Dec/2015:15:27:41 +0000] \"GET /cockpit HTTP/1.1\" 302 154 \"-\" \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36\"\r\n2015/12/22 15:27:41 [error] 22#0: *16 connect() failed (111: Connection refused) while connecting to upstream, client: 172.17.0.141, server: localhost, request: \"GET /cockpit/access/signin HTTP/1.1\", upstream: \"https://172.17.0.138:443/access/signin\", host: \"blimp.epska.org\"\r\n2015/12/22 15:27:41 [error] 22#0: *16 connect() failed (111: Connection refused) while connecting to upstream, client: 172.17.0.141, server: localhost, request: \"GET /cockpit/access/signin HTTP/1.1\", upstream: \"https://172.17.0.138:443/access/signin\", host: \"blimp.epska.org\"\r\n2015/12/22 15:27:41 [error] 22#0: *16 connect() failed (111: Connection refused) while connecting to upstream, client: 172.17.0.141, server: localhost, request: \"GET /cockpit/access/signin HTTP/1.1\", upstream: \"https://172.17.0.138:443/access/signin\", host: \"blimp.epska.org\"\r\n172.17.0.141 - - [22/Dec/2015:15:27:41 +0000] \"GET /cockpit/access/signin HTTP/1.1\" 502 568 \"-\" \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36\"\r\n172.17.0.141 - - [22/Dec/2015:15:27:42 +0000] \"GET /favicon.ico HTTP/1.1\" 302 154 \"https://blimp.epska.org/cockpit/access/signin\" \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36\"\r\n172.17.0.141 - - [22/Dec/2015:15:27:43 +0000] \"GET /cockpit HTTP/1.1\" 302 154 \"https://blimp.epska.org/cockpit/access/signin\" \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36\"\r\n2015/12/22 15:27:43 [error] 22#0: *16 no live upstreams while connecting to upstream, client: 172.17.0.141, server: localhost, request: \"GET /cockpit/access/signin HTTP/1.1\", upstream: \"https://cockpit/access/signin\", host: \"blimp.epska.org\", referrer: \"https://blimp.epska.org/cockpit/access/signin\"\r\n172.17.0.141 - - [22/Dec/2015:15:27:43 +0000] \"GET /cockpit/access/signin HTTP/1.1\" 502 568 \"https://blimp.epska.org/cockpit/access/signin\" \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36\"\r\n```\r\nThere were some issues with `dnsmasq` after the upgrade which were addressed in https://github.com/cloudfleet/blimp-nginx/commit/4c136b3cbbcd36a6572e57021fc82d5f930b9279 and https://github.com/cloudfleet/blimp-nginx/commit/ef467d8d7fba499b66d7a8cc5543b69b85bb94b7 , but dnsmasq still reports:\r\n```\r\nroot@nginx:/# service dnsmasq status\r\nChecking DNS forwarder and DHCP server: dnsmasq(dead, pid file exists).\r\n```\r\nNot quite clear whether this means that dnsmasq works or not (its only role is to resolve hostnames like \"cockpit\" to real IPs, and that seems to work, despite this \"dead\" remark. The address seems to be resolved successfully, because nginx mentions in the logs `upstream: \"https://172.17.0.138:443/access/signin\"` and that is the ip address of the cockpit container:\r\n```\r\nroot@nginx:/# ping cockpit\r\nPING cockpit (172.17.0.138) 56(84) bytes of data.\r\n64 bytes from cockpit (172.17.0.138): icmp_seq=1 ttl=64 time=0.836 ms\r\n```"},"comment":{"url":"https://api.github.com/repos/cloudfleet/blimp-nginx/issues/comments/166665351","html_url":"https://github.com/cloudfleet/blimp-nginx/issues/2#issuecomment-166665351","issue_url":"https://api.github.com/repos/cloudfleet/blimp-nginx/issues/2","id":166665351,"user":{"login":"metakermit","id":1818628,"avatar_url":"https://avatars.githubusercontent.com/u/1818628?v=3","gravatar_id":"","url":"https://api.github.com/users/metakermit","html_url":"https://github.com/metakermit","followers_url":"https://api.github.com/users/metakermit/followers","following_url":"https://api.github.com/users/metakermit/following{/other_user}","gists_url":"https://api.github.com/users/metakermit/gists{/gist_id}","starred_url":"https://api.github.com/users/metakermit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/metakermit/subscriptions","organizations_url":"https://api.github.com/users/metakermit/orgs","repos_url":"https://api.github.com/users/metakermit/repos","events_url":"https://api.github.com/users/metakermit/events{/privacy}","received_events_url":"https://api.github.com/users/metakermit/received_events","type":"User","site_admin":false},"created_at":"2015-12-22T16:24:01Z","updated_at":"2015-12-22T16:24:01Z","body":"It seems it was this change that caused the error – https://github.com/cloudfleet/blimp-engineroom/commit/61194581d9dbe518b5c3f9142b79e12a1c0eee62 . Cockpit is refusing connections on 443. Reverting that commit fixes this issue. This brings back the old mixed content error, but at least the Blimp is not returning 502s any more.\r\n\r\nFixed in https://github.com/cloudfleet/blimp-engineroom/commit/60c832126cc75831cce0544f983728c86bb7a371."}}