socioboard / Socioboard-5.0

Socioboard is world's first and open source Social Technology Enabler. Socioboard Core is our flagship product.
http://www.socioboard.org
Other
1.16k stars 365 forks source link

ECONNREFUSED 127.0.0.1:27017 #383

Open splitatom44 opened 2 years ago

splitatom44 commented 2 years ago

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?

vaughngx4 commented 2 years ago

Have you set up mongodb to accept those credentials? See docker/socioboard/init-mongo.js if you're not sure how.

splitatom44 commented 2 years ago

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?

vaughngx4 commented 2 years ago

@splitatom44 Yes, see my fork for the latest Docker stuff but it should be merged soon.