Recreate listener cache

ucs-4
listener
cache
corrupt
io-error
bad-cache

#1

Problem:

The univention directory listener fails with I/O errors in the /var/log/univention/listener.log - no further replication is done (see also SDB article 1303). The reason is corrupt listener cache - this can happen if the filesystem ran out of free space for example.

Example snip from listener.log:

17.01.15 13:45:18.851 LISTENER ( ERROR ) : database error: unable to create/retrieve page 3462
17.01.15 13:45:18.851 LISTENER ( ERROR ) : database error: PANIC: Input/output error
17.01.15 13:45:18.851 LISTENER ( ERROR ) : database error: c_get: Input/output error

It may be possible, that you only see DEBUG_INIT in the listener.log for all log levels. Please check if a file named “bad_cache” exists in the following folder:

/var/lib/univention-directory-listener/

If that is the case, please delete the bad_cache file and proceed with the solution by recreating the listener cache as mentioned below.

Solution:

You can recreate/invalidate the listener cache.

1. Stop the listener:

/etc/init.d/univention-directory-listener stop
sleep 5
pkill -9 -f /usr/sbin/univention-directory-listener

2. Restart the listener with additional parameters:

eval "$(ucr shell)"
/usr/sbin/univention-directory-listener -F -b $ldap_base \
  -m /usr/lib/univention-directory-listener/system \
  -c /var/lib/univention-directory-listener -d $listener_debug_level \
  -x -ZZ -D cn=admin,$ldap_base -y /etc/ldap.secret \
  -g /var/log/univention/listener.log 2&>1 &

The initial resync could take a while - the follwing commands help you by monitoring the replication status (see also SDB article 1303):

DC Master:

tail -1 /var/lib/univention-ldap/notify/transaction

DC Slave:

cat /var/lib/univention-directory-listener/notifier_id

3. If the resync is finished stop the listener and restart via init:

pkill -f /usr/sbin/univention-directory-listener
sleep 5
/etc/init.d/univention-directory-listener start

Listener not synchronising on samba4 backend machines
Listener not synchronising on samba4 backend machines