python-diamond/Diamond

JolokiaCollector is not working

Lilili2019 opened this issue · 1 comments

Having trouble to get the JolokiaCollector to work. So first I followed the doc https://diamond.readthedocs.io/en/latest/Getting-Started/Configuration/ to setup the JolokiaCollector:
diamond-setup -C JolokiaCollector

But after restarted Diamond, the diamond.log shows some issue. Any thoughts why i am getting below ERROR?

[2019-02-01 10:52:52,779] [INFO] [MainThread:MainProcess] Changed UID: 0 () GID: 0 ().
[2019-02-01 10:52:52,779] [INFO] [MainThread:MainProcess] Detaching Process.
[2019-02-01 10:52:52,968] [ERROR] [MainThread:MainProcess] Failed to import module: collectd_network. Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/diamond/utils/classes.py", line 159, in load_collectors_from_paths
mod = imp.load_module(modname, fp, pathname, description)
File "/usr/share/diamond/collectors/jcollectd/collectd_network.py", line 33, in
if sys.version_info.major == 2:
AttributeError: 'tuple' object has no attribute 'major'

[2019-02-01 10:52:52,970] [ERROR] [MainThread:MainProcess] Failed to import module: jcollectd. Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/diamond/utils/classes.py", line 159, in load_collectors_from_paths
mod = imp.load_module(modname, fp, pathname, description)
File "/usr/share/diamond/collectors/jcollectd/jcollectd.py", line 33, in
import collectd_network
File "/usr/share/diamond/collectors/jcollectd/collectd_network.py", line 33, in
if sys.version_info.major == 2:
AttributeError: 'tuple' object has no attribute 'major'

[2019-02-01 10:52:55,200] [ERROR] [MainThread:JolokiaCollector] Collector failed!
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/diamond/utils/scheduler.py", line 77, in collector_process
collector._run()
File "/usr/lib/python2.6/site-packages/diamond/collector.py", line 477, in _run
self.collect()
File "/usr/share/diamond/collectors/jolokia/jolokia.py", line 195, in collect
self._get_domains()
File "/usr/share/diamond/collectors/jolokia/jolokia.py", line 169, in _get_domains
listing = self._list_request()
File "/usr/share/diamond/collectors/jolokia/jolokia.py", line 234, in _list_request
timeout=timeout)) as response:
File "/usr/lib64/python2.6/urllib2.py", line 126, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib64/python2.6/urllib2.py", line 391, in open
response = self._open(req, data)
File "/usr/lib64/python2.6/urllib2.py", line 409, in _open
'_open', req)
File "/usr/lib64/python2.6/urllib2.py", line 369, in _call_chain
result = func(*args)
File "/usr/lib64/python2.6/urllib2.py", line 1190, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/usr/lib64/python2.6/urllib2.py", line 1165, in do_open
raise URLError(err)
URLError: <urlopen error [Errno 111] Connection refused>

Python2.6 support was dropped 11 months before this issue was created. If you still see this with master under 2.7, reopen and please include current collector config and logs.
Closing . . .