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

Dex won't read analyst system.profile from secondary (KeyError: 'supported') #26

Open
meersjo opened this issue Apr 29, 2014 · 2 comments

Comments

@meersjo
Copy link

meersjo commented Apr 29, 2014

Visible error:

Traceback (most recent call last):
  File "/usr/local/bin/dex", line 233, in <module>
    main(sys.argv[1:])
  File "/usr/local/bin/dex", line 206, in main
    return md.analyze_profile()
  File "/usr/local/lib/python2.7/dist-packages/dex/dex.py", line 162, in analyze_profile
    profile_parser)
  File "/usr/local/lib/python2.7/dist-packages/dex/dex.py", line 101, in _process_query
    if parsed['supported']:
KeyError: 'supported'

How to reproduce:

  • Replicaset, app read_preference = secondary_preferred
  • Log in to a secondary, set slaveOk(), setProfilingLevel(2)
  • Run loadtests
  • setProfilingLevel(0)
  • Run Dex from a remote machine with -p -n

Additional info:

  • Dex installed today, using pip, from Github repo.
  • MongoDB 2.4.8 running on all repset nodes.
  • If I change the hostname to one of the other nodes, I get no error, but also no data as the system.profile collection doesn't exist there.
  • I tried changing the PRIMARY_PREFERRED to NEAREST in dex.py and analyser.py, but no change in behaviour.

I'm going to export the collection and import it into the master, but any help here would be appreciated - I don't like having to turn on profiling globally.

@meersjo
Copy link
Author

meersjo commented Apr 30, 2014

We did more tests, now with setProfilingLevel(1) on all nodes; Dex now gives the same error on all the nodes. Analysis using mongodb.log does work.

@meersjo
Copy link
Author

meersjo commented Apr 30, 2014

Dex 0.6 (using simply "pip install dex") does work with system.profile, but only on the primary of course.

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

1 participant