I have been researching and trying out many different ways to kill my 502 Bad Gateway but to no success! I am deploying my Meteor app on Digital Ocean’s $10 droplet running Ubuntu 14.04 x64
Domain Registrar:
GoDaddy.
My normal home web-page’s domain is mydomain.com which forwards to an instapage website, but I have a subdomain login.mydomain.com to redirect (301) to my DO droplet. Added an A record for login that points to the DO IP. Seems to resolve just fine except for some DMARC issues (and delegation of course due to no website returned).
Is there any reason why you’re using port 8080 and not 3000?
Could that be causing an issue on the server somewhere?
I haven’t looked at the other config info you’ve pasted in great detail, it mostly looks like what I’ve used myself except that that port…
On my server I am running three apps all on separate ports, 3000, 3100 and 3200. No issues.
Thank you for your answer. I have changed all occurences of 8080 to 3000 and it still does not work. I also tried the mongoDB port to be 3001 but that did not do it either.
Right on. Wasn’t suggesting mup as a replacement, just trying to troubleshoot. On a side note, you can use mup with an nginx reverse proxy so you can handle your own ssl.
Back to your problem: are you able to run something like meteor --port 8080 and access it?
Thanks for the help! I’ve looked over that one comment. I installed the current V5.x version of nodejs after purging it, and added comments to all the export paths in my init file.
It still does not work though. But when I type ‘status myapp’ it now says it’s running which is a good change! When I run ‘nginx -t’ under the myapp user, it gives me errors. Only if I run it under root it says NGINX OK.
The myapp.log that’s defined in the init file is also missing, which is strange, since the output of main.js should be put there, so Im assuming something else is wrong too…
I’m using mup (from kadirahq) to deploy the app to a Digital Ocean Droplet, I have created my own docker image that is used to run the app. Nginx is running as reverse-proxy and configured manually.
Im not completely shying away from mup, but Im building an app that handles financial data and using enforcessl is a must, and story goes it ain’t easy with mup. Also do not like to have another intermediary step between deployment that can break when you most need it
I’d say that on the first walkthrough, if you aren’t familiar with mup, nginx, or le, you could expect to spend a day on it. Now, though, I’d say I could spin up a droplet and have this setup in an hour or less…
Also, I completely get how frustrating it can be not to figure something out. And an alternative can sometimes seem like giving up. But time is precious!
I had the same error like yours and was trying to figured it out all over the internet but couldn’t solved the error and then just gave up Nginx and use naked Node JS alone.
Without Nginx, Meteor app work but I encountered websocket connection issue. Again, I was trying to figured it out all over the internet but couldn’t solved the problem and just gave up websocket. I disable websocket and thinking what’s the point I included webscoket related package like DDP if I disable websocket.
Maybe I am wrong after all. I thought that you NEED to have force-ssl package in Meteor, but now that I think of it NGINX will rewrite any incoming http into https anyway. So maybe I do not need it if I use NGINX?
I still haven’t found the issue. I’ve deployed it for now with MUPX and it works fine. But I really do not like the intermediary step. Also, mupx logs cannot be found. If I type in my localhost/dev machine ‘mupx logs -f’ it says it cannot find it.
Any ideas on how to setup the deployment without mupx?
If not, any ideas on how to fetch the logs? They don’t exist on the server on the supposed-to-be path
Honestly, I’ve been using mup more than mupx, though I do have a few apps running on mupx. Also, because of the docker/container, I think fetching the mupx logs is a bit different – https://github.com/arunoda/meteor-up/issues/831?