5 Dec
2019
5 Dec
'19
2:17 p.m.
I think I have a lead: after having removed Restart=always
which masked the details about the systemd service failure, I get:
# systemctl status qcluster
● qcluster.service - HyperKitty async tasks runner
Loaded: loaded (/etc/systemd/system/qcluster.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2019-12-05 15:04:06 CET; 2s ago
Process: 1199893 ExecStart=/usr/bin/django-admin qcluster --pythonpath <django_project_path> --settings settings (code=exited, status=1/FAILURE)
Main PID: 1199893 (code=exited, status=1/FAILURE)
Dec 05 15:04:06 samsung4-ubuntu django-admin[1199893]: configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
Dec 05 15:04:06 samsung4-ubuntu django-admin[1199893]: File "/usr/lib/python3/dist-packages/django/utils/log.py", line 76, in configure_logging
Dec 05 15:04:06 samsung4-ubuntu django-admin[1199893]: logging_config_func(logging_settings)
Dec 05 15:04:06 samsung4-ubuntu django-admin[1199893]: File "/usr/lib/python3.7/logging/config.py", line 800, in dictConfig
Dec 05 15:04:06 samsung4-ubuntu django-admin[1199893]: dictConfigClass(config).configure()
Dec 05 15:04:06 samsung4-ubuntu django-admin[1199893]: File "/usr/lib/python3.7/logging/config.py", line 571, in configure
Dec 05 15:04:06 samsung4-ubuntu django-admin[1199893]: '%r' % name) from e
Dec 05 15:04:06 samsung4-ubuntu django-admin[1199893]: ValueError: Unable to configure handler 'file'
Dec 05 15:04:06 samsung4-ubuntu systemd[1]: qcluster.service: Main process exited, code=exited, status=1/FAILURE
Dec 05 15:04:06 samsung4-ubuntu systemd[1]: qcluster.service: Failed with result 'exit-code'.
The file
handler is configured that way in settings.py
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'filters': {
'require_debug_false': {
'()': 'django.utils.log.RequireDebugFalse'
}
},
'handlers': {
...
'file':{
'level': 'INFO',
#'class': 'logging.handlers.RotatingFileHandler',
'class': 'logging.handlers.WatchedFileHandler',
### 'filename': os.path.join(BASE_DIR, 'logs', 'mailmansuite.log'),
'filename': '/var/log/mailman3/mailmansuite.log',
'formatter': 'verbose',
},
...
'formatters': {
'verbose': {
'format': '%(levelname)s %(asctime)s %(process)d %(name)s %(message)s'
},
...
Anything suspicious?