5 Dec
2019
5 Dec
'19
10:16 a.m.
Mark Sapiro wrote:
Did you replace <django_project_path>, <user> and <group> with appropriate values? Yes, I did, otherwise qcluster service would not be able to start in the first place because it needs to be able to read settings.py (with the proper permissions) which is located in the django project.
They should be the same thing. Usually manage.py is just configured to run the django-admin command for the particular project. You're right, running either command manually is successful and lead to the same result:
<django_project_path># python3 manage.py qcluster
10:49:41 [Q] INFO Q Cluster-1130205 starting.
10:49:41 [Q] INFO Process-1:1 ready for work at 1130235
10:49:41 [Q] INFO Process-1:2 ready for work at 1130236
10:49:41 [Q] INFO Process-1:3 ready for work at 1130237
10:49:41 [Q] INFO Process-1:4 ready for work at 1130238
10:49:41 [Q] INFO Process-1:5 monitoring at 1130239
10:49:41 [Q] INFO Process-1 guarding cluster at 1130234
10:49:41 [Q] INFO Q Cluster-1130205 running.
10:49:41 [Q] INFO Process-1:6 pushing tasks at 1130240
If I replace:
ExecStart=/usr/bin/django-admin qcluster --pythonpath <django_project_path>
--settings settings
with:
WorkingDirectory=<django_project_path>
ExecStart=python3 manage.py qcluster
I get the same systemd service issue.
If I remove the remote-fs.target
from After=...
, I get the following error:
# systemctl daemon-reload
# systemctl restart qcluster
# systemctl status qcluster
● qcluster.service - HyperKitty async tasks runner
Loaded: loaded (/etc/systemd/system/qcluster.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2019-12-05 11:08:54 CET; 282ms ago
Main PID: 1132324 (python3)
Tasks: 1 (limit: 9284)
Memory: 22.5M
CGroup: /system.slice/qcluster.service
└─1132324 python3 /usr/bin/django-admin qcluster --pythonpath <django_project_path> --settings settings
Dec 05 11:08:54 samsung4-ubuntu django-admin[1132324]: configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
Dec 05 11:08:54 samsung4-ubuntu django-admin[1132324]: File "/usr/lib/python3/dist-packages/django/utils/log.py", line 76, in configure_logging
Dec 05 11:08:54 samsung4-ubuntu django-admin[1132324]: logging_config_func(logging_settings)
Dec 05 11:08:54 samsung4-ubuntu django-admin[1132324]: File "/usr/lib/python3.7/logging/config.py", line 800, in dictConfig
Dec 05 11:08:54 samsung4-ubuntu django-admin[1132324]: dictConfigClass(config).configure()
Dec 05 11:08:54 samsung4-ubuntu django-admin[1132324]: File "/usr/lib/python3.7/logging/config.py", line 571, in configure
Dec 05 11:08:54 samsung4-ubuntu django-admin[1132324]: '%r' % name) from e
Dec 05 11:08:54 samsung4-ubuntu django-admin[1132324]: ValueError: Unable to configure handler 'file'
Dec 05 11:08:54 samsung4-ubuntu systemd[1]: qcluster.service: Main process exited, code=exited, status=1/FAILURE
Dec 05 11:08:54 samsung4-ubuntu systemd[1]: qcluster.service: Failed with result 'exit-code'.
This issue seems related to logging; I configured the following in /etc/mailman3/mailman.cfg
:
[logging.debian]
format: %(asctime)s (%(process)d) %(message)s
datefmt: %b %d %H:%M:%S %Y
propagate: no
level: debug
path: mailman.log
[logging.root]
level: debug
[logging.archiver]
level: debug
[logging.bounce]
level: debug
[logging.config]
level: debug
[logging.database]
level: debug
[logging.debug]
level: debug
[logging.error]
level: debug
[logging.fromusenet]
level: debug
[logging.http]
level: debug
[logging.locks]
level: debug
[logging.mischief]
level: debug
[logging.plugins]
level: debug
[logging.runner]
level: debug
[logging.smtp]
level: debug
[logging.subscribe]
level: debug
[logging.vette]
level: debug