I recently updated my app to version 1.2 (currently 1.2.0.2). I got things to a point where they seemed to be working for the most part, but after issuing
meteor reset
things went south. My data initialization code indicated that a bunch of users already existed. Then I noticed that my app was apparently not using port 3000 like it always had and meteor was not starting mongo:
=> Started proxy.
=> Started your app.
=> App running at: http://localhost:5000/
I recognized port 5000 as the port used by a separate meteor app (voicecode.io, an unrelated product that I purchased).
I donât think that port 5000 was actually being used by my app since I could still access the app at port 3000 and the other app still works at port 5000, but my app did seem to use port 5001 for mongo, which is disturbing. I want my app to just use ports 3000 and 3001, so I tried setting the port when starting meteor, but it still seems to behave the same way. If I close the other app (voicecode) and run my app then it cannot find mongo since it is looking at port 5001:
> /usr/local/bin/meteor --settings settings.test.json --port 3000
> [[[[[ ~/easy-bid ]]]]]
> => Started proxy.
> W20151004-12:12:12.466(-4)? (STDERR)
> W20151004-12:12:12.467(-4)? (STDERR) /Users/markphillips/.meteor/packages/meteor-tool/.1.1.9.1aa9gcm++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:278
> W20151004-12:12:12.468(-4)? (STDERR) throw(ex);
> W20151004-12:12:12.468(-4)? (STDERR) ^
> W20151004-12:12:12.468(-4)? (STDERR) Error: failed to connect to [127.0.0.1:5001]
> W20151004-12:12:12.468(-4)? (STDERR) at Object.Future.wait (/Users/markphillips/.meteor/packages/meteor-tool/.1.1.9.1aa9gcm++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:398:15)
> W20151004-12:12:12.468(-4)? (STDERR) at new MongoConnection (packages/mongo/mongo_driver.js:213:1)
> W20151004-12:12:12.468(-4)? (STDERR) at new MongoInternals.RemoteCollectionDriver (packages/mongo/remote_collection_driver.js:4:1)
> W20151004-12:12:12.468(-4)? (STDERR) at Object.<anonymous> (packages/mongo/remote_collection_driver.js:38:1)
> W20151004-12:12:12.468(-4)? (STDERR) at Object.defaultRemoteCollectionDriver (packages/underscore/underscore.js:750:1)
> W20151004-12:12:12.468(-4)? (STDERR) at new Mongo.Collection (packages/mongo/collection.js:98:1)
> W20151004-12:12:12.468(-4)? (STDERR) at AccountsServer.AccountsCommon (accounts_common.js:23:18)
> W20151004-12:12:12.468(-4)? (STDERR) at new AccountsServer (accounts_server.js:16:5)
> W20151004-12:12:12.468(-4)? (STDERR) at Package (globals_server.js:5:12)
> W20151004-12:12:12.469(-4)? (STDERR) at /Users/markphillips/easy-bid/.meteor/local/build/programs/server/packages/accounts-base.js:1813:4
> W20151004-12:12:12.469(-4)? (STDERR) - - - - -
> W20151004-12:12:12.469(-4)? (STDERR) at [object Object].<anonymous> (/Users/markphillips/.meteor/packages/npm-mongo/.1.4.39_1.15lx5z++os+web.browser+web.cordova/npm/node_modules/mongodb/lib/mongodb/connection/server.js:556:74)
> W20151004-12:12:12.469(-4)? (STDERR) at [object Object].emit (events.js:106:17)
> W20151004-12:12:12.469(-4)? (STDERR) at [object Object].<anonymous> (/Users/markphillips/.meteor/packages/npm-mongo/.1.4.39_1.15lx5z++os+web.browser+web.cordova/npm/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:156:15)
> W20151004-12:12:12.469(-4)? (STDERR) at [object Object].emit (events.js:98:17)
> W20151004-12:12:12.469(-4)? (STDERR) at Socket.<anonymous> (/Users/markphillips/.meteor/packages/npm-mongo/.1.4.39_1.15lx5z++os+web.browser+web.cordova/npm/node_modules/mongodb/lib/mongodb/connection/connection.js:534:10)
> W20151004-12:12:12.469(-4)? (STDERR) at Socket.emit (events.js:95:17)
> W20151004-12:12:12.469(-4)? (STDERR) at net.js:441:14
> W20151004-12:12:12.469(-4)? (STDERR) at process._tickCallback (node.js:448:13)
> => Exited with code: 8
I need meteor to spin up a mongo instance using port 3001 for my app. This all used to just happen, but now it doesnât and I donât know how to get things back to normal. This is related to https://github.com/meteor/meteor/issues/4986, but I think this is a little different since Iâm just trying to use the default ports.