Problem:User will not synchronize from UCS to OX anymore

Problem

If you have the problem, that users will not synchronize from UCS to OX Appsuite and you get this error message in the /var/log/univention/listener.log

LISTENER    ( ERROR   ) : ox-user: handler failed for transaction 1557734217.8934149742: dn: None
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/univention/ox/listener_tools.py", line 774, in process
    dn = entry.dn
  File "/usr/lib/python3/dist-packages/univention/ox/listener_tools.py", line 659, in dn
    if self.new and self.new.dn:
AttributeError: '**QueueEntry**' object has no attribute 'new'

Environment

UCS 5.0-x
Installed apps: oxseforucs until version 7.10.6-ucs3 (OX AppSuite) without the ox-connector.

Info

Hint

If the ox-connector is installed, the following tool don’t exist anymore.

We have a tool, which can be used to list and delete pickle files stored in OX:

/usr/share/univention-ox/manage_listener_queue

Manage the OX listener queue

optional arguments:
  -h, --help        show this help message and exit
  --archive         Move queue files to /var/spool/univention-directory-
                    listener_backup.
  --delete          Delete queue files.
  --list            Print a list of queue files and related information.
  --filter FILTER   Optional regular expression to limit actions to only those
                    DNs that match (interactive and non-interactive), e.g.
                    'uid=alice,' or '^cn=.*,ou=myschool,'. Use single tick
                    quoting to prevent shell expansion.
  --wide            Also show the DN (very long lines).
  --filenames-only  Option to use together with "--list": print a space
                    separated list of filenames, no description.

Solution

You can use the tool like below with some parameters for filter the first 10 broken queue files:

/usr/share/univention-ox/manage_listener_queue --list | head -n 10

and get this output:

Not a or broken queue file: '/var/spool/univention-directory-listener/ox-user/1557734217.8934149742'
Not a or broken queue file: '/var/spool/univention-directory-listener/ox-user/1557733627.5057818890'
Not a or broken queue file: '/var/spool/univention-directory-listener/ox-user/1585941774.8069059849'
Not a or broken queue file: '/var/spool/univention-directory-listener/ox-user/1590643116.6234591007'
Not a or broken queue file: '/var/spool/univention-directory-listener/ox-user/1557734444.5514030457'
Not a or broken queue file: '/var/spool/univention-directory-listener/ox-user/1558503494.7353420258'
Not a or broken queue file: '/var/spool/univention-directory-listener/ox-user/1590643548.5032029152'

Now i prefer to move the broken queue files from the position instead of to delete them into a new created directory:

mkdir /root/broken

mv /var/spool/univention-directory-listener/ox-user/15* /root/broken

Right at this time the broken queue file are been moved, the synchronization have to be start automatically.
You can check this with this command and the repeat it for update the sync status.

/usr/share/univention-ox/manage_listener_queue --list | wc -l

419

/usr/share/univention-ox/manage_listener_queue --list | wc -l

405

1 Like
Mastodon