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

Error: No JSON object could be decoded #66

Open
sebastianoc opened this issue May 30, 2019 · 6 comments
Open

Error: No JSON object could be decoded #66

sebastianoc opened this issue May 30, 2019 · 6 comments

Comments

@sebastianoc
Copy link

Hi,
I'm aiming to use the benchmark tool to benchmark DocumentDB the Aws MongoDB database compatible.
I have followed the installation steps but I'm having issues running benchmarks

Environment setting

  • Python 2.7.1
  • mongo shell v3.6.3
python --version
Python 2.7.15rc1
MongoDB shell version v3.6.3
git version: 9586e557d54ef70f9ca4b43c26892cd55257e1a5
OpenSSL version: OpenSSL 1.1.0g  2 Nov 2017
allocator: tcmalloc
modules: none
build environment:
    distarch: x86_64
    target_arch: x86_64
pip install -r requirements.txt
Collecting pymongo==2.7.2 (from -r requirements.txt (line 1))
Collecting bottle==0.11.6 (from -r requirements.txt (line 2))
  Using cached https://files.pythonhosted.org/packages/42/a3/94991c7a132b2717ee2d147049e1bb0ba0596834069583aeee3c7fd7ea12/bottle-0.11.6-py2.py3-none-any.whl
Collecting argparse==1.2.1 (from -r requirements.txt (line 3))
Collecting requests>=2.4.3 (from -r requirements.txt (line 4))
  Using cached https://files.pythonhosted.org/packages/51/bd/23c926cd341ea6b7dd0b2a00aba99ae0f828be89d72b2190f27c11d4b7fb/requests-2.22.0-py2.py3-none-any.whl
Collecting psutil>=2.1.3 (from -r requirements.txt (line 5))
Collecting ordereddict>=1.1 (from -r requirements.txt (line 6))
Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 (from requests>=2.4.3->-r requirements.txt (line 4))
  Using cached https://files.pythonhosted.org/packages/e6/60/247f23a7121ae632d62811ba7f273d0e58972d75e58a94d329d51550a47d/urllib3-1.25.3-py2.py3-none-any.whl
Collecting certifi>=2017.4.17 (from requests>=2.4.3->-r requirements.txt (line 4))
  Using cached https://files.pythonhosted.org/packages/60/75/f692a584e85b7eaba0e03827b3d51f45f571c2e793dd731e598828d380aa/certifi-2019.3.9-py2.py3-none-any.whl
Collecting chardet<3.1.0,>=3.0.2 (from requests>=2.4.3->-r requirements.txt (line 4))
  Using cached https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl
Collecting idna<2.9,>=2.5 (from requests>=2.4.3->-r requirements.txt (line 4))
  Using cached https://files.pythonhosted.org/packages/14/2c/cd551d81dbe15200be1cf41cd03869a46fe7226e7450af7a6545bfc474c9/idna-2.8-py2.py3-none-any.whl
Installing collected packages: pymongo, bottle, argparse, urllib3, certifi, chardet, idna, requests, psutil, ordereddict
Successfully installed argparse-1.2.1 bottle-0.11.6 certifi-2019.3.9 chardet-3.0.4 idna-2.8 ordereddict-1.1 psutil-5.6.2 pymongo-2.7.2 requests-2.22.0 urllib3-1.25.3

Running the benchmark script

export H="--host docdb-xx-xx-xx-xxxx-seb.cluster-xxxxxxxxxx.xx-xx-x.docdb.amazonaws.com -u xxxxxxxxx -p xxxxxxxxx"

python2.7 -d benchrun.py $H -f testcases/simple_insert.js -t 1 2 4 --includeFilter insert update --trialTime 100 
MongoDB shell version v3.6.3
connecting to: mongodb://docdb-xx-xx-xx-xxxx-seb.cluster-xxxxxxxxxx.xx-xx-x.docdb.amazonaws.com:27017/
MongoDB server version: 3.6.0
db version: 3.6.0

load('util/utils.js');
load('testcases/simple_insert.js');
mongoPerfRunTests([1, 2, 4], 1, 1, 100, 1, ["insert", "update"], [], 0, {"writeCmdMode": "true", "safeGLE": "false", "readCmdMode": "false", "writeConcern": {"j": "false"}}, false, false, {"traceOnly": false}, 'xxxxxxxxx', 'xxxxxxxxx');
Finished Testing.
Error: No JSON object could be decoded

The script is able to connect to the server, but it finishes the test without any output.
Am I missing something?

@henrikingo
Copy link
Contributor

Does it work against an actual MongoDB cluster? It seems the error is that no tests actually ran.

@mrlynn
Copy link

mrlynn commented May 31, 2019

It is important to note that mongo-perf was designed to be run against MongoDB... not DocumentDB. We have a test harness over here... That harness was written to test real MongoDB as well as other flavors of document database that claim MongoDB compatibility. If you need more information about the differences between MongoDB and AWS DocumentDB I highly recommend this article.

@gluplu
Copy link

gluplu commented Jun 11, 2019

I receive the same error when pointing to a mongos. When I run the script against a single mongo instance it's working fine.

@henrikingo
Copy link
Contributor

Off the top of my head I can't think of a reason why it wouldn't work against a mongos too, but it is actually true that we only use these tests to test standalone instances. These tests are microbenchmarks and don't really represent realistic application workloads at all. I really recommend you follow the link provided by @mrlynn instead.

@sumanthkumarc
Copy link

i have similar error when running against mongo arbiter with 4 node mongodb replicaset. FYI i'm bale to connect to it using pymongo and write to it.

@JustinBeckerMSFT
Copy link

This issue is repro for me as well against mongod.exe.

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

6 participants