[python-ldap] python-ldap syncrepl consumer

Petr Spacek pspacek at redhat.com
Thu Nov 12 10:00:25 EST 2015


On 12.11.2015 14:18, David Gabriel wrote:
> Dear Petr and all,
> 
> Thank you so much for your help.
> I updated the command as follow : *$ python syncrepl.py
> 'ldap://127.0.0.1/dc=test,dc=com?*?sub?(objectClass=*)?bindname=cn=admin%2cdc=test%2cdc=com,X-BINDPW=a123456
> <http://127.0.0.1/dc=test,dc=com?*?sub?(objectClass=*)?bindname=cn=admin%2cdc=test%2cdc=com,X-BINDPW=a123456>'
> test.com <http://test.com>*
> But I get this error as described in the trace below :
> 
> *$ python syncrepl.py
> 'ldap://127.0.0.1/dc=test,dc=com?*?sub?(objectClass=*)?bindname=cn=admin%2cdc=test%2cdc=com,X-BINDPW=a123456
> <http://127.0.0.1/dc=test,dc=com?*?sub?(objectClass=*)?bindname=cn=admin%2cdc=test%2cdc=com,X-BINDPW=a123456>'
> test.com <http://test.com>*
> *Connecting to LDAP server now...*
> *Commencing sync process*
> *Encountered a problem, going to retry. Error: {'info': 'critical extension
> is not recognized', 'desc': 'Critical extension is unavailable'}*
> *Connecting to LDAP server now...*
> *Commencing sync process*
> *Encountered a problem, going to retry. Error: {'info': 'critical extension
> is not recognized', 'desc': 'Critical extension is unavailable'}*
> *^CShutting down!*

I suppose that you did not configure SyncRepl on server side, please consult
server configuration docs.

Petr Spacek  @  Red Hat

> Could you please help to fix this issue. In fact, I am new to domain !
> Thanks in advance.
> 
> 2015-11-12 11:35 GMT+01:00 Petr Spacek <pspacek at redhat.com>:
> 
>> On 12.11.2015 11:03, David Gabriel wrote:
>>> Dear Petr and all,
>>>
>>> Thanks you very much for your help.
>>> I am applying the same command as you suggest:
>>> $ python syncrepl.py 'ldap://
>>>
>> 127.0.0.1/cn=admin,dc=test,dc=com?*?sub?(objectClass=*)?bindname=uid=admin%2ccn=admin%2cdc=test%2cdc=com,X-BINDPW=myPasswd
>> '
>>> test.com
>>> Connecting to LDAP server now...
>>> Login to LDAP server failed:  {'desc': 'Invalid credentials'}
>>> But I still get this failure message.
>>> Kindly find attached my server configuration. Please tell me if I am
>> using
>>> the right command or I am confusing.
>>> NB: When I run the syncrepl demo script without any argument I get this
>>> message:
>>> python syncrepl.py
>>> Usage: syncrepl*-client*.py <LDAP URL> <pathname of database>. I am
>>> wondering if I am using an old version of syncrepl demo file ?
>>>
>>> Thanks in adance.
>>>
>>> 2015-11-11 8:55 GMT+01:00 Petr Spacek <pspacek at redhat.com>:
>>>
>>>> On 10.11.2015 18:41, Michael Ströder wrote:
>>>>> On 2015-11-10 17:10, David Gabriel wrote:
>>>>>> Thank you so much for your quick answer.
>>>>>> Since yesterday I have tried to run the example I found in the
>>>>>> indicated directory (Demo/pyasn1/syncrepl.py) using this command :
>>>>>> python syncrepl.py ldap://localhost test.com [1] but I still get this
>>>>>> error "TypeError: must be string, not None". And it is caused from
>>>>>> "ldap_url.who" which is None.
>>>>>> Could you please tell me how to fix this issue ?
>>>>>> Is it problem coming from server side or the arguments ... ?
>>>>>
>>>>> Please always send a complete exception traceback if one of the demo
>>>> scripts
>>>>> fail.
>>>>
>>>> You have to specify BIND DN etc., please see the example:
>>>>
>>>> $ python syncrepl.py
>>>> Usage:
>>>> syncrepl.py <LDAP URL> <pathname of database>
>>>> syncrepl.py
>>>> 'ldap://
>>>>
>> 127.0.0.1/cn=users,dc=test?*?sub?(objectClass=*)?bindname=uid=admin%2ccn=users%2cdc=test,X-BINDPW=password
>>>> '
>>>> db.shelve
>>
>> You need to change the LDAP URL to suit your needs.
>> "cn=users,dc=test" is base DN.
>> "bindname=uid=admin%2ccn=admin%2cdc=test%2cdc=com" is BIND DN.
>> "X-BINDPW=myPasswd" is obviously a passwword used for BIND :-)
>>
>> The screenshot should contain values you need.


More information about the python-ldap mailing list