流星主机上的流星部署错误

Meteor deploy error on meteor host

我今天有一个没有数据库功能的应用程序,我添加了一些简单的 sitemap 代码和 Mongo 集合到应用程序并在本地测试它所有的东西都运行良好但是当我将应用程序部署到流星托管时meteor deploy 命令我的应用程序崩溃了。我从 meteor logs 命令中给出了这个细节:

[Wed Jun 24 2015 08:01:42 GMT+0000 (UTC)] WARNING MongoError: auth fails
at Object.Future.wait
(/meteor/dev_bundles/0.4.18/lib/node_modules/fibers/future.js:398:15)
at new MongoConnection (packages/mongo/mongo_driver.js:213:1)
at new MongoInternals.RemoteCollectionDriver
(packages/mongo/remote_collection_driver.js:4:1)
at Object.<anonymous> (packages/mongo/remote_collection_driver.js:38:1)
at Object.defaultRemoteCollectionDriver
(packages/underscore/underscore.js:750:1)
at new Mongo.Collection (packages/mongo/collection.js:98:1)
at app/server/sitemap.js:1:44
at app/server/sitemap.js:22:3
at
/meteor/containers/9d7d4183-ba55-fb30-3eb2-d6bceabe37e2/bundle/programs/server/boot.js:222:10
at Array.forEach (native)
- - - - -
at Object.toError
(/meteor/containers/9d7d4183-ba55-fb30-3eb2-d6bceabe37e2/bundle/programs/server/npm/mongo/node_modules/mongodb/lib/mongodb/utils.js:114:11)
at
/meteor/containers/9d7d4183-ba55-fb30-3eb2-d6bceabe37e2/bundle/programs/server/npm/mongo/node_modules/mongodb/lib/mongodb/db.js:1194:31
at
/meteor/containers/9d7d4183-ba55-fb30-3eb2-d6bceabe37e2/bundle/programs/server/npm/mongo/node_modules/mongodb/lib/mongodb/db.js:1903:9
at Server.Base._callHandler
(/meteor/containers/9d7d4183-ba55-fb30-3eb2-d6bceabe37e2/bundle/programs/server/npm/mongo/node_modules/mongodb/lib/mongodb/connection/base.js:453:41)
at
/meteor/containers/9d7d4183-ba55-fb30-3eb2-d6bceabe37e2/bundle/programs/server/npm/mongo/node_modules/mongodb/lib/mongodb/connection/server.js:487:18
at [object Object].MongoReply.parseBody
(/meteor/containers/9d7d4183-ba55-fb30-3eb2-d6bceabe37e2/bundle/programs/server/npm/mongo/node_modules/mongodb/lib/mongodb/responses/mongo_reply.js:68:5)
at [object Object].<anonymous>
(/meteor/containers/9d7d4183-ba55-fb30-3eb2-d6bceabe37e2/bundle/programs/server/npm/mongo/node_modules/mongodb/lib/mongodb/connection/server.js:445:20)
at [object Object].emit (events.js:95:17)
at [object Object].<anonymous>
(/meteor/containers/9d7d4183-ba55-fb30-3eb2-d6bceabe37e2/bundle/programs/server/npm/mongo/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:207:13)
at [object Object].emit (events.js:98:17)
[Wed Jun 24 2015 08:01:42 GMT+0000 (UTC)] ERROR Application crashed with code:
8
[Wed Jun 24 2015 08:01:42 GMT+0000 (UTC)] INFO STATUS running -> waiting
[Wed Jun 24 2015 08:01:45 GMT+0000 (UTC)] INFO HIT / 89.165.17.140

这是我的 sitemap.xml 代码:

Pages = new Mongo.Collection("pages");

// https://atmospherejs.com/gadicohen/sitemaps
sitemaps.add('/sitemap.xml', function() {

    var out = [], pages = Pages.find().fetch();
    out.push({
        page: '/',
        lastmod: new Date(),
        changefreq: 'always'
    });
    _.each(pages, function(page) {
        out.push({
            page: page.url,
            lastmod: page.lastUpdated,
            changefreq: 'weekly'
        });
    });
    return out;
});

请指导我如何在部署时解决此问题。在本地机器上一切正常。 )-:


过了两天还是有问题。我的网站仍然不可用,这是错误:

This site has crashed.
Site administrators can examine the logs with:
meteor logs example.com
Retrying in x seconds...

部署脚本设置部署的方式似乎有误,与您的代码无关。要修复它,必须先删除应用程序然后重新部署(或简单地以不同的名称部署):

meteor deploy xxx --delete
meteor deploy xxx