Use CosmoDB as Mongo replacement



  • Hi I am trying to do a fresh install on CosmoDB azure's mongo compatible database. Link To Example
    And I am getting a error below. I have gotten it to successfully to right through to the datastore at one point so i know it can work but after it then fails on the read. Has anyone successfully gotten his to work?

    Error: listen EADDRINUSE :::36887
    at Object.exports._errnoException (util.js:1020:11)
    at exports._exceptionWithHostPort (util.js:1043:20)
    at Agent.Server._listen2 (net.js:1258:14)
    at listen (net.js:1294:10)
    at net.js:1404:9
    at _combinedTickCallback (internal/process/next_tick.js:83:11)


  • Global Moderator

    What is your config.json? The EADDRINUSE exception usually occurs because you're trying to run nodebb while another instance is already running. Have you tried killing other node processes?



  • @pitaj

    I restarted and now when I
    from the command line installer "./nodebb install" I get this error

    26/10 12:20:12 [41716] - warn: NodeBB Setup Aborted.
    MongoError: Syntax error, incorrect syntax near '12'.
    at Function.MongoError.create (C:\dev\source\nodebb\10-26\NodeBB\node_modules\mongodb-core\lib\error.js:31:11)
    at queryCallback (C:\dev\source\nodebb\10-26\NodeBB\node_modules\mongodb-core\lib\cursor.js:197:34)
    at C:\dev\source\nodebb\10-26\NodeBB\node_modules\mongodb-core\lib\connection\pool.js:469:18
    at _combinedTickCallback (internal/process/next_tick.js:73:7)
    at process._tickCallback (internal/process/next_tick.js:104:9)

    this is the function throwing the error

    /**

    • Creates a new MongoError object
    • @method
    • @param {object} options The error options
    • @return {MongoError} A MongoError instance
      */
      MongoError.create = function(options) {
      var err = null;

    if(options instanceof Error) {
    err = new MongoError(options.message);
    err.stack = options.stack;
    } else if(typeof options == 'string') {
    err = new MongoError(options);
    } else {
    err = new MongoError(options.message || options.errmsg || options.$err || "n/a");
    // Other options
    for(var name in options) {
    err[name] = options[name];
    }
    }

    return err;
    }

    this is the mongo connection string.. Its currently live if you want to give it a try..
    mongodb://10-25-2017-nodebb:1jMyMreYQwdIb6qVGjGsOvaJJwjdtiqmTcp9HLXUCurimHGDiIdTTi0Nur8lRlDV5FXdYXkWaiUDFcPzvfpfrg==@10-25-2017-nodebb.documents.azure.com:10255/?ssl=true&replicaSet=globaldb
    its on a free trial account that ill delete shortly.

    as you can see by the data explorer it installed on the instance at one point.
    ![0_1509077576474_0af16d55-b37f-439d-94c4-3b551589396c-image.png](Uploading 100%)


  • Global Moderator

    What's node -v?

    Also, ./nodebb setup is the command line installer.



  • @PitaJ

    node = 6.11.2
    npm = 5.5.1


 

Suggested Topics

  • 7
  • 3
  • 8
  • 5
  • 3
| |