Open rohits-splunk opened 1 year ago
@rohits-splunk thanks for reporting! The reason here is likely because the older MongDB NodeJS driver version is not compatible with the version of MongoDB installed. See my comment https://github.com/font/k8s-example-apps/issues/9#issuecomment-1299347902 for more details.
I have installed the app on a bare metal EC2 as docker was not working correctly, My ultimate aim is to send data to an external observability tool through open telemetry , i have also installed the tracing libraries and running the app like this š npm start -- @splunk/otel/instrument
Error [MongoError]: Unsupported OP_QUERY command: find. The client driver may require an upgrade. For more details see https://dochub.mongodb.org/core/legacy-opcode-removal at MongoError.create (/usr/src/app/node_modules/mongodb-core/lib/error.js:31:11) at queryCallback (/usr/src/app/node_modules/mongodb-core/lib/cursor.js:212:36) at /usr/src/app/node_modules/mongodb-core/lib/connection/pool.js:469:18 at process.processTicksAndRejections (node:internal/process/task_queues:77:11) { ok: 0, errmsg: 'Unsupported OP_QUERY command: find. The client driver may require an upgrade. For more details see https://dochub.mongodb.org/core/legacy-opcode-removal', code: 352, codeName: 'UnsupportedOpQueryCommand' } /usr/src/app/node_modules/mongodb/lib/utils.js:123 process.nextTick(function() { throw err; }); ^
TypeError: Cannot read properties of undefined (reading 'forEach') at /usr/src/app/routes/highscores.js:30:18 at handleCallback (/usr/src/app/node_modules/mongodb/lib/utils.js:120:56) at /usr/src/app/node_modules/mongodb/lib/cursor.js:858:22 at handleCallback (/usr/src/app/node_modules/mongodb-core/lib/cursor.js:171:5) at /usr/src/app/node_modules/mongodb-core/lib/cursor.js:594:22 at queryCallback (/usr/src/app/node_modules/mongodb-core/lib/cursor.js:212:16) at /usr/src/app/node_modules/mongodb-core/lib/connection/pool.js:469:18 at process.processTicksAndRejections (node:internal/process/task_queues:77:11)
Node.js v18.12.0