After a recent full update the emonhub process was failing to start so I investigated the syslog file and found that the start script was exiting with permissions failure on access to the emonhub log file.
I checked /var/log/emonhub/emonhub.log and it was owner was emonhub:emonhub with rw for owner but only r for group.
The emonhub process runs as user pi, which is a member of the emonhub group, so it looks like there is an error somewhere the new log file creation or logrotate process not setting the group permissions correctly.
The log stopped getting written to at 23:56 so I assume it happened at the first rotation after the update. Then on next reboot the emonhub process would not start.
I fixed temporarily by changing the log file perms but not sure will happen on next rotation.
Thanks for raising, I think I know what’s happening here, I think we need to update the permissions on the log within the update process, will sort that now. This relates to a change I made yesterday.
I think I’m having the same sort of problem and have attached info on my system.
Emonhub keeps trying to run but won’t and emonhub.log remains empty. I changed permissions on the log file to 775 but that didn’t help.
My server is an RPI4 with 8GB of memory. It’s receiving data from MQTT clients so that part is working correctly. The system has been working fine for several years so I’m not sure what happened.
I have a basic knowledge of Linux but am not a programmer. I have received lots of help from members of this forum. Please let me know if you need additional information.
Thanks in advance @bgrattan
I have updated the emonhub component on stable and it has changed the log file owner and group to pi.
I assume this would have also replaced the service file.
Its about…17 years since I used UNIX, and I have never used Linux. At the time I was just about able to use “su” in controlled environments, I tried here and gave up, didn’t think of “sudo”. Thanks!