Meteor中的Mongodb远程服务器连接问题?

时间:2015-01-21 06:25:04

标签: mongodb meteor remote-server

我需要了解Meteor中使用的Mongo数据库远程服务器连接。我做了如下所示的事情:

database = new MongoInternals.RemoteCollectionDriver("mongodb://x.x.x.x:3001/dbname");

我收到以下错误:

I20150121-11:51:14.066(5.5)? Exception in callback of async function: Error: failed to connect to [x.x.x.x:3001]
I20150121-11:51:14.066(5.5)?     at null.<anonymous> (/home/abc/.meteor/packages/mongo/.1.0.8.hj5n7c++os+web.browser+web.cordova/npm/node_modules/mongodb/lib/mongodb/connection/server.js:536:74)
I20150121-11:51:14.066(5.5)?     at emit (events.js:106:17)
I20150121-11:51:14.066(5.5)?     at null.<anonymous> (/home/abc/.meteor/packages/mongo/.1.0.8.hj5n7c++os+web.browser+web.cordova/npm/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:150:15)
I20150121-11:51:14.066(5.5)?     at emit (events.js:98:17)
I20150121-11:51:14.066(5.5)?     at Socket.<anonymous> (/home/abc/.meteor/packages/mongo/.1.0.8.hj5n7c++os+web.browser+web.cordova/npm/node_modules/mongodb/lib/mongodb/connection/connection.js:516:10)
I20150121-11:51:14.067(5.5)?     at Socket.emit (events.js:95:17)
I20150121-11:51:14.067(5.5)?     at net.js:440:14
I20150121-11:51:14.067(5.5)?     at process._tickCallback (node.js:419:13)

如何使用Meteor解决上述错误。所以请建议我为此做些什么。

0 个答案:

没有答案