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

Can not run test #79

Open
minhhungit opened this issue Aug 8, 2021 · 6 comments
Open

Can not run test #79

minhhungit opened this issue Aug 8, 2021 · 6 comments

Comments

@minhhungit
Copy link

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
Copy link

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
Copy link

tiboun commented Sep 12, 2022

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
Copy link

tiboun commented Sep 12, 2022

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

Thanks, best regards

@ghartnett
Copy link
Contributor

ghartnett commented Sep 14, 2022

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
Copy link

tiboun commented Sep 20, 2022

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
Copy link

tiboun commented Sep 22, 2022

Hi,

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

Best regards

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

4 participants