简体   繁体   中英

Error connecting meteor to external mongodb

I have a meteor web app that connects to a mongohq database. It's working correctly on heroku, but I can't get it to work on my localhost. It was working on localhost yesterday, but not today.

To be certain, I just ran a git clone in a new folder. Even this clone is throwing errors on localhost. Here's my terminal (FYI, I'm on a windows 8.1 machine that is running an Ubuntu virtual box; also, I've removed the username / password from the log, below):

adam@adam-VirtualBox:~/resSingleTestV2/faze1tables$ export MONGO_URL=mongodb://<username>:<password>@oceanic.mongohq.com:10033/test_db
adam@adam-VirtualBox:~/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)

Any help appreciated. Thanks.

I'm connecting via my school's wifi. Turns out they must've done something to prevent me from connecting to mongoHQ because I'm able to connect via other networks.

Strange that it worked for a day or two and then stopped.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM