【问题标题】:Meteor MongoDb connection on windowsWindows 上的 Meteor MongoDb 连接
【发布时间】:2016-06-01 16:20:16
【问题描述】:

我正在尝试在 Windows 上运行流星应用程序。

meteor --settings settings.json --port 3000

我收到此错误:

λ meteor --settings settings.json --port 3000
[[[[[ C:\Users\User\code\some_service ]]]]]

=> Started proxy.
=> Exited with code: 8
W20160518-08:35:40.664(2)? (STDERR)
W20160518-08:35:40.665(2)? (STDERR) C:\Users\User\AppData\Local\.meteor\packages\meteor-tool\1.3.2_4\mt-os.windows.x86_32\dev_bundle\server-lib\node_modules\fibers\future.js:278
W20160518-08:35:40.665(2)? (STDERR)                                             throw(ex);
W20160518-08:35:40.665(2)? (STDERR)                                                   ^
W20160518-08:35:40.665(2)? (STDERR) Error: failed to connect to [localhost:27017]
W20160518-08:35:40.665(2)? (STDERR)     at Object.Future.wait (C:\Users\User\AppData\Local\.meteor\packages\meteor-tool\1.3.2_4\mt-os.windows.x86_32\dev_bundle\server-lib\node_modules\fibers\future.js:398:15)
W20160518-08:35:40.665(2)? (STDERR)     at new MongoConnection (packages/mongo/mongo_driver.js:213:27)
W20160518-08:35:40.666(2)? (STDERR)     at new MongoInternals.RemoteCollectionDriver (packages/mongo/remote_collection_driver.js:4:16)
W20160518-08:35:40.666(2)? (STDERR)     at Object.<anonymous> (packages/mongo/remote_collection_driver.js:38:10)
W20160518-08:35:40.666(2)? (STDERR)     at Object.defaultRemoteCollectionDriver (packages/underscore/underscore.js:750:1)
W20160518-08:35:40.666(2)? (STDERR)     at new Mongo.Collection (packages/mongo/collection.js:102:40)
W20160518-08:35:40.666(2)? (STDERR)     at AccountsServer.AccountsCommon (packages/accounts-base/accounts_common.js:23:18)
W20160518-08:35:40.666(2)? (STDERR)     at new AccountsServer (packages/accounts-base/accounts_server.js:18:5)
W20160518-08:35:40.667(2)? (STDERR)     at meteorInstall.node_modules.meteor.accounts-base.server_main.js (packages/accounts-base/server_main.js:9:12)
W20160518-08:35:40.667(2)? (STDERR)     at fileEvaluate (packages/modules-runtime/.npm/package/node_modules/install/install.js:141:1)
W20160518-08:35:40.667(2)? (STDERR)     - - - - -
W20160518-08:35:40.667(2)? (STDERR)     at [object Object].<anonymous> (C:\Users\User\AppData\Local\.meteor\packages\npm-mongo\1.4.43\npm\node_modules\mongodb\lib\mongodb\connection\server.js:556:74)
W20160518-08:35:40.667(2)? (STDERR)     at [object Object].emit (events.js:106:17)
W20160518-08:35:40.667(2)? (STDERR)     at [object Object].<anonymous> (C:\Users\User\AppData\Local\.meteor\packages\npm-mongo\1.4.43\npm\node_modules\mongodb\lib\mongodb\connection\connection_pool.js:156:15)
W20160518-08:35:40.667(2)? (STDERR)     at [object Object].emit (events.js:98:17)
W20160518-08:35:40.668(2)? (STDERR)     at Socket.<anonymous> (C:\Users\User\AppData\Local\.meteor\packages\npm-mongo\1.4.43\npm\node_modules\mongodb\lib\mongodb\connection\connection.js:534:10)
W20160518-08:35:40.668(2)? (STDERR)     at Socket.emit (events.js:95:17)
W20160518-08:35:40.668(2)? (STDERR)     at net.js:441:14
W20160518-08:35:40.668(2)? (STDERR)     at process._tickCallback (node.js:458:13)

从堆栈跟踪中我得出结论,它无法建立与 mongo db 的连接。我调查了一下,他们说我应该从 mongo 3.2 降级到 3.0,因为 3.2 不兼容。

如果这是一个问题。如何在流星中更改 mongo 版本。

如果是其他问题,请指教。

我正在使用 METEOR@1.3.2.4 和节点 v0.10.43。该应用程序在 mac 和 ubuntu 上运行良好。

【问题讨论】:

    标签: windows mongodb meteor


    【解决方案1】:

    你是对的,你应该将你的 mongo 安装降级到 3.0 您的问题将得到解决。

    【讨论】:

    【解决方案2】:

    我之前找到了使用 Windows Server 2012 R2 而不是 Windows 10 的解决方案。没有其他更改,我只是在服务器上尝试了 sam 的东西,它工作了。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-07-27
      • 1970-01-01
      • 2015-08-21
      • 1970-01-01
      • 2014-02-18
      • 1970-01-01
      • 2015-01-23
      • 2015-10-05
      相关资源
      最近更新 更多