zodern / meteor-up

Production Quality Meteor Deployment to Anywhere
http://meteor-up.com/
MIT License
1.27k stars 280 forks source link

MongoServerSelectionError: connect ECONNREFUSED #1334

Open make-github-pseudonymous-again opened 1 year ago

make-github-pseudonymous-again commented 1 year ago

Mup version (mup --version): 1.5.9

I get the following error after a successful deployment of a Meteor 2.5.6 app. The app keeps restarting trying to connect to the database. Is this error potentially originated in how Mup configures the database connection (MongoDB 4.4)?

[<hostname>]/built_app/programs/server/node_modules/fibers/future.js:313
[<hostname>]                                              throw(ex);
[<hostname>]                                              ^
[<hostname>]
[<hostname>]MongoServerSelectionError: connect ECONNREFUSED 127.0.0.1:27017
[<hostname>]    at Timeout._onTimeout (/built_app/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/core/sdam/topology.js:437:30)
[<hostname>]    at listOnTimeout (internal/timers.js:557:17)
[<hostname>]    at processTimers (internal/timers.js:500:7) {
[<hostname>]  reason: TopologyDescription {
[<hostname>]    type: 'ReplicaSetNoPrimary',
[<hostname>]    setName: 'meteor',
[<hostname>]    maxSetVersion: 2,
[<hostname>]    maxElectionId: ObjectID {
[<hostname>]      _bsontype: 'ObjectID',
[<hostname>]      id: Buffer(12) [Uint8Array] [
[<hostname>]        127, 255, 255, 255, 0,
[<hostname>]          0,   0,   0,   0, 0,
[<hostname>]          0, 124
[<hostname>]      ]
[<hostname>]    },
[<hostname>]    servers: Map(1) {
[<hostname>]      '127.0.0.1:27017' => ServerDescription {
[<hostname>]        address: '127.0.0.1:27017',
[<hostname>]        error: Error: connect ECONNREFUSED 127.0.0.1:27017
[<hostname>]            at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1159:16) {
[<hostname>]          name: 'MongoNetworkError'
[<hostname>]        },
[<hostname>]        roundTripTime: -1,
[<hostname>]        lastUpdateTime: 39809948,
[<hostname>]        lastWriteDate: null,
[<hostname>]        opTime: null,
[<hostname>]        type: 'Unknown',
[<hostname>]        topologyVersion: undefined,
[<hostname>]        minWireVersion: 0,
[<hostname>]        maxWireVersion: 0,
[<hostname>]        hosts: [],
[<hostname>]        passives: [],
[<hostname>]        arbiters: [],
[<hostname>]        tags: []
[<hostname>]      }
[<hostname>]    },
[<hostname>]    stale: false,
[<hostname>]    compatible: true,
[<hostname>]    compatibilityError: null,
[<hostname>]    logicalSessionTimeoutMinutes: null,
[<hostname>]    heartbeatFrequencyMS: 10000,
[<hostname>]    localThresholdMS: 15,
[<hostname>]    commonWireVersion: 9
[<hostname>]  }
[<hostname>]}