# Emonhub fails to start - Unit var-log.mount not found

**URL:** <https://community.openenergymonitor.org/t/emonhub-fails-to-start-unit-var-log-mount-not-found/19912>\
**Category:** emonHub\
**Tags:** emonhub\
**Created:** [3 March 2022 08:55 UTC](https://community.openenergymonitor.org/t/emonhub-fails-to-start-unit-var-log-mount-not-found/19912 "2022-03-03T08:55:07Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![gerombo](https://community.openenergymonitor.org/letter_avatar_proxy/v4/letter/g/13edae/32.png) [@gerombo](https://community.openenergymonitor.org/u/gerombo)\
**Post date:** [4 March 2022 06:48 UTC](https://community.openenergymonitor.org/t/emonhub-fails-to-start-unit-var-log-mount-not-found/19912/5 "2022-03-04T06:48:11Z")

</div>

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:

```auto
Requires=-.mount 
After=-.mount network.target

```

after which emhub started succesfully

```auto
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`

---

_[View the full topic](https://community.openenergymonitor.org/t/emonhub-fails-to-start-unit-var-log-mount-not-found/19912)._
