Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App is not able to write to the database , nor it is able to query from it #16

Open
rohits-splunk opened this issue Nov 1, 2022 · 1 comment

Comments

@rohits-splunk
Copy link

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

@font
Copy link
Owner

font commented Nov 2, 2022

@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 font/k8s-example-apps#9 (comment) for more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants