Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LDAP同步数据失败, 无法获取用户数据, 请检查配置 #384

Closed
ilovedj2022 opened this issue Apr 24, 2022 · 5 comments
Closed
Labels
Module: LDAP/MAD ldap/mad related

Comments

@ilovedj2022
Copy link

用文字描述你遇到的问题

同步数据失败, 无法获取用户数据, 请检查配置

重现方法

配置字段:
image
image
错误日志:
###usermgr/stdout.log:
/data/bkce/.envs/usermgr-api/lib/python3.6/site-packages/pymysql/cursors.py:146: Warning: Incorrect datetime value: '%2022-04-24 08:46%' for column 'create_time' at row 1
result = self._query(query)

###usermgr/bk_usermgr.log:
Traceback (most recent call last):
File "/data/bkce/usermgr/api/bkuser/categories/vendors/ldap/adapter.py", line 287, in _fetch_data
File "/data/bkce/usermgr/api/bkuser/categories/vendors/ldap/client.py", line 82, in search
File "/data/bkce/.envs/usermgr-api/lib/python3.6/site-packages/ldap3/extend/init.py", line 125, in paged_search
paged_criticality)
File "/data/bkce/.envs/usermgr-api/lib/python3.6/site-packages/ldap3/extend/standard/PagedSearch.py", line 139, in paged_search_accumulator
paged_criticality):
File "/data/bkce/.envs/usermgr-api/lib/python3.6/site-packages/ldap3/extend/standard/PagedSearch.py", line 68, in paged_search_generator
None if cookie is True else cookie)
File "/data/bkce/.envs/usermgr-api/lib/python3.6/site-packages/ldap3/core/connection.py", line 772, in search
raise LDAPAttributeError('invalid attribute type ' + attribute_name_to_check)
ldap3.core.exceptions.LDAPAttributeError: invalid attribute type memberOf

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/data/bkce/usermgr/api/bkuser/categories/views.py", line 251, in sync
File "/data/bkce/.envs/usermgr-api/lib/python3.6/site-packages/celery/local.py", line 191, in call
return self._get_current_object()(*a, **kw)
File "/data/bkce/.envs/usermgr-api/lib/python3.6/site-packages/celery/app/task.py", line 394, in call
return self.run(*args, **kwargs)
File "/data/bkce/usermgr/api/bkuser/categories/tasks.py", line 31, in adapter_sync
File "/data/bkce/usermgr/api/bkuser/categories/vendors/base.py", line 155, in raw2db
File "/data/bkce/usermgr/api/bkuser/categories/vendors/ldap/adapter.py", line 251, in fetch_and_sync
File "/data/bkce/usermgr/api/bkuser/categories/vendors/ldap/adapter.py", line 291, in _fetch_data
bkuser.categories.exceptions.FetchDataFromRemoteFailed: 无法获取用户数据, 请检查配置

###usermgr/component.log
无错误日志

版本
usermgr版本- 2.2.6-b3

如果是 SaaS 页面问题,请提供使用的操作系统和浏览器信息

  • OS: [e.g. windows10]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

额外信息

任何你觉得有助于问题解决的内容

@wklken
Copy link
Collaborator

wklken commented Apr 24, 2022

duplicated with

#143
#375


先查看这两个已close的issue中的处理方案

@ilovedj2022
Copy link
Author

未解决;

duplicated with

#143 #375

先查看这两个已close的issue中的处理方案
未解决;参考 #143 社区版6.0.5安装包里的usermgr 2.2.6-b3的代码已加密,github上无2.2.6版本代码
#375 问题未解决

@wklken
Copy link
Collaborator

wklken commented Apr 24, 2022

内部对接的环境需要自行调试排查问题, 有结果可以同步过来


代码是开源的, 访问链路

用户管理源码 -> ldap3第三方库 -> Ldap服务器

前两个可以在源码中加相关的debug日志;

@ilovedj2022
Copy link
Author

内部对接的环境需要自行调试排查问题, 有结果可以同步过来

代码是开源的, 访问链路

用户管理源码 -> ldap3第三方库 -> Ldap服务器

前两个可以在源码中加相关的debug日志;
image

@wklken
Copy link
Collaborator

wklken commented May 16, 2022

#429 汇总了目前所有文档, 包括问答社区(社区目前的 FAQ 非常全面)

如果还没有解决, 请到问答社区发帖, 社区管理员会专项支持, 协助排查解决问题

@wklken wklken closed this as completed Jun 27, 2022
@wklken wklken added the Module: LDAP/MAD ldap/mad related label Oct 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Module: LDAP/MAD ldap/mad related
Projects
None yet
Development

No branches or pull requests

2 participants