502 bad gateway error (on AWS) [solved]

When i logged into my instances on AWS, it looks like this: and after clicking on the URL link it give “502 Bad Gateway” Error.

What am I doing wrong? Help needed pls. @chadhuber

Can you take a screenshot of your configuration?

This is my configuration.

@olusola could you share your logs too?

And sorry for the late response - please @ me in the future, and I’ll get an email notification

@chadhuber
This is the requested logs:

/var/log/docker-ps.log

‘docker ps’ ran at Mon Nov 27 09:24:35 UTC 2017:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d3ca42a297e6 ee34ac88c219 “/app/run_metabase.sh” 3 weeks ago Up 6 days 3000/tcp competent_banach


/var/log/nginx/error.log

2017/11/27 07:43:29 [error] 21544#0: *2572 connect() failed (111: Connection refused) while connecting to upstream, client: 193.93.74.69, server: , request: “HEAD http:// 52.208.206.207:80/phpmyadmin/ HTTP/1.1”, upstream: “http:// 172.17.0.2:3000/phpmyadmin/”, host: “52.208.206.207”
2017/11/27 07:43:30 [error] 21544#0: *2572 connect() failed (111: Connection refused) while connecting to upstream, client: 193.93.74.69, server: , request: “HEAD http:// 52.208.206.207:80/phpMyadmin/ HTTP/1.1”, upstream: “http:// 172.17.0.2:3000/phpMyadmin/”, host: “52.208.206.207”
2017/11/27 07:43:30 [error] 21544#0: *2572 connect() failed (111: Connection refused) while connecting to upstream, client: 193.93.74.69, server: , request: “HEAD http:// 52.208.206.207:80/phpMyAdmin/ HTTP/1.1”, upstream: “http:// 172.17.0.2:3000/phpMyAdmin/”, host: “52.208.206.207”
2017/11/27 07:43:30 [error] 21544#0: *2572 connect() failed (111: Connection refused) while connecting to upstream, client: 193.93.74.69, server: , request: “HEAD http:// 52.208.206.207:80/phpmyAdmin/ HTTP/1.1”, upstream: “http:// 172.17.0.2:3000/phpmyAdmin/”, host: “52.208.206.207”
2017/11/27 07:43:30 [error] 21544#0: *2572 connect() failed (111: Connection refused) while connecting to upstream, client: 193.93.74.69, server: , request: “HEAD http:// 52.208.206.207:80/phpmyadmin2/ HTTP/1.1”, upstream: “http:// 172.17.0.2:3000/phpmyadmin2/”, host: “52.208.206.207”
2017/11/27 07:43:30 [error] 21544#0: *2572 connect() failed (111: Connection refused) while connecting to upstream, client: 193.93.74.69, server: , request: “HEAD http:// 52.208.206.207:80/phpmyadmin3/ HTTP/1.1”, upstream: “http:// 172.17.0.2:3000/phpmyadmin3/”, host: “52.208.206.207”
2017/11/27 07:43:30 [error] 21544#0: *2572 connect() failed (111: Connection refused) while connecting to upstream, client: 193.93.74.69, server: , request: “HEAD http:// 52.208.206.207:80/phpmyadmin4/ HTTP/1.1”, upstream: “http:// 172.17.0.2:3000/phpmyadmin4/”, host: “52.208.206.207”
2017/11/27 07:43:30 [error] 21544#0: *2572 connect() failed (111: Connection refused) while connecting to upstream, client: 193.93.74.69, server: , request: “HEAD http:// 52.208.206.207:80/2phpmyadmin/ HTTP/1.1”, upstream: “http:// 172.17.0.2:3000/2phpmyadmin/”, host: “52.208.206.207”
2017/11/27 07:43:30 [error] 21544#0: *2572 connect() failed (111: Connection refused) while connecting to upstream, client: 193.93.74.69, server: , request: “HEAD http:// 52.208.206.207:80/phpmy/ HTTP/1.1”, upstream: “http:// 172.17.0.2:3000/phpmy/”, host: “52.208.206.207”
2017/11/27 07:43:31 [error] 21544#0: *2572 connect() failed (111: Connection refused) while connecting to upstream, client: 193.93.74.69, server: , request: “HEAD http:// 52.208.206.207:80/phppma/ HTTP/1.1”, upstream: “http:// 172.17.0.2:3000/phppma/”, host: “52.208.206.207”
2017/11/27 07:43:31 [error] 21544#0: *2572 connect() failed (111: Connection refused) while connecting to upstream, client: 193.93.74.69, server: , request: “HEAD http:// 52.208.206.207:80/myadmin/ HTTP/1.1”, upstream: “http:// 172.17.0.2:3000/myadmin/”, host: “52.208.206.207”
2017/11/27 07:43:31 [error] 21544#0: *2572 connect() failed (111: Connection refused) while connecting to upstream, client: 193.93.74.69, server: , request: “HEAD http:// 52.208.206.207:80/shopdb/ HTTP/1.1”, upstream: “http:// 172.17.0.2:3000/shopdb/”, host: “52.208.206.207”
2017/11/27 07:43:31 [error] 21544#0: *2572 connect() failed (111: Connection refused) while connecting to upstream, client: 193.93.74.69, server: , request: “HEAD http:// 52.208.206.207:80/MyAdmin/ HTTP/1.1”, upstream: “http:// 172.17.0.2:3000/MyAdmin/”, host: “52.208.206.207”
2017/11/27 07:43:31 [error] 21544#0: *2572 connect() failed (111: Connection refused) while connecting to upstream, client: 193.93.74.69, server: , request: “HEAD http:// 52.208.206.207:80/program/ HTTP/1.1”, upstream: “http:// 172.17.0.2:3000/program/”, host: “52.208.206.207”
2017/11/27 07:43:31 [error] 21544#0: *2572 connect() failed (111: Connection refused) while connecting to upstream, client: 193.93.74.69, server: , request: “HEAD http:// 52.208.206.207:80/PMA/ HTTP/1.1”, upstream: “http:// 172.17.0.2:3000/PMA/”, host: “52.208.206.207”
2017/11/27 07:43:31 [error] 21544#0: *2572 connect() failed (111: Connection refused) while connecting to upstream, client: 193.93.74.69, server: , request: “HEAD http:// 52.208.206.207:80/dbadmin/ HTTP/1.1”, upstream: “http:// 172.17.0.2:3000/dbadmin/”, host: “52.208.206.207”
2017/11/27 07:43:31 [error] 21544#0: *2572 connect() failed (111: Connection refused) while connecting to upstream, client: 193.93.74.69, server: , request: “HEAD http:// 52.208.206.207:80/pma/ HTTP/1.1”, upstream: “http:// 172.17.0.2:3000/pma/”, host: “52.208.206.207”
2017/11/27 07:43:31 [error] 21544#0: *2572 connect() failed (111: Connection refused) while connecting to upstream, client: 193.93.74.69, server: , request: “HEAD http:// 52.208.206.207:80/db/ HTTP/1.1”, upstream: “http:// 172.17.0.2:3000/db/”, host: “52.208.206.207”
2017/11/27 07:43:32 [error] 21544#0: *2572 connect() failed (111: Connection refused) while connecting to upstream, client: 193.93.74.69, server: , request: “HEAD http:// 52.208.206.207:80/admin/ HTTP/1.1”, upstream: “http:// 172.17.0.2:3000/admin/”, host: “52.208.206.207”
2017/11/27 07:43:32 [error] 21544#0: *2572 connect() failed (111: Connection refused) while connecting to upstream, client: 193.93.74.69, server: , request: “HEAD http:// 52.208.206.207:80/mysql/ HTTP/1.1”, upstream: “http:// 172.17.0.2:3000/mysql/”, host: “52.208.206.207”
2017/11/27 07:43:32 [error] 21544#0: *2572 connect() failed (111: Connection refused) while connecting to upstream, client: 193.93.74.69, server: , request: “HEAD http:// 52.208.206.207:80/database/ HTTP/1.1”, upstream: “http:// 172.17.0.2:3000/database/”, host: “52.208.206.207”
2017/11/27 07:43:32 [error] 21544#0: *2572 connect() failed (111: Connection refused) while connecting to upstream, client: 193.93.74.69, server: , request: “HEAD http:// 52.208.206.207:80/db/phpmyadmin/ HTTP/1.1”, upstream: “http:// 172.17.0.2:3000/db/phpmyadmin/”, host: “52.208.206.207”
2017/11/27 07:43:32 [error] 21544#0: *2572 connect() failed (111: Connection refused) while connecting to upstream, client: 193.93.74.69, server: , request: “HEAD http:// 52.208.206.207:80/db/phpMyAdmin/ HTTP/1.1”, upstream: “http:// 172.17.0.2:3000/db/phpMyAdmin/”, host: “52.208.206.207”
2017/11/27 07:43:32 [error] 21544#0: *2572 connect() failed (111: Connection refused) while connecting to upstream, client: 193.93.74.69, server: , request: “HEAD http:// 52.208.206.207:80/sqlmanager/ HTTP/1.1”, upstream: “http:// 172.17.0.2:3000/sqlmanager/”, host: “52.208.206.207”

@chadhuber @akash47 I’m waiting for your response on the above log. Any help?

I’m not technical enough to understand the logs,

But - I recall getting an error that was similar to your very first screenshot in this thread.
I followed @chadhuber 's instructions and that helped. I just reset all configuration and followed his directions from the top

Sorry I can’t be of more help

@chadhuber and @olusola - did either of you ever solve this problem? I am running into the exact same issue

Hi All - I came to this thread as I was having the same issue deploying 0.29.3.

In the logs I noticed that the t1.micro’s memory was 100% full so I bumped the instance to t2.micro and after a rebuild everything was up and running.

Not sure if Amazon changed how it handles going beyond the memory limits of its boxes, or if newer Metabase releases just need more juice (both maybe?) but try that out if you’re experiencing the same error.

1 Like