Mup deploy hangs

I’m trying to deploy my first Meteor app. I’ve following the instructions for using mup.
When I enter DEBUG=* mup deploy I see that it hangs with this as the final output:

[104.131.8.107] - Pushing Meteor App Bundle to the Server
nodemiral:sess:104.131.8.107 copy file - src: /var/folders/cg/mydcyj3j79j64bd5dy6cn1300000gn/T/mup-meteor-e6965e82-c6ee-4a59-94d2-cee6cd319b25/bundle.tar.gz, dest: /opt/meteor-svelte-todos/tmp/bundle.tar.gz, vars: undefined +0ms
[ ] 3% 13.3s

I see that the size of that file is 20381898. I don’t know if the size is an issue or if there is some other problem. Is there anything else I can do to shed light on why the deploy hangs?

The library Meteor Up uses for SSH hasn’t been updated for Node 14. If you switch to Node 12 it will be able to push the bundle.

1 Like

Thanks! I would have never guessed that. Now I get a new error. It is pasted below. I’m guessing the key part is just this: “tcp 0.0.0.0:80: bind: address already in use”. I don’t want to give up on Meteor, but deploying a Meteor app seems really difficult.

x Start Meteor: FAILED │Welcome to DigitalOcean’s One-Click Node.js Droplet.
│To keep this Droplet secure, the UFW firewall is enabled.
------------------------------------STDERR------------------------------------ │All ports are BLOCKED except 22 (SSH), 80 (HTTP), and 443 (HTTPS).
Removing docker containers. Errors about nonexistent endpoints and containers are normal.
Error response from daemon: endpoint meteor-svelte-todos not found │Use these SFTP credentials to upload files with FileZilla/WinSCP/rsync:
Error: No such container: meteor-svelte-todos-frontend │ Host: 104.131.8.107
Error response from daemon: endpoint meteor-svelte-todos-frontend not found │ User: nodejs
Error: No such container: meteor-svelte-todos-nginx-letsencrypt │ Pass: 26003ca62300890b93b92f7c0f6ef473
Error response from daemon: endpoint meteor-svelte-todos-nginx-letsencrypt not found │
Error: No such container: meteor-svelte-todos-nginx-proxy │In a web browser, you can view:
Error response from daemon: endpoint meteor-svelte-todos-nginx-proxy not found │ * The Node.js One-Click Quickstart guide: http://do.co/node1804#start
Finished removing docker containers │ * The new Node site: http://104.131.8.107
docker: Error response from daemon: driver failed programming external connectivity on endpoint meteor-svel│
te-todos (d1661efbf30f24772a0638393138aa4e716ee1e7fd7c4649dc92dc188afe076f): Error starting userland proxy: listen │On the server:
tcp 0.0.0.0:80: bind: address already in use. │ * The Node.js application is served from /var/www/html
│ * The Node.js passwords and keys are saved in /root/.digitalocean_passwords
------------------------------------STDOUT------------------------------------ │
using image │For help and more information, visit http://do.co/node1804
removing last │
Image mup-meteor-svelte-todos:latest │********************************************************************************
Volume │To delete this message of the day: rm -rf /etc/update-motd.d/99-one-click
meteor-svelte-todos │Last login: Fri Aug 7 21:26:03 2020 from 71.85.242.243
678a411c4284d3eda4a24332c7b48be1140d195b5622463579b9c50c08fd51e1

A process on the server is already using port 80. Do you have any other apps or nginx running on it? If you want your Meteor app to run on a different port, you can change app.env.PORT in your mup config.

Thanks you so much @zodern! I’m getting closer to getting this to work. Now I think the issue is with the value of MONGO_URL. I have my MongoDB database running in MongoDB Atlas. I can connect to it from the cloud.mongodb.com website and using the MongoDB Compass app. I can see that it contains several databases each with several collections. It tells me the URL I should use is mongodb+srv://mvolkmann:@cluster0.tqq7g.mongodb.net/?retryWrites=true&w=majority

I use that as the value of app.env.MONGO_URL in my mup.js file with replaced with my MongoDB Atlas password and replaced with meteor. Does that sound right? I’m not sure if I should include those query parameters.

The error I get now when I run “mup deploy” is:
MongoNetworkError: failed to connect to server [cluster0-shard-00-01.tqq7g.mongodb.net:27017] on first connect [MongoNetworkError: connection 5 to cluster0-shard-00-01.tqq7g.mongodb.net:27017 closed

It’s likely that you need to whitelist the IP address of your DO droplet in Atlas. Just to test it out, Atlas has the option to temporarily whitelist everything. It’s somewhere in the left menu, under network connections or something similar.

More progress! I just needed to add the IP address of my DigitalOcean server under “Network Access” in MongoDB Atlas to fix the error above. Now when I run “mup deploy” I don’t get any errors. If I ssh to my DigitalOcean server and enter “netstat -tulpn” I see that I have process named “docker-proxy” that is listening on port 4000 which is the port I specified in my mup.js file. I can run by app now by browsing http://{ip-address}:4000!

Thanks so much @zodern!

3 Likes

Maybe Mup could show a warning when that happens? I just ran into the same issue and it would’ve been hard to debug without this thread…