2

I have an app without database functionality today I added some simple sitemap code with Mongo collection to app and test it locally all of things worked well but when I deployed application to meteor hosting with meteor deploy command my app crashed. I give this detail from meteor logs command:

[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

And this is my sitemap.xml code:

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;
});

Please guide me how to fix this issue on deployment. On the local machine all things working right. )-:


After two days there is still a problem. My site is still not available and this is error:

This site has crashed.
Site administrators can examine the logs with:
meteor logs example.com
Retrying in x seconds...
5
  • This is likely a temporary glitch with the Meteor deploy servers. It should solve itself if you redeploy the app.
    – Tarang
    Jun 24, 2015 at 8:54
  • I test again today but app crashed again )-:
    – b24
    Jun 25, 2015 at 4:53
  • After two days there is still a problem. My site is still not available. All of things OK on local )-:
    – b24
    Jun 26, 2015 at 8:32
  • 1
    Try deleting it using meteor deploy xxx.meteor.com --delete before you redeploy it
    – Tarang
    Jun 26, 2015 at 11:21
  • Awwwsome it's working now. Thanks @Akshat. Please answer to question as a post for end of story.
    – b24
    Jun 26, 2015 at 11:56

1 Answer 1

4

It seems to be an error in the way the deploy scripts set up your deployment that has nothing to do with your code. To fix it, the app must first be deleted then re-deployed (or simply deployed under a different name):

meteor deploy xxx --delete
meteor deploy xxx

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.