Univention Bugzilla – Bug 41335
Multiple AD-Connector instances
Last modified: 2017-11-01 13:49:21 CET
Same for AD-Connector: I just type "univention-ad-connector" as root and hit return and then I have another AD-Connector running. Even worse: root@master:~# univention-ad-connector --help And you started yet another one. +++ This bug was initially created as a clone of Bug #34410 +++ Ticket#: 2014031921010642 We have seen three customer systems running multiple (two) instances of the s4-connector. There sould be some logic to prevent this.
Created attachment 8389 [details] Patch: prevent multiple ad-connector instances The attached is a port of what was implemented in bug #34410 for the s4-connector. This prevents multiple ad-connector instances from running.
(In reply to Lukas Oyen from comment #1) > Created attachment 8389 [details] > Patch: prevent multiple ad-connector instances > > The attached is a port of what was implemented in bug #34410 for the > s4-connector. > > This prevents multiple ad-connector instances from running. The patch contains multiple references to the S4-Connector. The error messages should say "AD-Connector" and the lockfile path should not be /var/lock/univention-s4-connector.
Created attachment 8390 [details] Patch: prevent multiple ad-connector instances (In reply to Florian Best from comment #2) > The patch contains multiple references to the S4-Connector. The error > messages should say "AD-Connector" and the lockfile path should not be > /var/lock/univention-s4-connector. Sorry, right. It seemed so simple, that I overlooked that. Thank you!
The patch has been applied. univention-ad-connector (11.0.6-15): r81375 | Bug #41335: prevent starting multiple AD connector instances univention-ad-connector.yaml: r81376 | YAML Bug #41335
After the package update "univention-ad-connector --help" still starts a second process. I think a "/etc/init.d/univention-ad-connector start" is required in postinst for update situations. =========================================================================== root@master10:~# univention-upgrade Starting univention-upgrade. Current UCS version is 4.2-1 errata144 Checking for local repository: none Checking for package updates: found The following packages will be installed: python-pexpect The following packages will be upgraded: libpq5,shell-univention-lib,python-univention-lib,univention-base-packages,univention-base-files,univention-apache,univention-web-js,univention-web-style,univention-management-console-login,univention-management-console-frontend,univention-management-console-web-server,univention-management-console-module-updater,univention-updater,univention-management-console-module-join,univention-join,univention-management-console,univention-management-console-server,python-univention-management-console,univention-management-console-module-setup,univention-system-setup,univention-management-console-module-apps,univention-appcenter,univention-appcenter-docker,univention-management-console-module-appcenter,python-univention-appcenter,univention-management-console-module-diagnostic,univention-ad-connector,univention-management-console-module-adconnector,python-univention-connector-ad,python-univention-connector,univention-ldap-acl-master,univention-ldap-server,univention-ldap-config,postgresql-client-9.1,postgresql-client-9.4,univention-samba4,univention-samba4-sysvol-sync,univention-s4-connector,python-univention-connector-s4,python-univention-directory-reports,univention-directory-reports,univention-firewall,univention-ldap-client Do you want to continue [Y|n]? Starting package upgrade done Starting univention-upgrade. Current UCS version is 4.2-1 errata144 Checking for local repository: none Checking for package updates: none Checking for app updates: none Checking for release updates: none Setting update/available root@master10:~# ps ax | grep conn 8723 ? S 0:01 /usr/bin/python2.7 -W ignore /usr/share/pyshared/univention/connector/ad/main.py 17471 ? S 0:00 /usr/bin/python2.7 -W ignore /usr/lib/pymodules/python2.7/univention/s4connector/s4/main.py 21214 pts/0 S+ 0:00 grep conn root@master10:~# univention-ad-connector --help root@master10:~# ps ax | grep conn 8723 ? S 0:01 /usr/bin/python2.7 -W ignore /usr/share/pyshared/univention/connector/ad/main.py 17471 ? S 0:00 /usr/bin/python2.7 -W ignore /usr/lib/pymodules/python2.7/univention/s4connector/s4/main.py 21250 ? S 0:00 /usr/bin/python2.7 -W ignore /usr/share/pyshared/univention/connector/ad/main.py 21252 pts/0 S+ 0:00 grep conn root@master10:~# dpkg -l univention-ad-connector | tail -1 ii univention-ad-connector 11.0.6-25A~4.2.0.201708231431 all UCS - Modules for sync UCS and Active Directory
Strange, I added a crestart to the python-univention-connector-ad postinst. There is already one in univention-ad-connector. univention-ad-connector (11.0.6-26): r82558 | Bug #41335: restart AD Connector in postinst
python-univention-connector-ad (11.0.6-26A~4.2.0.201708301735) wird eingerichtet ... /var/lib/dpkg/info/python-univention-connector-ad.postinst: 40: /var/lib/dpkg/info/python-univention-connector-ad.postinst: Syntax error: ";;" unexpected (expecting "then") dpkg: Fehler beim Bearbeiten des Paketes python-univention-connector-ad (--configure): Unterprozess installiertes post-installation-Skript gab den Fehlerwert 2 zurück univention-management-console-module-adconnector (11.0.6-26A~4.2.0.201708301735) wird eingerichtet ... Calling joinscript 35univention-management-console-module-adconnector.inst ... 2017-08-30 23:23:43.802457915+02:00 (in joinscript_init) Joinscript 35univention-management-console-module-adconnector.inst finished with exitcode 1 dpkg: Abhängigkeitsprobleme verhindern Konfiguration von univention-ad-connector: univention-ad-connector hängt ab von python-univention-connector-ad (= 11.0.6-26A~4.2.0.201708301735); aber: Paket python-univention-connector-ad ist noch nicht konfiguriert.
New package is building. univention-ad-connector (11.0.6-27): r82560 | Bug #41335: fix typo
Ok, works.
<http://errata.software-univention.de/ucs/4.2/205.html>