I have a error when I run my app.
Application Error. An error occurred in the application and your page could not be served. Please try again in a few moments.
If you are the application owner, check your logs for details.
The Heroku logs:
May 05 08:17:00 game app/web.1: > node app.js
May 05 08:17:04 game app/web.1: error: Error: Failed to connect to MongoDB. Are you sure your configured Mongo instance is running?
May 05 08:17:04 game app/web.1: Error details:
May 05 08:17:04 game app/web.1: { [MongoError: connect ECONNREFUSED] name: 'MongoError', message: 'connect ECONNREFUSED' }
May 05 08:17:04 game app/web.1: at _createError (/app/node_modules/sails-mongo/lib/adapter.js:101:23)
May 05 08:17:04 game app/web.1: at /app/node_modules/sails-mongo/lib/adapter.js:104:13
May 05 08:17:04 game app/web.1: at /app/node_modules/sails-mongo/lib/connection.js:25:20
May 05 08:17:04 game app/web.1: at /app/node_modules/sails-mongo/node_modules/mongodb/lib/mongo_client.js:236:20
May 05 08:17:04 game app/web.1: at /app/node_modules/sails-mongo/node_modules/mongodb/lib/db.js:197:14
May 05 08:17:04 game app/web.1: at null.<anonymous> (/app/node_modules/sails-mongo/node_modules/mongodb/lib/server.js:226:9)
May 05 08:17:04 game app/web.1: at g (events.js:199:16)
May 05 08:17:04 game app/web.1: at emit (events.js:110:17)
May 05 08:17:04 game app/web.1: at null.<anonymous> (/app/node_modules/sails-mongo/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:239:68)
May 05 08:17:04 game app/web.1: at g (events.js:199:16)
May 05 08:17:04 game app/web.1: at emit (events.js:110:17)
May 05 08:17:04 game app/web.1: at null.<anonymous> (/app/node_modules/sails-mongo/node_modules/mongodb/node_modules/mongodb-core/lib/connection/pool.js:77:12)
May 05 08:17:04 game app/web.1: at g (events.js:199:16)
May 05 08:17:04 game app/web.1: at emit (events.js:110:17)
May 05 08:17:04 game app/web.1: at Socket.<anonymous> (/app/node_modules/sails-mongo/node_modules/mongodb/node_modules/mongodb-core/lib/connection/connection.js:118:49)
May 05 08:17:04 game app/web.1: at Socket.g (events.js:199:16) { [Error: Failed to connect to MongoDB. Are you sure your configured Mongo instance is running?
May 05 08:17:04 game app/web.1: Error details:
May 05 08:17:04 game app/web.1: { [MongoError: connect ECONNREFUSED] name: 'MongoError', message: 'connect ECONNREFUSED' }]
May 05 08:17:04 game app/web.1: originalError: { [MongoError: connect ECONNREFUSED] name: 'MongoError', message: 'connect ECONNREFUSED' } }
May 05 08:17:04 game app/web.1: /app/node_modules/sails-mongo/node_modules/mongodb/lib/mongo_client.js:385
May 05 08:17:04 game app/web.1: throw err
May 05 08:17:04 game app/web.1: ^
May 05 08:17:04 game app/web.1: TypeError: Cannot set property 'connection' of undefined
May 05 08:17:04 game app/web.1: at /app/node_modules/sails-mongo/lib/adapter.js:106:53
May 05 08:17:04 game app/web.1: npm ERR! Linux 3.13.0-49-generic
May 05 08:17:04 game app/web.1: npm ERR! code ELIFECYCLE
May 05 08:17:04 game app/web.1: npm ERR! gameMouseCat@0.0.0 start: `node app.js`
May 05 08:17:04 game app/web.1: npm ERR! Exit status 1
May 05 08:17:04 game app/web.1: npm ERR!
May 05 08:17:04 game app/web.1: npm ERR! Failed at the gameMouseCat@0.0.0 start script 'node app.js'.
May 05 08:17:04 game app/web.1: npm ERR! This is most likely a problem with the gameMouseCat package,
May 05 08:17:04 game app/web.1: npm ERR! not with npm itself.
May 05 08:17:04 game app/web.1: npm ERR! Tell the author that this fails on your system:
May 05 08:17:04 game app/web.1: npm ERR! node app.js
May 05 08:17:04 game app/web.1: at /app/node_modules/sails-mongo/lib/connection.js:31:5
May 05 08:17:04 game app/web.1: at /app/node_modules/sails-mongo/node_modules/mongodb/lib/mongo_client.js:382:15
May 05 08:17:04 game app/web.1: at process._tickDomainCallback (node.js:381:11)
May 05 08:17:04 game app/web.1: npm ERR! argv "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start"
May 05 08:17:04 game app/web.1: npm ERR! node v0.12.2
May 05 08:17:04 game app/web.1: npm ERR! npm v2.7.4
May 05 08:17:04 game app/web.1: npm ERR! Please include the following file with any support request:
May 05 08:17:04 game app/web.1: npm ERR! /app/npm-debug.log
May 05 08:17:04 game app/web.1: npm ERR! You can get their info via:
May 05 08:17:04 game app/web.1: npm ERR! npm owner ls gameMouseCat
May 05 08:17:04 game app/web.1: npm ERR! There is likely additional logging output above.
May 05 08:17:05 game heroku/web.1: State changed from starting to crashed
May 05 08:17:05 game heroku/web.1: Process exited with status 1
May 05 08:19:38 game heroku/router: at=error code=H10 desc="App crashed" method=GET path="/" host=game .herokuapp.com request_id=5c4b7249-ad10-492d-acd0-efb4fbd314ed fwd="207.244.77.3" dyno= connect= service= status=503 bytes=
May 05 08:19:56 game heroku/router: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=game .herokuapp.com request_id=9678ba10-05ea-4a38-806f-12565e0ded63 fwd="207.244.77.3" dyno= connect= service= status=503 bytes=
Adapter configuration:
MongodbHerokuServer: {
adapter: 'sails-mongo',
url: process.env.MONGOLAB_URI
},
Can anyone help me? I don't know what to do to resolve this issue.