Hi All,
I'm using the Grommunio Appliance based on OpenSuse.
And it works like a charm, however, I just updated to the latest version and since then the Admin UI wouldn't let me login. So after a restart with "systemctl restart grommunio-admin-api", I was able to login again.
This seems related to the fact that MySQL database is not started and the grommunio-admin-api tries to connect.
This shows up in the journal logging, with a
journalctl -u grommunio-admin-api | grep 'Database connection failed'
You see this just after a reboot.
Database connection failed with error 2002: Can't connect to local MySQL server through socket '/run/mysql/mysql.sock' (2)
Then again with a
systemctl restart grommunio-admin-api
this error is gone and all starts to work fine.
However one more issue occurs after restart of grommunio-admin-api.
Under the Monitor option trying to open a log gives an error "The server encountered an error while processing the request".
With a
journalctl -u grommunio-admin-api
I get this:
uwsgi[8775]: [ERROR] (grommunio Admin API) Traceback (most recent call last):
uwsgi[8775]: File "/usr/lib/python3.11/site-packages/flask/app.py", line 1484, in full_dispatch_request
uwsgi[8775]: rv = self.dispatch_request()
uwsgi[8775]: ^^^^^^^^^^^^^^^^^^^^^^^
uwsgi[8775]: File "/usr/lib/python3.11/site-packages/flask/app.py", line 1469, in dispatch_request
uwsgi[8775]: return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
uwsgi[8775]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
uwsgi[8775]: File "/usr/share/grommunio-admin-api/api/core.py", line 204, in wrapper
uwsgi[8775]: return call()
uwsgi[8775]: ^^^^^^
uwsgi[8775]: File "/usr/share/grommunio-admin-api/api/core.py", line 169, in call
uwsgi[8775]: ret = func(*args, **kwargs)
uwsgi[8775]: ^^^^^^^^^^^^^^^^^^^^^
uwsgi[8775]: File "/usr/share/grommunio-admin-api/endpoints/system/logs.py", line 35, in getLog
uwsgi[8775]: return jsonify(data=LogReader.tail(log.get("format", "journald"), log["source"], n, skip, after))
uwsgi[8775]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
uwsgi[8775]: File "/usr/share/grommunio-admin-api/tools/logs.py", line 59, in tail
uwsgi[8775]: return cls.rreg[source](target).tail(*args, **kwargs)
uwsgi[8775]: ^^^^^^^^^^^^^^^^^^^^^^^^
uwsgi[8775]: File "/usr/share/grommunio-admin-api/tools/logs.py", line 75, in __init__
uwsgi[8775]: self.reader.add_match(_SYSTEMD_UNIT=unit)
uwsgi[8775]: File "/usr/lib64/python3.11/site-packages/systemd/journal.py", line 244, in add_match
uwsgi[8775]: super(Reader, self).add_match(arg)
uwsgi[8775]: SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats
uwsgi[8775]: [WARNING] (grommunio Admin API) GET /api/v1/system/logs/Gromox midb?n=100 from
The error "SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats" indicates that an obsolete(?) pycrypto library is used.
According to Stackoverflow https://stackoverflow.com/questions/70705404/systemerror-py-ssize-t-clean-macro-must-be-defined-for-formats,
a library pycryptodome should be used instead of pycrypto.
Is there a solution for both issue's ?