zabbix-module-python icon indicating copy to clipboard operation
zabbix-module-python copied to clipboard

Error when importing the ssl library

Open bytedreamer opened this issue 8 years ago • 2 comments

I receive the following error when my python module attempts to import ssl.

zabbix_agentd [1890]: Error: error calling zabbix_module.zbx_module_init zabbix_agentd [1890]: Error: /usr/lib/python3.4/lib-dynload/_ssl.cpython-34m-x86_64-linux-gnu.so: undefined symbol: PyExc_OSError zabbix_agentd [1890]: Error: failed to initialize zabbix_module python module zabbix_agentd [1890]: ERROR: cannot initialize module "libzbxpython3.so" zabbix_agentd [1890]: ERROR: loading modules failed, exiting...

I ran the 'import ssl' from the python command prompt, and there is no error.

bytedreamer avatar Aug 28 '17 15:08 bytedreamer

I have got the same problem. Actually this is more generic. When I try to load the PyCRL I have

zabbix_agentd [14220]: Error: error calling zabbix_module.zbx_module_init
zabbix_agentd [14220]: Error: /usr/local/lib/python3.5/dist-packages/pycurl.cpython-35m-x86_64-linux-gnu.so: undefined symbol: PyExc_ImportError
zabbix_agentd [14220]: Error: failed to initialize zabbix_module python module
zabbix_agentd [14220]: ERROR: cannot initialize module "python3.so"
zabbix_agentd [14220]: ERROR: loading modules failed, exiting...
[TEST] root@ditlcm09: /etc/zabbix/scripts # python3

Seems that there are some restrictions what could be used.

hudecof avatar Apr 06 '18 13:04 hudecof

Same for me, i get

Error: HTTPSConnectionPool(host='my.test.com', port=443): Max retries exceeded with url: /simple (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.",))
zabbix_agentd [11027]: Error: failed to initialize zabbix_module python module
zabbix_agentd [11027]: ERROR: cannot initialize module "python3.so"
zabbix_agentd [11027]: ERROR: loading modules failed, exiting...

paixaop avatar Jun 17 '18 01:06 paixaop