Bug 48820 - Traceback of ucsschool-s4-branch-site.py in join.log
Traceback of ucsschool-s4-branch-site.py in join.log
Status: NEW
Product: UCS@school
Classification: Unclassified
Component: Samba 4 - Slave PDC
UCS@school 4.4
Other Linux
: P5 normal (vote)
: ---
Assigned To: Samba maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-02-28 15:50 CET by Sönke Schwardt-Krummrich
Modified: 2019-02-28 15:50 CET (History)
0 users

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 1: Cosmetic issue or missing function but workaround exists
Who will be affected by this bug?: 4: Will affect most installed domains
How will those affected feel about the bug?: 1: Nuisance – not a big deal but noticeable
User Pain: 0.023
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sönke Schwardt-Krummrich univentionstaff 2019-02-28 15:50:21 CET
Upon first initialization, the listener module ucsschool-s4-branch-site.py fails to connect to the local LDAP server with the following traceback. Next, all listener modules are initialized but not the module ucsschool-s4-branch-site.py. 
After initialization of the listener, which is logged to join.log, the listener is restarted, notices the uninitialized listener module ucsschool-s4-branch-site.py which is then initialized.

We should try to prevent the long traceback and print a more apropriate single line log message.

Configure 03univention-directory-listener.inst Thu Feb 21 14:52:56 CET 2019
2019-02-21 14:52:56.951379433+01:00 (in joinscript_init)
21.02.19 14:52:57.512  DEBUG_INIT
21.02.19 14:52:57.521  LDAP        ( PROCESS ) : connecting to ldap://master170.nstx.local:7389
UNIVENTION_DEBUG_BEGIN  : uldap.__open host=slave178.nstx.local port=7389 base=dc=nstx,dc=local
21.02.19 14:53:11.525  LISTENER    ( ERROR   ) : import of filename=/usr/lib/univention-directory-listener/system/ucsschool-s4-branch-site.py failed
Traceback (most recent call last):
  File "/usr/lib/univention-directory-listener/system/ucsschool-s4-branch-site.py", line 137, in <module>
    on_load()
  File "/usr/lib/pymodules/python2.7/ucsschool/lib/schoolldap.py", line 121, in wrapper_func
    kwargs[MACHINE_READ], po = get_machine_connection(write=False)
  File "/usr/lib/pymodules/python2.7/univention/management/console/ldap.py", line 100, in get_machine_connection
    return connection()
  File "/usr/lib/pymodules/python2.7/univention/management/console/ldap.py", line 140, in _decorated
    kwargs[loarg], kwargs[poarg] = lo, po = getter()
  File "/usr/lib/pymodules/python2.7/univention/management/console/ldap.py", line 130, in getter
    conn = connection()
  File "/usr/lib/pymodules/python2.7/univention/management/console/ldap.py", line 63, in connection
    return _getMachineConnection(**kwargs)
  File "/usr/lib/pymodules/python2.7/univention/admin/uldap.py", line 171, in getMachineConnection
    lo = univention.uldap.getMachineConnection(start_tls, decode_ignorelist=decode_ignorelist, ldap_master=ldap_master)
  File "/usr/lib/pymodules/python2.7/univention/uldap.py", line 105, in getMachineConnection
    return access(host=ucr['ldap/server/name'], port=port, base=ucr['ldap/base'], binddn=ucr['ldap/hostdn'], bindpw=bindpw, start_tls=start_tls, decode_ignorelist=decode_ignorelist, reconnect=reconnect)
  File "/usr/lib/pymodules/python2.7/univention/uldap.py", line 166, in __init__
    self.__open(ca_certfile)
  File "/usr/lib/pymodules/python2.7/univention/uldap.py", line 216, in __open
    self.lo.start_tls_s()
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 954, in start_tls_s
    res = self._apply_method_s(SimpleLDAPObject.start_tls_s,*args,**kwargs)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 935, in _apply_method_s
    self.reconnect(self._uri,retry_max=self._retry_max,retry_delay=self._retry_delay)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 911, in reconnect
    raise e
ldap.SERVER_DOWN: {'desc': "Can't contact LDAP server"}
21.02.19 14:53:11.528  LISTENER    ( ERROR   ) : import of filename=/usr/lib/univention-directory-listener/system/ucsschool-s4-branch-site.py failed in module_import()
UNIVENTION_DEBUG_BEGIN  : uldap.__open host=master170.nstx.local port=7389 base=dc=nstx,dc=local
UNIVENTION_DEBUG_END    : uldap.__open host=master170.nstx.local port=7389 base=dc=nstx,dc=local
21.02.19 14:53:12.353  LISTENER    ( WARN    ) : handler: replication (not ready) (ignore)
Restarting slapd (via systemctl): slapd.service.
21.02.19 14:53:13.764  LISTENER    ( WARN    ) : handler: s4-connector (not ready) (ignore)
21.02.19 14:53:13.773  LISTENER    ( WARN    ) : handler: faillog (not ready) (ignore)
21.02.19 14:53:13.781  LISTENER    ( WARN    ) : Set Schema ID to 8
21.02.19 14:53:13.782  LISTENER    ( WARN    ) : initializing module replication
File: /var/lib/univention-ldap/ldap/DB_CONFIG
slapd: Kein Prozess gefunden
File: /var/lib/univention-ldap/ldap/DB_CONFIG
Starting slapd (via systemctl): slapd.service.
Restarting slapd (via systemctl): slapd.service.
21.02.19 14:53:22.028  LISTENER    ( WARN    ) : finished initializing module replication with rv=0
21.02.19 14:53:22.028  LISTENER    ( WARN    ) : initializing module pupilgroups
[...]