radiegtya / meteoris2

a Realtime Javascript Boilerplate base on Meteor Js Framework
MIT License
246 stars 46 forks source link

Meteoris only works with local Mongo. #48

Closed martinhbramwell closed 9 years ago

martinhbramwell commented 9 years ago

I run Meteoris successfully with :

 sudo meteor

It crashes with :

export MONGO_URL=mongodb://someotherserver:27017/meteoris
sudo meteor

The error report is :

 /home/yourself/.meteor/packages/meteor-tool/.1.0.45.tyuyjj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:278
                        throw(ex);
                              ^
 Error: failed to connect to [localhost:3001]
     at Object.Future.wait (/home/yourself/.meteor/packages/meteor-tool/.1.0.45.tyuyjj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:398:15)
     at packages/meteor/helpers.js:119:1
     at new FS.StorageAdapter (packages/cfs:storage-adapter/storageAdapter.server.js:252:1)
     at new FS.Store.GridFS (packages/cfs:gridfs/gridfs.server.js:46:1)
     at app/lib/collections/Images.js:1:53
     at app/lib/collections/Images.js:35:3
     at /home/yourself/projects/meteoris/.meteor/local/build/programs/server/boot.js:222:10
     at Array.forEach (native)
     at Function._.each._.forEach (/home/yourself/.meteor/packages/meteor-tool/.1.0.45.tyuyjj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11)
     at /home/yourself/projects/meteoris/.meteor/local/build/programs/server/boot.js:117:5
     - - - - -
     at [object Object].<anonymous> (/home/yourself/.meteor/packages/cfs_gridfs/.0.0.33.kqwg4v++os.linux.x86_64+web.browser+web.cordova/npm/node_modules/mongodb/lib/mongodb/connection/server.js:556:74)
     at [object Object].emit (events.js:106:17)
     at [object Object].<anonymous> (/home/yourself/.meteor/packages/cfs_gridfs/.0.0.33.kqwg4v++os.linux.x86_64+web.browser+web.cordova/npm/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:156:15)
     at [object Object].emit (events.js:98:17)
     at Socket.<anonymous> (/home/yourself/.meteor/packages/cfs_gridfs/.0.0.33.kqwg4v++os.linux.x86_64+web.browser+web.cordova/npm/node_modules/mongodb/lib/mongodb/connection/connection.js:534:10)
     at Socket.emit (events.js:95:17)
     at net.js:441:14
     at process._tickCallback (node.js:442:13)

If there is a known workaround or solution please let me know ASAP:

radiegtya commented 9 years ago

Hello Martin,

I am pretty sure that your regular meteor also get the same error. So rather than using set environment, you better try using mup by arunoda and try to make it CI (continues integration).

martinhbramwell commented 9 years ago

Every default Meteor installation will create a private copy of Mongo and grab up 503Mb of disk space for each one in the directory .meteor/local/db/journal.

I have dozens of little experiments with Meteor. I work in small KVM virtual machines and found that specifying MONGO_URL, after calling meteor create, but before starting up meteor, allows me to concentrate all their Mongo DB databases in a single instance of Mongo in a single VM. The journal directory never gets created. I have been using this technique for months.

CI and mup have nothing to do with the problem. If I git clone Meteoris and run it, it grabs 503Mb of disk space consistently. If I git clone Meteoris and run it, specifying MONGO_URL, it crashes consistently.

chicoboymax commented 9 years ago

I get the same error, when running meteoris locally with 'meteor' it runs well but when deploying to meteor.com with 'meteor deploy XXXX.meteor.com' i get the same message .

radiegtya commented 9 years ago

Hi @martinhbramwell and @chicoboymax

Have you setting up your configuration file at lib/applications/meteoris/configs/config.js and setup the correct mongoURL ?

martinhbramwell commented 9 years ago

WONDERFUL ! Thank you! Thank you! Thank you! Thank you!

:-)

radiegtya commented 9 years ago

Ok then I'll close this, just open it up when you get another problem

afareed007 commented 8 years ago

the problem is back again. I cannot change the local MONGO_URL to any other db even another local Mongo database. Tried all above adding MONGO_URL in packages/met../lib/application/configs/config.js as well as settings.json but it does not seems to let go of the local mongodb that it creates on port 3001