When I allow remote connection to mongodb in mongod.conf file:
net: bindIp: <use public ip here>
security: authorization: 'enabled'
I can remotely connect to mongo but then grandnode fails to connect to it.
What am I missing?
When remote connection is enabled for mongo, grandnode fails.
Monday, November 25, 2024 4:22:10 PM
Whole error:
MongoCommandException: Command aggregate failed: not authorized on hgrandnodedbname to execute command { aggregate: "Customer", pipeline: [ { $match: { CustomerGuid: BinData(3, E838D97A73BB644698E0BDFA9EA92171) } }, { $limit: 1 } ], cursor: {}, $db: "hgrandnodedbname ", lsid: { id: UUID("cca201c4-82ec-4d44-bee8-5ee25233b179") } }.
But this is only happening when I enable :
security:
authorization: 'enabled'
in mogod.conf.
MongoCommandException: Command aggregate failed: not authorized on hgrandnodedbname to execute command { aggregate: "Customer", pipeline: [ { $match: { CustomerGuid: BinData(3, E838D97A73BB644698E0BDFA9EA92171) } }, { $limit: 1 } ], cursor: {}, $db: "hgrandnodedbname ", lsid: { id: UUID("cca201c4-82ec-4d44-bee8-5ee25233b179") } }.
But this is only happening when I enable :
security:
authorization: 'enabled'
in mogod.conf.
0