Skip to content

Parse does not re-authorize connection to MongoDB #3775

Closed
@MihalySzabo

Description

@MihalySzabo

Issue Description

If the user that Parse uses to connect to MongoDB is deleted, Parse will not be able to fetch any data from the DB - as expected. But if the user is put back, Parse will still not get any data until restart.

Steps to reproduce

  • Set up Parse with MongoDB using for authentication.
  • If everything is OK (Parse can access the DB normally), delete from MongoDB.
  • Parse starts to throw errors like: Uncaught internal server error. { MongoError: not authorized on to execute command { find: "_SCHEMA", filter: {} }
  • Add back to MongoDB.

Expected Results

Parse should continue to access MongoDB normally.

Actual Outcome

Parse throws errors until restart.

Environment Setup

  • Server

    • parse-server version: 2.3.8
    • Operating System: 64bit Amazon Linux 2016.09 v4.0.1 running Node.js
    • Hardware: t2.micro
    • Localhost or remote server? (AWS, Heroku, Azure, Digital Ocean, etc): AWS
  • Database

    • MongoDB version: 3.2.13
    • Storage engine: MMAPv1
    • Hardware: Shared Cluster
    • Localhost or remote server? (AWS, mLab, ObjectRocket, Digital Ocean, etc): mLab

Logs/Trace

error: Uncaught internal server error. { MongoError: not authorized on to execute command { find: "_SCHEMA", filter: {} }
at Function.MongoError.create (/var/app/current/node_modules/mongodb-core/lib/error.js:31:11)
at queryCallback (/var/app/current/node_modules/mongodb-core/lib/cursor.js:212:36)
at /var/app/current/node_modules/mongodb-core/lib/connection/pool.js:461:18
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickDomainCallback (internal/process/next_tick.js:122:9)
name: 'MongoError',
message: 'not authorized on to execute command { find: "_SCHEMA", filter: {} }',
ok: 0,
errmsg: 'not authorized on to execute command { find: "_SCHEMA", filter: {} }',
code: 13 } MongoError: not authorized on to execute command { find: "_SCHEMA", filter: {} }
at Function.MongoError.create (/var/app/current/node_modules/mongodb-core/lib/error.js:31:11)
at queryCallback (/var/app/current/node_modules/mongodb-core/lib/cursor.js:212:36)
at /var/app/current/node_modules/mongodb-core/lib/connection/pool.js:461:18
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickDomainCallback (internal/process/next_tick.js:122:9)
MongoError: not authorized on to execute command { find: "_SCHEMA", filter: {} }
at Function.MongoError.create (/var/app/current/node_modules/mongodb-core/lib/error.js:31:11)
at queryCallback (/var/app/current/node_modules/mongodb-core/lib/cursor.js:212:36)
at /var/app/current/node_modules/mongodb-core/lib/connection/pool.js:461:18
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickDomainCallback (internal/process/next_tick.js:122:9)

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