mongodb / mongo-perf

performance tools for mongodb
351 stars 140 forks source link

Can not run test #79

Open minhhungit opened 3 years ago

minhhungit commented 3 years ago

Hi team, I can not start test , I tried some cases on my windows 10 PC

Python 2.7.17 With mongosh.exe 1.04 Command:

python benchrun.py -f testcases/* -t 1 2 4 -s "C:\mgdb\bin\mongosh.exe" --replset rs0 --port 27050

Error:

A test file that was passed in does not exist: testcases/*

Python 2.7.17 With mongosh.exe 1.04 Command:

python benchrun.py -f testcases/simple_insert.js -t 1 2 4 -s "C:\mgdb\bin\mongosh.exe" --replset rs0 --port 27050

Error:

Current Mongosh Log ID: 610fab0470ed640b1317d709
Connecting to:          mongodb://localhost:27050/?directConnection=true&serverSelectionTimeoutMS=2000
Using MongoDB:          5.0.2
Using Mongosh:          1.0.4

For mongosh info see: https://docs.mongodb.com/mongodb-shell/

   The server generated these startup warnings when booting:
   2021-08-08T16:29:07.049+07:00: Access control is not enabled for the database. Read and write access to data and configuration is unrestricted

db version: 5.0.2
6d9ec525e78465dcecadcff99cce953d380fedc8

load('util/utils.js');
load('testcases/simple_insert.js');
mongoPerfRunTests([1, 2, 4], 1, 1, 5, 1, "%", [], 0, {"writeCmdMode": "true", "readCmdMode": "false", "writeConcern": {"j": "false"}}, false, false, {"traceOnly": false});
TypeError: Object.bsonsize is not a function (Are you trying to run a script written for the legacy shell? Try running `snippet install mongocompat`)
Finished Testing.
Error: No JSON object could be decoded

Python 2.7.17 With mongo shell 5.0.2 Command:

python benchrun.py -f testcases/simple_insert.js -t 1 2 4 -s "C:\mgdb\bin\mongos.exe" --replset rs0 --port 27050

Error:

Error parsing command line: unrecognised option '--norc'
try 'C:\mgdb\bin\mongos.exe --help' for more information
Error: Command '['C:\\mgdb\\bin\\mongos.exe', '--norc', '--host', 'localhost', '--port', '27050', '--eval', "print('db version: ' + db.version()); db.serverBuildInfo().gitVersion;"]' returned non-zero exit status 2

I also tried with mongo shell version 4.4.8, 3.4.24, they also do not work Above cases just typical cases

Exactly what is requirement for this tool pls

apodelko commented 3 years ago

Hello,

Use the 'mongo' shell for benchrun, not the new 'mongosh' shell. In the third example you used 'mongos' - that is for sharding, it is not a shell. It should work with 'mongo'.

Regards, Alex

tiboun commented 2 years ago

Hello, I've installed mongo on my laptop and I don't have mongo as of 6.0 version. Here is the list of binaries I have :

ls /usr/bin | grep mongo mongod mongodump mongoexport mongofiles mongoimport mongorestore mongos mongosh mongostat mongotop

Can you tell me how do you get mongo command line ?

Thanks

tiboun commented 2 years ago

Since 5.0, mongo shell is deprecated. Do you plan to change the implementation and use mongosh ?

Thanks, best regards

ghartnett commented 2 years ago

We have an internal ticket to replace the old mongo shell with mongosh in performance infrastructure. The legacy shell can be used for testing. You should be able to use the legacy shell from 5.0 with 6.0 if you want.

tiboun commented 2 years ago

Hi @ghartnett, I've launched the benchmark on my local database started with a replica set and all works fine like you said. When trying to run the benchmark in mongo atlas, I got the following error : Mixing ssl modes with a single replica set is disallowed

The main difference between the local server and the atlas one is basically the usage of ssl protocol. Have you encountered that before ? This error is thrown by benchRun. Doing a simple insert such as db.test0.insert({}) works fine!

By the way, do you have an ETA for the migration to mongosh ?

Thanks for your feedback.

Best regards,

tiboun commented 2 years ago

Hi,

Got a response from mongodb support. FYI, benchRun is not designed to be run in mongo atlas.

Best regards