Details
-
Bug
-
Status: Closed
-
Major - P3
-
Resolution: Works as Designed
-
3.4.1
-
None
-
None
-
IBM Cloud Databases for Mongo (2 nodes replicaset, not sharded)
Description
Hi, we have been experiencing "command aggregate requires authentication" and its variants "command find requires authentication", etc. with node-mongodb-native drive >3.4.1 (so minimum 3.4.1) and Mongo 4.2.
It's intermittent and eventually goes away by itself for our serverless functions or sometimes requires us to restart the server for our typical node instances. Though I suspect for serverless functions, it fixes itself because we get a cold restart of the container and a new connection is established; difficult to tell.
This is the full trace:
"MongoError: command aggregate requires authentication
|
at Connection.eval (eval at initializeActionHandler (/nodejsAction/runner.js:57:23), <anonymous>:27164:61)
|
at Connection.emit (events.js:198:13)
|
at processMessage (eval at initializeActionHandler (/nodejsAction/runner.js:57:23), <anonymous>:26005:10)
|
at TLSSocket.eval (eval at initializeActionHandler (/nodejsAction/runner.js:57:23), <anonymous>:26174:15)
|
at TLSSocket.emit (events.js:198:13)
|
at addChunk (_stream_readable.js:288:12)
|
at readableAddChunk (_stream_readable.js:269:11)
|
at TLSSocket.Readable.push (_stream_readable.js:224:10)
|
at TLSWrap.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
|
This is our options object for the serverless functions:
const options = {
|
ssl: true,
|
sslValidate: true,
|
sslCA: ca,
|
useNewUrlParser: true,
|
useUnifiedTopology: true,
|
connectTimeoutMS: 600000,
|
socketTimeoutMS: 600000,
|
serverSelectionTimeoutMS: 600000
|
};
|
and for our node server it simply is:
{
|
ssl: true,
|
sslValidate: true,
|
sslCA: ca
|
}
|