dsconf backup create command gives traceback
389-ds-base-1.4.0.19-20181121git4a76e693a.fc28.x86_64 389-ds-base-debuginfo-1.4.0.19-20181121git4a76e693a.fc28.x86_64 389-ds-base-libs-1.4.0.19-20181121git4a76e693a.fc28.x86_64
Executed - dsconf -v -D "cn=Directory Manager" ldap://server.example.com backup create
Please see the attached file - it gives traceback
It should automatically create a task that backs up all databases and should not give traceback.
<img alt="Output" src="/389-ds-base/issue/raw/files/44de40a5efadddf598027492f649ccd2df2742cddb9a8f362c965fd175dadae4-Output" />
Restore dsconf -D -v "cn=Directory Manager" ldap://server.example.com backup restore /var/lib/dirsrv/slapd-instance_name/bak/instance_name-time_stamp/ also results in traceback.
Metadata Update from @amsharma: - Custom field component adjusted to None - Custom field origin adjusted to None - Custom field reviewstatus adjusted to None - Custom field type adjusted to None - Custom field version adjusted to None
Works for me:
[root@localhost cli]# ./dsconf localhost backup create The backup create task has finished successfully
Your traceback shows that it can not contact the server. Is your instance running?
I did find a different bug:
[root@localhost cli]# ./dsconf -D cn=dm ldap://localhost backup create Enter password for cn=dm on ldap://localhost: Error: DirSrv has no attribute 'serverid'
This is now fixed in https://pagure.io/389-ds-base/pull-request/50031
I did find a different bug: [root@localhost cli]# ./dsconf -D cn=dm ldap://localhost backup create Enter password for cn=dm on ldap://localhost: Error: DirSrv has no attribute 'serverid'
Yes, this is when you execute it without -v When you execute ./dsconf -v -D cn=dm ldap://localhost backup create - You will see the traceback, I will try with the fix today. Thanks.
@mreynolds I tried with https://pagure.io/389-ds-base/pull-request/50031 , but it does not work for me .
RPM - 389-ds-base-1.4.0.19-20181122gitf2b06b217.fc29.x86_64 (used the latest commit)
Test 1 - dsconf -D "cn=Directory Manager" ldap://server.example.com backup create
Enter password for cn=Directory Manager on ldap://server.example.com: Error: {'desc': "Can't contact LDAP server", 'errno': 22, 'info': 'Invalid argument'}
Test 2- dsconf -v -D "cn=Directory Manager" ldap://server.example.com backup create
DEBUG: The 389 Directory Server Configuration Tool DEBUG: Inspired by works of: ITS, The University of Adelaide DEBUG: dsrc path: /root/.dsrc DEBUG: dsrc instances: [] DEBUG: dsrc no such section ldap://server.example.com DEBUG: Called with: Namespace(archive=None, basedn=None, binddn='cn=Directory Manager', db_type='ldbm database', func=<function backup_create at 0x7f976365f730>, instance='ldap://server.example.com', json=False, starttls=False, verbose=True) DEBUG: Instance details: {'uri': 'ldap://server.example.com', 'basedn': None, 'binddn': 'cn=Directory Manager', 'saslmech': None, 'tls_cacertdir': None, 'tls_cert': None, 'tls_key': None, 'tls_reqcert': 1, 'starttls': False, 'args': {'ldapurl': 'ldap://server.example.com', 'root-dn': 'cn=Directory Manager'}} DEBUG: SER_SERVERID_PROP not provided, assuming non-local instance DEBUG: Allocate <class 'lib389.DirSrv'> with ldap://server.example.com DEBUG: Allocate <class 'lib389.DirSrv'> with 172.16.36.15:389 INFO: Allocate <class 'lib389.DirSrv'> with 172.16.36.15:389 Enter password for cn=Directory Manager on ldap://server.example.com: DEBUG: SER_SERVERID_PROP not provided, assuming non-local instance DEBUG: Allocate <class 'lib389.DirSrv'> with ldap://server.example.com DEBUG: Allocate <class 'lib389.DirSrv'> with 172.16.36.15:389 INFO: Allocate <class 'lib389.DirSrv'> with 172.16.36.15:389 DEBUG: open(): Connecting to uri ldap://server.example.com DEBUG: Cannot connect to 'ldap://server.example.com' DEBUG: {'desc': "Can't contact LDAP server", 'errno': 22, 'info': 'Invalid argument'} Traceback (most recent call last): File "/usr/sbin/dsconf", line 129, in <module> inst = connect_instance(dsrc_inst=dsrc_inst, verbose=args.verbose) File "/usr/local/lib/python3.7/site-packages/lib389/cli_base/__init__.py", line 112, in connect_instance starttls=dsrc_inst['starttls'], connOnly=True) File "/usr/local/lib/python3.7/site-packages/lib389/__init__.py", line 1152, in open raise e File "/usr/local/lib/python3.7/site-packages/lib389/__init__.py", line 1148, in open self.simple_bind_s(ensure_str(self.binddn), self.bindpw) File "/usr/local/lib/python3.7/site-packages/lib389/__init__.py", line 165, in inner return f(*args, **kwargs) File "/usr/lib64/python3.7/site-packages/ldap/ldapobject.py", line 443, in simple_bind_s msgid = self.simple_bind(who,cred,serverctrls,clientctrls) File "/usr/local/lib/python3.7/site-packages/lib389/__init__.py", line 165, in inner return f(*args, **kwargs) File "/usr/lib64/python3.7/site-packages/ldap/ldapobject.py", line 437, in simple_bind return self._ldap_call(self._l.simple_bind,who,cred,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls)) File "/usr/local/lib/python3.7/site-packages/lib389/__init__.py", line 165, in inner return f(*args, **kwargs) File "/usr/lib64/python3.7/site-packages/ldap/ldapobject.py", line 329, in _ldap_call reraise(exc_type, exc_value, exc_traceback) File "/usr/lib64/python3.7/site-packages/ldap/compat.py", line 44, in reraise raise exc_value File "/usr/lib64/python3.7/site-packages/ldap/ldapobject.py", line 313, in _ldap_call result = func(*args,**kwargs) ldap.SERVER_DOWN: {'desc': "Can't contact LDAP server", 'errno': 22, 'info': 'Invalid argument'} ERROR: Error: {'desc': "Can't contact LDAP server", 'errno': 22, 'info': 'Invalid argument'} DEBUG: dsconf is brought to you by the letter H and the number 25.
The tool can not reach the directory server. The server is not running, or server.example.com is not resolving. Try "localhost" or an IP address instead...
[root@server /]# dsconf -v -D "cn=Directory Manager" server backup create is successful.
But, still it should not give traceback when server is not running, or server.example.com is not resolving.
[root@server /]# dsconf -v -D "cn=Directory Manager" server backup create is successful. But, still it should not give traceback when server is not running, or server.example.com is not resolving.
The traceback only occurs if you use verbose option -v. This is by design. When you don't use "-v" it clearly states the exception is:
Error: {'desc': "Can't contact LDAP server", 'errno': 22, 'info': 'Invalid argument'}
This is the format the then entire tool suite uses.
Closing ticket as this is not a bug.
Metadata Update from @mreynolds: - Issue close_status updated to: invalid - Issue status updated to: Closed (was: Open)
389-ds-base is moving from Pagure to Github. This means that new issues and pull requests will be accepted only in 389-ds-base's github repository.
This issue has been cloned to Github and is available here: - https://github.com/389ds/389-ds-base/issues/3095
If you want to receive further updates on the issue, please navigate to the github issue and click on subscribe button.
subscribe
Thank you for understanding. We apologize for all inconvenience.
Metadata Update from @spichugi: - Issue close_status updated to: wontfix (was: invalid)
Login to comment on this ticket.