dnaeon / py-vpoller

Distributed vSphere API Proxy
Other
83 stars 31 forks source link

Zabbix 4.0.7 (revision 92831) does not work with vPoller.so #264

Open chises opened 5 years ago

chises commented 5 years ago

Hello, we upgraded our zabbix proxys from 4.0.6 to 4.07 and recompiled the vpoller.so Now we see this issue on agent and proxy: 1526:20190513:075008.770 cannot load module "vpoller.so": /usr/lib/zabbix/modules/vpoller.so: undefined symbol: __zbx_zbx_snprintf

any idea on this?

Cenzooo commented 5 years ago

Same problem in my deployment, I am getting this error:

12981:20190527:104622.933 cannot load module "vpoller.so": /usr/lib/zabbix/vpoller.so: undefined symbol: zbx_log_level

dnaeon commented 5 years ago

Hi,

I haven't checked Zabbix 4.x, so I guess the API has changed and now this symbol is no longer present.

I cannot tell for sure if I'll be able to check this issue soon, as I'm busy with other stuff at the moment and don't have enough spare time to check on this project anymore.

Cenzooo commented 5 years ago

@dnaeon sorry for disturbing, for me the problem is solved... Actually it was version of zabbix sources, I had 4.0.2, but downloaded 4.0.7 so it was stupid mistake...

@chises you should also check versions, maybe you did same mistake

Now I have other problem... When I added hosts with vsphere import tool, vpoller worker at some point stopped working giving following error:

[2019-05-30 10:17:22,896 - INFO/VPollerWorker-10] [10.75.9.6] Retrieving performance metric 149 for SZGSVC01 Process VPollerWorker-2: Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/vpoller-0.5.1-py3.6.egg/vpoller/worker.py", line 483, in run_helper result = h.run() File "/usr/local/lib/python3.6/dist-packages/vpoller-0.5.1-py3.6.egg/vpoller/helpers/czabbix.py", line 69, in run result = helper.run() File "/usr/local/lib/python3.6/dist-packages/vpoller-0.5.1-py3.6.egg/vpoller/helpers/zabbix.py", line 140, in run result = self.methods[self.method]() File "/usr/local/lib/python3.6/dist-packages/vpoller-0.5.1-py3.6.egg/vpoller/helpers/zabbix.py", line 161, in zabbix_item_value result = self.data['result'][0] IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap self.run() File "/usr/local/lib/python3.6/dist-packages/vpoller-0.5.1-py3.6.egg/vpoller/worker.py", line 382, in run self.wait_for_tasks() File "/usr/local/lib/python3.6/dist-packages/vpoller-0.5.1-py3.6.egg/vpoller/worker.py", line 528, in wait_for_tasks data=result File "/usr/local/lib/python3.6/dist-packages/vpoller-0.5.1-py3.6.egg/vpoller/worker.py", line 485, in run_helper logger.warning('Helper module raised an exception: %s', e.message) AttributeError: 'IndexError' object has no attribute 'message' Process VPollerWorker-10: Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/vpoller-0.5.1-py3.6.egg/vpoller/worker.py", line 483, in run_helper result = h.run() File "/usr/local/lib/python3.6/dist-packages/vpoller-0.5.1-py3.6.egg/vpoller/helpers/czabbix.py", line 69, in run result = helper.run() File "/usr/local/lib/python3.6/dist-packages/vpoller-0.5.1-py3.6.egg/vpoller/helpers/zabbix.py", line 140, in run result = self.methods[self.method]() File "/usr/local/lib/python3.6/dist-packages/vpoller-0.5.1-py3.6.egg/vpoller/helpers/zabbix.py", line 161, in zabbix_item_value result = self.data['result'][0] IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap self.run() File "/usr/local/lib/python3.6/dist-packages/vpoller-0.5.1-py3.6.egg/vpoller/worker.py", line 382, in run self.wait_for_tasks() File "/usr/local/lib/python3.6/dist-packages/vpoller-0.5.1-py3.6.egg/vpoller/worker.py", line 528, in wait_for_tasks data=result File "/usr/local/lib/python3.6/dist-packages/vpoller-0.5.1-py3.6.egg/vpoller/worker.py", line 485, in run_helper logger.warning('Helper module raised an exception: %s', e.message) AttributeError: 'IndexError' object has no attribute 'message'

chises commented 5 years ago

Issue can be closed. Don know the "evil source". What i have done:

Zabbix 4.0.9 (revision 97a69d5d5a) 10157:20190611:083045.598 vPoller module version 0.5.7 10157:20190611:083045.598 Loading vPoller module configuration file /etc/zabbix/vpoller_module.conf 10157:20190611:083045.605 loaded modules: vpoller.so

Edit: found the issue. a error in my script linked to the old vpoller module. all were my fault :-/ sorry

dnaeon commented 5 years ago

Generally, whenever you update Zabbix you should also make sure to build the vpoller.so module using the version of Zabbix you are running.

On Tue, Jun 11, 2019 at 9:34 AM chises notifications@github.com wrote:

Issue can be closed. Don know the "evil source". What i have done:

  • updated to 4.0.9
  • made a git pull in vpoller directory
  • compiled it again,
  • copied vpoller.so. Everything is fine.

Zabbix 4.0.9 (revision 97a69d5d5a) 10157:20190611:083045.598 vPoller module version 0.5.7 10157:20190611:083045.598 Loading vPoller module configuration file /etc/zabbix/vpoller_module.conf 10157:20190611:083045.605 loaded modules: vpoller.so

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dnaeon/py-vpoller/issues/264?email_source=notifications&email_token=AAB3JCZWN23FOW7E3XDUZL3PZ5BNXA5CNFSM4HMMS5NKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXMC3QI#issuecomment-500706753, or mute the thread https://github.com/notifications/unsubscribe-auth/AAB3JC5KGN7XNO3SHWHTTNDPZ5BNXANCNFSM4HMMS5NA .

-- Marin Atanasov Nikolov

dnaeon AT gmail DOT com http://www.unix-heaven.org/