Question

502 Bad Gateway after setting up Meteor on Ubuntu 14.04

Posted August 31, 2015 5.5k views
NginxDeployment

Hi all,

I followed this set of instructions to install my Meteor app. https://cloud.digitalocean.com/support/suggestions?query=meteor

However, after starting the app, I still get the 502 Bad Gateway Error.

Upon looking into the Nginx logs, I see this error -

[error] 7969#0: *152 connect() failed (111: Connection refused) while connecting to upstream

Any idea what the problem could be?

Thanks!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
2 answers

Hi. Are you able to access Meteor on port 8080 (browse to http://your droplet's ip address:8080)? If not, start it and try again:

start todos

If that still doesn’t work, please post the output of the following command:

sudo netstat -plutn
  • I just got the same error, and here is the output of netstat

    Active Internet connections (only servers)
    Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
    tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      2303/sshd       
    tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN      2145/nginx -g daemo
    tcp        0      0 127.0.0.1:27017         0.0.0.0:*               LISTEN      2295/mongod     
    tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      2145/nginx -g daemo
    tcp6       0      0 :::22                   :::*                    LISTEN      2303/sshd       
    tcp6       0      0 fe80::1:13128           :::*                    LISTEN      2448/lxd-bridge-pro
    tcp6       0      0 :::80                   :::*                    LISTEN      2145/nginx -g daemo
    
    edited by kamaln7
    • Hi @helpiest,

      It looks like meteor is not running on your droplet, or at least not listening on any ports. Does starting meteor manually work or does it output any errors?

      • Thanks, Now see node is listening 8080, but still not working :(

        Active Internet connections (only servers)
        Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
        tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 2303/sshd

        tcp 0 0 127.0.0.1:27017 0.0.0.0:* LISTEN 3948/mongod

        tcp 0 0 127.0.0.1:8080 0.0.0.0:* LISTEN 32020/node

        tcp6 0 0 :::22 :::* LISTEN 2303/sshd

        tcp6 0 0 fe80::1:13128 :::* LISTEN 2448/lxd-bridge-pro

Hi,

Thanks for your help!
In the end, I made use of Meteor up package to setup and deploy. It works fine :)

Submit an Answer