I have a Meteor Application. I am trying to deploy my application by the custom deployment procedure (on my local machine) by following this article:
But I am facing this error when I run the application via node:
MongoError: failed to connect to server [192.168.100.2:9001] on first connect [MongoError: connect ECONNREFUSED 192.168.100.2:9001]
at Object.wait (/home/martini-henry/myapp-build/bundle/programs/server/node_modules/fibers/future.js:449:15)
at new MongoConnection (packages/mongo/mongo_driver.js:210:27)
at new MongoInternals.RemoteCollectionDriver (packages/mongo/remote_collection_driver.js:4:16)
at Object.<anonymous> (packages/mongo/remote_collection_driver.js:38:10)
at Object.defaultRemoteCollectionDriver (packages/underscore.js:784:19)
at new Mongo.Collection (packages/mongo/collection.js:99:40)
at AccountsServer.AccountsCommon (packages/accounts-base/accounts_common.js:23:18)
at AccountsServer (packages/accounts-base/accounts_server.js:18:5)
at server_main.js (packages/accounts-base/server_main.js:9:12)
at fileEvaluate (packages/modules-runtime.js:343:9)
- - - - -
at Pool.<anonymous> (/home/martini-henry/myapp-build/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/topologies/server.js:336:35)
at emitOne (events.js:96:13)
at Pool.emit (events.js:188:7)
at Connection.<anonymous> (/home/martini-henry/myapp-build/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/pool.js:280:12)
at Connection.g (events.js:292:16)
at emitTwo (events.js:106:13)
at Connection.emit (events.js:191:7)
at Socket.<anonymous> (/home/martini-henry/myapp-build/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/connection.js:187:49)
at Socket.g (events.js:292:16)
at emitOne (events.js:96:13)
Steps I performed:
First I came into the Meteor App directory and ran:
`meteor build ../myapp-build --architecture os.linux.x86_64`
Then I provided me the myapp.tar.gz and I extracted that.
Than I did:
- cd programs/server && npm install
- export MONGO_URL='mongodb://martini-henry:123456@192.168.100.2:9001/myappdb'
- export ROOT_URL='http://192.168.100.2:9000'
And at last when I ran:
`- cd ../.. node main.js`
I got that error above. What could be wrong here? Can anyone help me what I am doing wrong here?