Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ECONNREFUSED 127.0.0.1:27017 #383

Open
splitatom44 opened this issue Jul 10, 2022 · 3 comments
Open

ECONNREFUSED 127.0.0.1:27017 #383

splitatom44 opened this issue Jul 10, 2022 · 3 comments

Comments

@splitatom44
Copy link

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
Copy link
Contributor

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

@splitatom44
Copy link
Author

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
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants