Socioboard-5.0
Socioboard-5.0 copied to clipboard
ECONNREFUSED 127.0.0.1:27017
When starting nodemon user.server.js I get the follwing error:
Unhandled` Rejection: MongooseServerSelectionError: connect ECONNREFUSED 127.0.0.1:27017
at NativeConnection.Connection.openUri (/var/www/html/socioboard/socioboard-api/Common/node_modules/mongoose/lib/connection.js:847:32)
at /var/www/html/socioboard/socioboard-api/Common/node_modules/mongoose/lib/index.js:351:10
at /var/www/html/socioboard/socioboard-api/Common/node_modules/mongoose/lib/helpers/promiseOrCallback.js:32:5
at new Promise (<anonymous>)
at promiseOrCallback (/var/www/html/socioboard/socioboard-api/Common/node_modules/mongoose/lib/helpers/promiseOrCallback.js:31:10)
at Mongoose._promiseOrCallback (/var/www/html/socioboard/socioboard-api/Common/node_modules/mongoose/lib/index.js:1149:10)
at Mongoose.connect (/var/www/html/socioboard/socioboard-api/Common/node_modules/mongoose/lib/index.js:350:20)
at file:///var/www/html/socioboard/socioboard-api/Common/Mongoose/connect.js:22:9
at new Promise (<anonymous>)
at MongoConnect.initialize (file:///var/www/html/socioboard/socioboard-api/Common/Mongoose/connect.js:20:12)
at MongoConnect.initialize (file:///var/www/html/socioboard/socioboard-api/User/resources/database/mongo.database.js:11:22)
at file:///var/www/html/socioboard/socioboard-api/User/user.server.js:182:28
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
reason: TopologyDescription {
type: 'Single',
setName: null,
maxSetVersion: null,
maxElectionId: null,
servers: Map(1) { '127.0.0.1:27017' => [ServerDescription] },
stale: false,
compatible: true,
compatibilityError: null,
logicalSessionTimeoutMinutes: null,
heartbeatFrequencyMS: 10000,
localThresholdMS: 15,
commonWireVersion: null
development.json file looks like this:
"mongo": { "username": "socioboarduser", "password": "password", "host": "127.0.0.1", "db_name": "socioboarddb" },
I have tries changing this to localhost but the same error.
Can you please help?
Have you set up mongodb to accept those credentials? See docker/socioboard/init-mongo.js if you're not sure how.
Yes, mongo creds are good. Is there a docker version of socioboardV5? Is the docker version easier to get up and running than on baremetal?
@splitatom44 Yes, see my fork for the latest Docker stuff but it should be merged soon.