. We have maybe unusual configuration. Nav is runing on https://hostname:8080/
I enabled carbon cache and udp, and included nav/apache.conf to SSL virtualhost on port 8080. Next, I updated base to https://server:8080/ in graphite.conf. But when I want to see stats, I see
JSONDecodeError: No JSON object could be decoded: line 2 column 1 (char 1)
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 111, in get_response response = callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/python2.7/dist-packages/nav/web/sortedstats/views.py", line 37, in index result.collect()
File "/usr/lib/python2.7/dist-packages/nav/web/sortedstats/statmodules.py", line 59, in collect self.data = self.get_sorted_data()
File "/usr/lib/python2.7/dist-packages/nav/web/sortedstats/statmodules.py", line 67, in get_sorted_data data = self.get_data()
File "/usr/lib/python2.7/dist-packages/nav/web/sortedstats/statmodules.py", line 74, in get_data data = get_metric_average(target, start=self.timeframe)
File "/usr/lib/python2.7/dist-packages/nav/metrics/data.py", line 38, in get_metric_average data = get_metric_data(target, start, end)
File "/usr/lib/python2.7/dist-packages/nav/metrics/data.py", line 95, in get_metric_data return simplejson.load(response)
File "/usr/lib/python2.7/dist-packages/simplejson/__init__.py", line 395, in load use_decimal=use_decimal, **kw)
File "/usr/lib/python2.7/dist-packages/simplejson/__init__.py", line 451, in loads return _default_decoder.decode(s)
File "/usr/lib/python2.7/dist-packages/simplejson/decoder.py", line 402, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/dist-packages/simplejson/decoder.py", line 420, in raw_decode raise JSONDecodeError("No JSON object could be decoded", s, idx)
JSONDecodeError: No JSON object could be decoded: line 2 column 1 (char 1)
Let me make sure I understand you correctly: https:/ /hostname: 8080/ and https:/ /server: 8080/ are in fact two separate SSL-enabled servers?
The error would mean that NAV cannot get a proper response from the API at https:/ /server: 8080/ - I cannot reproduce this by switching on SSL on a Graphite installation, so I would need more details.
Can you set DJANGO_DEBUG=True in `nav.conf` and restart apache, then load the crashing page again? I would really like to see the contents of the expandable local vars on this line:
File "/usr/lib/ python2. 7/dist- packages/ nav/metrics/ data.py" , line 95, in get_metric_data load(response)
return simplejson.