same issue on Ubuntu 20.04.3 LTS btw
i couldn’t find a systemd unit for /var/log on Ubuntu, so i used the root mount unit instead.
using
sudo systemctl edit emomhub.service --full
should read
sudo systemctl edit emonhub.service --full
[Edited as per correction below. Moderator (RW)]
i changed:
Requires=-.mount
After=-.mount network.target
after which emhub started succesfully
sudo systemctl start emonhub.service
-@emon:~/emonhub$ sudo systemctl status emonhub.service
● emonhub.service - emonHub data multiplexer
Loaded: loaded (/etc/systemd/system/emonhub.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2022-03-04 07:04:03 UTC; 7s ago
Process: 61353 ExecStartPre=/bin/mkdir -p -m 0775 /var/log/emonhub/ (code=exited, status=0/SUCCESS)
Process: 61354 ExecStartPre=/bin/chgrp -R emonhub /var/log/emonhub/ (code=exited, status=0/SUCCESS)
Main PID: 61355 (python3)
Tasks: 3 (limit: 4612)
Memory: 23.1M
CGroup: /system.slice/emonhub.service
└─61355 python3 /usr/local/bin/emonhub/emonhub.py --config-file=/etc/emonhub/emonhub.conf --logfile=/var/log/emonhub/emonhub.log
Mar 04 07:04:03 emon systemd[1]: Starting emonHub data multiplexer...
Mar 04 07:04:03 emon systemd[1]: Started emonHub data multiplexer.
side note the install.sh from stable branch fails on ubuntu with
ERROR: launchpadlib 1.10.13 requires testresources, which is not installed.
solution:
sudo apt install python3-testresources