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

No JSON object could be decoded #35

Open
ghost opened this issue Feb 25, 2016 · 2 comments
Open

No JSON object could be decoded #35

ghost opened this issue Feb 25, 2016 · 2 comments

Comments

@ghost
Copy link

ghost commented Feb 25, 2016

I am setting up a box to monitor a ceph cluster. My client config seems to be fine, i am able to run all the commands that these scripts are running inside. But seeing the below errors in collectd log. I am using ubuntu 14.04 with collectd 5.4. Please help me with this issue. Thank you!

[2016-02-25 15:27:40] read-function of plugin `python.ceph_pool_plugin' failed. Will suspend it for 240.000 seconds.
[2016-02-25 15:31:40] ceph: failed to get stats :: No JSON object could be decoded :: Traceback (most recent call last):
File "/usr/lib/collectd/plugins/ceph/base.py", line 108, in read_callback
stats = self.get_stats()
File "/usr/lib/collectd/plugins/ceph/ceph_monitor_plugin.py", line 62, in get_stats
json_data = json.loads(output)
File "/usr/lib/python2.7/json/init.py", line 338, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

[2016-02-25 15:31:40] Unhandled python exception in read callback: UnboundLocalError: local variable 'stats' referenced before assignment
[2016-02-25 15:31:40] read-function of plugin `python.ceph_monitor_plugin' failed. Will suspend it for 480.000 seconds.
[2016-02-25 15:31:40] ceph: failed to get stats :: No JSON object could be decoded :: Traceback (most recent call last):
File "/usr/lib/collectd/plugins/ceph/base.py", line 108, in read_callback
stats = self.get_stats()
File "/usr/lib/collectd/plugins/ceph/ceph_pool_plugin.py", line 67, in get_stats
json_stats_data = json.loads(stats_output)
File "/usr/lib/python2.7/json/init.py", line 338, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

@clyso
Copy link

clyso commented Apr 19, 2016

Same issue here. Is this project still maintained?

@grinapo
Copy link

grinapo commented Oct 26, 2016

probably also #36 .
I have tried to merge most of the stuff in pull requests and various other stuff lying around in the forks but I still have to test them a bit more.

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