I want my meteor application to connect to a remote database. I thought I could deploy two applications: one that installs the database on the server, and the other that hosts the application, but connects to the database on another server. I have problems with work, but I'm also wondering if this is recommended or not? Should I set up the mongodb database on a server without mup / meteor or can I use mup to install this for me?
What I tried and cannot work:
I am using two instances of amazon ec2 (ubuntu 14.04). I applied the following security rules for both instances:
Custom TCP Port: 27017 Source: instance-public-ip-1/32
Custom TCP Port: 27017 Source: instance-public-ip-2/32
HTTP Port: 80 Source: All Addresses
SSH Port: 22 Source: My IP
In the mup.json file for the application trying to access the remote database, I added "MONGO_URL": "mongodb: // db-instance-public-ip: 27017 / db" in the "env" section, and db is the name of the application in this instance.
The meteor shower application that hosts the database is successfully deployed, but the meteor shower app that hosts the application does not work. Deployment failed during the "Deploying calling process", and here is STDERR / STDOUT: (XXX.XXX.XXX.XXX is the instance's public IP address)
x Deployment Challenge: FAILED
-----------------------------------STDERR-----------------------------------
npm WARN package.json meteor-dev-bundle@0.0.0 No description
npm WARN package.json meteor-dev-bundle@0.0.0 No repository field.
npm WARN package.json meteor-dev-bundle@0.0.0 No README data
/usr/lib/node_modules/wait-for-mongo/bin/wait-for-mongo:14
throw err;
^
Error: TIMEOUTED_WAIT_FOR_MONGO
at null._onTimeout (/usr/lib/node_modules/wait-for-mongo/lib/waitForMongo.js:20:14)
at Timer.listOnTimeout [as ontimeout] (timers.js:112:15)
-----------------------------------STDOUT-----------------------------------
56.145:27017]
wait-for-mongo: failed to connect to [XXX.XXX.XXX.XXX:27017]
wait-for-mongo: failed to connect to [XXX.XXX.XXX.XXX:27017]
wait-for-mongo: failed to connect to [XXX.XXX.XXX.XXX:27017]
wait-for-mongo: failed to connect to [XXX.XXX.XXX.XXX:27017]
wait-for-mongo: failed to connect to [XXX.XXX.XXX.XXX:27017]
wait-for-mongo: failed to connect to [XXX.XXX.XXX.XXX:27017]
wait-for-mongo: failed to connect to [XXX.XXX.XXX.XXX:27017]
wait-for-mongo: failed to connect to [XXX.XXX.XXX.XXX:27017]
wait-for-mongo: failed to connect to [XXX.XXX.XXX.XXX:27017]
wait-for-mongo: failed to connect to [XXX.XXX.XXX.XXX:27017]
wait-for-mongo: failed to connect to [XXX.XXX.XXX.XXX:27017]
wait-for-mongo: failed to connect to [XXX.XXX.XXX.XXX:27017]
wait-for-mongo: failed to connect to [XXX.XXX.XXX.XXX:27017]
wait-for-mongo: failed to connect to [XXX.XXX.XXX.XXX:27017]
wait-for-mongo: failed to connect to [XXX.XXX.XXX.XXX:27017]
wait-for-mongo: failed to connect to [XXX.XXX.XXX.XXX:27017]
wait-for-mongo: failed to connect to [XXX.XXX.XXX.XXX:27017]
----------------------------------------------------------------------------
Let me know if additional information is needed. The question is also posted here: https://github.com/arunoda/meteor-up/issues/450
source
share