Closed teemus21 closed 2 years ago
Hello @teemus21,
thanks for reporting. Can you attach a redacted version of you configuration file? Regards Marc
Here is a redacted config file.
I run the script as follows:
/root/zabbix-ldap-sync/zabbix-ldap-sync -d -f /root/zabbix-ldap-sync/zabbix-ldap.conf
I tested your scenario without success reproducing your problem. It seems I suppose your are not using the most recent release. Can you update, and recheck? Please repopen the issue, if your problem still remains....
I re-cloned the master branch, copied my config file and I'm still getting the same error:
./zabbix-ldap-sync -d -f /root/zabbix-ldap-sync/zabbix-ldap.conf
2022-02-19 11:23:37 - INFO - ZabbixLDAPConf:42 - configuration for zabbix-ldap-sync release 0.13
2022-02-19 11:23:37 - INFO - pyzabbix:68 - JSON-RPC Server Endpoint: https://1.2.3.4/api_jsonrpc.php
2022-02-19 11:23:37 - INFO - pyzabbix:75 - Zabbix API version is: 5.4.1
2022-02-19 11:23:37 - INFO - ZabbixConn:103 - Connected to Zabbix API Version 5.4.1
2022-02-19 11:23:37 - INFO - ZabbixConn:404 - Creating Zabbix group None
Traceback (most recent call last):
File "./zabbix-ldap-sync", line 115, in <module>
main()
File "./zabbix-ldap-sync", line 110, in main
zabbix_conn.create_missing_groups()
File "/root/zabbix-ldap-sync/lib/zabbixconn.py", line 406, in create_missing_groups
grpid = self.create_group(eachGroup)
File "/root/zabbix-ldap-sync/lib/zabbixconn.py", line 224, in create_group
result = self.conn.usergroup.create(name=group)
File "/root/zabbix-ldap-sync/venv/lib/python3.7/site-packages/pyzabbix/__init__.py", line 219, in fn
args or kwargs
File "/root/zabbix-ldap-sync/venv/lib/python3.7/site-packages/pyzabbix/__init__.py", line 196, in do_request
raise ZabbixAPIException(msg, response_json['error']['code'], error=response_json['error'])
pyzabbix.ZabbixAPIException: ('Error -32602: Invalid params., Invalid parameter "/1/name": a character string is expected.', -32602)
It seems i discovered and solved the the problem :-)
When trying to use the older behavior of --delete-orphans without setting alldirusergroup, the script still attempts to create a group and fails: