Univention Bugzilla – Bug 49016
AdminDiary: NoSuchModuleError: Can't load plugin: sqlalchemy.dialects:None
Last modified: 2022-09-21 17:07:51 CEST
Internal server error during "admindiary/options". Request: admindiary/options Traceback (most recent call last): File "%PY2.7%/univention/management/console/base.py", line 253, in execute function.__func__(self, request, *args, **kwargs) File "%PY2.7%/univention/management/console/modules/decorators.py", line 318, in _response result = _multi_response(self, request) File "%PY2.7%/univention/management/console/modules/decorators.py", line 192, in _response return function(self, request) File "%PY2.7%/univention/management/console/modules/decorators.py", line 440, in _response return list(function(self, iterator, *nones)) File "%PY2.7%/univention/management/console/modules/decorators.py", line 286, in _fake_func yield function(self, *args) File "%PY2.7%/univention/management/console/modules/admindiary/__init__.py", line 105, in options with get_client(version=1) as client: File "/usr/lib/python2.7/contextlib.py", line 17, in __enter__ return self.gen.next() File "%PY2.7%/univention/admindiary/backend.py", line 324, in get_client with get_session() as session: File "/usr/lib/python2.7/contextlib.py", line 17, in __enter__ return self.gen.next() File "%PY2.7%/univention/admindiary/backend.py", line 73, in get_session session = make_session_class()() File "%PY2.7%/univention/admindiary/backend.py", line 66, in make_session_class engine = get_engine() File "%PY2.7%/univention/admindiary/backend.py", line 62, in get_engine return sqlalchemy.create_engine(db_url) File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/__init__.py", line 386, in create_engine return strategy.create(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/strategies.py", line 51, in create entrypoint = u._get_entrypoint() File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/url.py", line 131, in _get_entrypoint cls = registry.load(name) File "/usr/lib/python2.7/dist-packages/sqlalchemy/util/langhelpers.py", line 212, in load (self.group, name)) NoSuchModuleError: Can't load plugin: sqlalchemy.dialects:None Role: domaincontroller_backup
Maybe a missing dependency?
Probably admin/diary/dbms ist not initialized, no idea why. One possibility would be apt install univention-admin-diary-backend --no-recommends
reported again: Version: 4.4-7 errata870 (Blumenthal) Remark: Trying to setup the Admin Diary Frontend. The backend is already installed on another server.
Error reproduced! Solution: When running the Admin Diary Frontend not on the same system the Admin Diary Backend is running on, the following instruction have to be followed: https://help.univention.com/t/admin-diary-how-to-seperate-frontend-and-backend/11331 This description is linked in the installation instruction of the Admin Diary. Unfortunately, after executing all the instruction, starting the Admin Diary Client will generate now present a different error message, that the connection to the DB server cannot be established. The problem is, that there is an error in these instructions. For a postgres DB the command to allow access has to be changed from ucr set postgres9/pg_hba/config/01="host admindiary admindiary 10.11.12.13/32 md5" to ucr set postgres11/pg_hba/config/01="host admindiary admindiary 10.11.12.13/32 md5" With all the changes applied, the Admin Diary Frontend will work as expected.
The above statement concerning the wrong ucr variable for setting the postgres access is true for UCS 5. For UCS 4 the description might be correct.
MR: https://git.knut.univention.de/univention/ucs/-/merge_requests/508 Commit: 24077ebab7
I fixed a little typo and also adjusted the help article. The error most probably originates from splitting diary frontend and backend. But more generally, the problem is a "None://" at the start of the DB uri as indicated by "Can't load plugin: sqlalchemy.dialects:None". BTW: A `dbms = ucr.get('admin/diary/dbms', 'postgresql')` would have helped, too. In that case, I assume this error message would be shown: Die Verbindung zum Admin Diary Backend ist fehlgeschlagen. Das Datenbank-Managementsystem ist "postgresql". Läuft der Dienst und reagiert er auf TCP/IP-Verbindungen? Stellen Sie sicher, dass Ihre Firewall Verbindungen zu 10.200.4.80 erlaubt. Überprüfen Sie das Passwort in /etc/admin-diary.secret. Ist es das gleiche auf replica82 wie auf 10.200.4.80? Darf sich replica82 mit dem Datenbank-Dienst auf 10.200.4.80 verbinden? This is basically covered in the help article. And as this should be the original problem, I think the new error message is fine.
<https://errata.software-univention.de/#/?erratum=5.0x430>