0
我有一個連接到mongohq數據庫的流星web應用程序。它在heroku上正常工作,但我無法讓它在我的本地主機上工作。它昨天在localhost上工作,但不是今天。將流星連接到外部mongodb時出錯
爲了確定,我只是在一個新文件夾中運行了一個git克隆。即使這個克隆也在本地主機上拋出錯誤。這是我的終端(僅供參考,我正在運行Ubuntu的虛擬框窗8.1的機器上;還有,我已經移除日誌的用戶名/密碼,下同):
[email protected]:~/resSingleTestV2/faze1tables$ export MONGO_URL=mongodb://<username>:<password>@oceanic.mongohq.com:10033/test_db
[email protected]:~/resSingleTestV2/faze1tables$ meteor
[[[[[ ~/resSingleTestV2/faze1tables ]]]]]
=> Started proxy.
=> Started your app.
=> App running at: http://localhost:3000/
I20140511-12:53:43.438(-4)? Exception in callback of async function: Error: failed to connect to [oceanic.mongohq.com:10033]
I20140511-12:53:43.637(-4)? at null.<anonymous> (/home/adam/.meteor/packages/mongo-livedata/0120179b5c/npm/node_modules/mongodb/lib/mongodb/connection/server.js:536:74)
I20140511-12:53:43.640(-4)? at EventEmitter.emit (events.js:106:17)
I20140511-12:53:43.641(-4)? at null.<anonymous> (/home/adam/.meteor/packages/mongo-livedata/0120179b5c/npm/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:150:15)
I20140511-12:53:43.641(-4)? at EventEmitter.emit (events.js:98:17)
I20140511-12:53:43.643(-4)? at Socket.<anonymous> (/home/adam/.meteor/packages/mongo-livedata/0120179b5c/npm/node_modules/mongodb/lib/mongodb/connection/connection.js:516:10)
I20140511-12:53:43.643(-4)? at Socket.EventEmitter.emit (events.js:95:17)
I20140511-12:53:43.644(-4)? at net.js:440:14
I20140511-12:53:43.644(-4)? at process._tickCallback (node.js:415:13)
任何幫助表示讚賞。謝謝。
只需卸載並重新安裝流星。問題依然存在。 – Adam
我剛剛測試連接到本地的mongodb,並且一切正常。奇怪的是,我的Heroku應用程序正在運行並連接到mongoHQ,但我不能在本地。 – Adam
也許嘗試用引號包圍網址:'MONGO_URL =「...」流星「 –