Skip to content

Cannot connect to mongodb #165

@scmanjarrez

Description

@scmanjarrez

Steps to Reproduce

  1. Do a fresh git clone of the repository
  2. bin/init
  3. bin/docker-compose up
  4. sharelatex container keeps restarting due to being unable to connect to mongodb

Expected Behaviour

sharelatex should start normally

Traceback

sharelatex  | Cannot connect to mongodb
sharelatex  | MongooseServerSelectionError: Server selection timed out after 60000 ms
sharelatex  |     at NativeConnection.Connection.openUri (/overleaf/services/web/node_modules/mongoose/lib/connection.js:825:32)
sharelatex  |     at /overleaf/services/web/node_modules/mongoose/lib/index.js:411:10
sharelatex  |     at /overleaf/services/web/node_modules/mongoose/lib/helpers/promiseOrCallback.js:41:5
sharelatex  |     at new Promise (<anonymous>)
sharelatex  |     at promiseOrCallback (/overleaf/services/web/node_modules/mongoose/lib/helpers/promiseOrCallback.js:40:10)
sharelatex  |     at Mongoose._promiseOrCallback (/overleaf/services/web/node_modules/mongoose/lib/index.js:1285:10)
sharelatex  |     at Mongoose.connect (/overleaf/services/web/node_modules/mongoose/lib/index.js:410:20)
sharelatex  |     at Object.<anonymous> (/overleaf/services/web/app/src/infrastructure/Mongoose.js:19:36)
sharelatex  |     at Module._compile (node:internal/modules/cjs/loader:1196:14)
sharelatex  |     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1250:10) {
sharelatex  |   reason: TopologyDescription {
sharelatex  |     type: 'Unknown',
sharelatex  |     servers: Map(1) { 'mongo:27017' => [ServerDescription] },
sharelatex  |     stale: false,
sharelatex  |     compatible: true,
sharelatex  |     heartbeatFrequencyMS: 10000,
sharelatex  |     localThresholdMS: 15,
sharelatex  |     setName: null,
sharelatex  |     maxElectionId: null,
sharelatex  |     maxSetVersion: null,
sharelatex  |     commonWireVersion: 0,
sharelatex  |     logicalSessionTimeoutMinutes: null
sharelatex  |   },
sharelatex  |   code: undefined
sharelatex  | }
sharelatex  | *** /etc/my_init.d/98_check_db_access.sh failed with status 1
sharelatex  |
sharelatex  | *** Killing all processes...
sharelatex  | May 30 14:45:22 cae0489f064c syslog-ng[60]: syslog-ng shutting down; version='3.25.1'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions