Univention Bugzilla – Bug 50671
O365: UDM modules not yet available in join script during installation - Traceback while trying to open O365 Assistant
Last modified: 2021-01-11 12:51:46 CET
UCS 4.4-3 Errata 413 Steps: - configured new UCS DC Master from UCs 4.4-3 image - installed O365 connector - clicked on "open" on the O365 Connector page in the App Center Traceback: Interner Server-Fehler in "office365/query". Request: office365/query Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/univention/management/console/base.py", line 358, in __error_handling six.reraise(etype, exc, etraceback) File "/usr/lib/python2.7/dist-packages/univention/management/console/base.py", line 261, in execute function.__func__(self, request, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/univention/management/console/modules/decorators.py", line 321, in _response result = _multi_response(self, request) File "/usr/lib/python2.7/dist-packages/univention/management/console/modules/decorators.py", line 181, in _response return function(self, request) File "/usr/lib/python2.7/dist-packages/univention/management/console/modules/decorators.py", line 443, in _response return list(function(self, iterator, *nones)) File "/usr/lib/python2.7/dist-packages/univention/management/console/modules/decorators.py", line 289, in _fake_func yield function(self, *args) File "/usr/lib/pymodules/python2.7/univention/management/console/modules/office365/__init__.py", line 91, in query 'initialized': AzureAuth.is_initialized(self.adconnection_alias), File "/usr/lib/pymodules/python2.7/univention/office365/azure_auth.py", line 376, in is_initialized tokens = cls.load_tokens(adconnection_alias) File "/usr/lib/pymodules/python2.7/univention/office365/azure_auth.py", line 418, in load_tokens return JsonStorage(AzureADConnectionHandler.get_conf_path('TOKEN_FILE', adconnection_alias)).read() File "/usr/lib/pymodules/python2.7/univention/office365/azure_auth.py", line 98, in get_conf_path conf_dir = os.path.join(ADCONNECTION_CONF_BASEPATH, adconnection_alias) File "/usr/lib/python2.7/posixpath.py", line 68, in join if b.startswith('/'): AttributeError: 'NoneType' object has no attribute 'startswith'
The reason is a timing issue: The O365 join script running during installation fails, from join.log: ---- Terminating running univention-cli-server processes. Object exists: cn=office365,dc=univention-gmbh,dc=intranet Object exists: cn=profiles,cn=office365,dc=univention-gmbh,dc=intranet Object exists: cn=ad-connections,cn=office365,dc=univention-gmbh,dc=intranet unknown module office365/profile. Available Modules are: appcenter/app computers/computer computers/domaincontroller_backup computers/domaincontroller_master computers/domaincontroller_slave [..] ---- The join script is marked as not executed. Calling "univention-run-joinscripts" later is successfull and afterwards the UMC module of the O365 App starts.
reported again: Version: 4.4-3 errata413 (Blumenthal) Ticket#2020011021001062 Remark: Internal server error during "office365/query".
Reported again: Version: 4.4-3 errata455 (Blumenthal) Traceback(28b9fbe8e815358326c62adc5102f772): Interner Server-Fehler in "office365/query". Request: office365/query Role: domaincontroller_master
Reported again Version: 4.4-4 errata589 (Blumenthal) Traceback(28b9fbe8e815358326c62adc5102f772): Internal server error during "office365/query". Request: office365/query Role: domaincontroller_master
Reported again Version: 4.4-4 errata589 (Blumenthal) Traceback(28b9fbe8e815358326c62adc5102f772): Interner Server-Fehler in "office365/query". Request: office365/query Role: domaincontroller_master
Ticket#2020090321000581 — [UMC-Feedback] Traceback Bitte nehmen Sie sich einen Augenblick Zeit, um die folgenden Informationen bereitzustellen: 1) Schritte, um den Fehler zu reproduzieren 2) erwartetes Ergebnis 3) beobachtetes Ergebnis ---------- UCS Version: 4.4-5 errata652 (Blumenthal) Interner Server-Fehler in "office365/query". AttributeError: 'NoneType' object has no attribute 'startswith' if b.startswith('/'): File "/usr/lib/python2.7/posixpath.py", line 68, in join conf_dir = os.path.join(ADCONNECTION_CONF_BASEPATH, adconnection_alias) File "/usr/lib/pymodules/python2.7/univention/office365/azure_auth.py", line 98, in get_conf_path return JsonStorage(AzureADConnectionHandler.get_conf_path('TOKEN_FILE', adconnection_alias)).read() File "/usr/lib/pymodules/python2.7/univention/office365/azure_auth.py", line 418, in load_tokens tokens = cls.load_tokens(adconnection_alias) File "/usr/lib/pymodules/python2.7/univention/office365/azure_auth.py", line 376, in is_initialized 'initialized': AzureAuth.is_initialized(self.adconnection_alias), File "/usr/lib/pymodules/python2.7/univention/management/console/modules/office365/__init__.py", line 91, in query yield function(self, *args) File "/usr/lib/python2.7/dist-packages/univention/management/console/modules/decorators.py", line 289, in _fake_func return list(function(self, iterator, *nones)) File "/usr/lib/python2.7/dist-packages/univention/management/console/modules/decorators.py", line 443, in _response return function(self, request) File "/usr/lib/python2.7/dist-packages/univention/management/console/modules/decorators.py", line 181, in _response result = _multi_response(self, request) File "/usr/lib/python2.7/dist-packages/univention/management/console/modules/decorators.py", line 321, in _response function.__func__(self, request, *args, **kwargs) File "/usr/lib/python2.7/dist-packages/univention/management/console/base.py", line 262, in execute six.reraise(etype, exc, etraceback) File "/usr/lib/python2.7/dist-packages/univention/management/console/base.py", line 359, in __error_handling Traceback (most recent call last): Request: office365/query Interner Server-Fehler in "office365/query". --
I had this problem ~3 times in one day while trying to test the wizard
I can confirm this bug and even after a reboot it is not possible to open the app. A known hotfix is to run `univention-run-join-scripts`
When this happened to me, I noticed that `udm office365/profile list` did not work, the module was not found. But `/usr/lib/python2.7/dist-packages/univention/admincli/admin.py office365/profile list` found the module without showing any error. Executing "kill -9" on the running univention-cli-server process resolved this.
We think that the module is installed correctly, but the ucs_registerLDAPExtension call fails to terminate the univention-cli-server
(In reply to Erik Damrose from comment #13) > We think that the module is installed correctly, but the > ucs_registerLDAPExtension call fails to terminate the univention-cli-server Yeah, that's what I thought too.
Added pidof -x univention-cli-server && stop_udm_cli_server to the join script (40univention-office365.inst) just before the udm calls. 9553acb4ab1d34253bc47bd243dfd6f447e3ea30 - univention-office365 Successful build Package: univention-office365 Version: 2.0.2-92A~4.4.0.202012151414 Branch: ucs_4.4-0 Scope: office365
Couldn't reproduce issue with the added workaround: OK When reproducing the error, module office365/profile is not found by udm, after executing ''' . /usr/share/univention-lib/all.sh pidof -x univention-cli-server && stop_udm_cli_server ''' the module is found again. Build: OK Verified
Released with App Version Univention Microsoft 365 Connector v3.3