Invalid User and Service not found

I’m running an emonTX/RPi with emonSD image Oct 2018 ver 9.9.8

/etc/rc.local contains the following 2 lines …

chown -R openhab:openhab /var/log/openhab
chown -R openhab:openhab /var/log/openhab2

When I run these 2 lines in puTTY using sudo, I get the following error …

chown: invalid user: ‘openhab:openhab’

/etc/rc.local also contains the line …

service mqtt_input restart

This line when run in puTTY with sudo gives …

Failed to restart mqtt_input.service: Unit mqtt_input.service not found.

Should I be concerned?

The latest image doesn’t have openhab/openhab2 so those lines should be removed or commented out.

The emoncms mqtt_input service is now the emoncms_mqtt service. There was a comment recently about this service in rc.local but i can’t find it now. It, plus the service-runner have recently been added to rc.local at the emonpi repo

I would have expected those resent changes to be included in the emonpi/sd update routine too but I can find no evidence of that being the case.

Paul …
Per below, I’ve found emoncms_mqtt to be active …

pi@emonpi-node-13:~ $ systemctl status emoncms_mqtt
● emoncms_mqtt.service - Emoncms emoncms_mqtt script
   Loaded: loaded (/var/www/emoncms/scripts/services/emoncms_mqtt/emoncms_mqtt.s
   Active: active (running) since Tue 2019-03-12 17:32:02 GMT; 20h ago
 Main PID: 799 (php)
   CGroup: /system.slice/emoncms_mqtt.service
           └─799 /usr/bin/php /var/www/emoncms/scripts/services/emoncms_mqtt/emo

Warning: Journal has been rotated since unit was started. Log output is incomple

So to be clear - I should comment out the 2 openhab lines and the mqtt_input line ??

And I will also make the recent jessieminimal changes (ref: emoncms_mqtt and service-runner) to my emonSD image 9.9.8 version of rc.local.

And I assume these changes will be made to the offial image in due course.

Where’s the best place to look for ideally documentation or otherwise code of the emoncms startup?

Not sure what you mean by this.

If you are referring to how an EmonSD is configured on startup, then there is the details on the Wiki though the build guide has not been updated for the current image.

If you self install, then the startup is whatever you make it to be. Emoncms does not determine that, the services associated with it do have an impact on the system startup though.

Code entry point, maybe?

This came up in the discussions about service-runner handling multiple instances of emoncms…

There isn’t actually anything in EmonCMS that “starts”. Its a website with various entry points that is started when your web hosting platform starts (be that apache, lighttpd etc).

There are other components which are added on the EmonSD image that add functionality to EmonCMS (such as the service-runner, emonhub, mqtt, etc.) but they’re not required for EmonCMS to work. As @borpin indicated in his post above, the best source of information at the moment is the old build guide (which still needs to be updated for the new SD image).

Thanks for the helpful reply.

I understand that the website responds to user input as required. But its initial behaviour differs from its permanent later behaviour because it has initialisation code. Is that code path documented anywhere?

And maybe I’m using the wrong word when I say ‘emoncms’ (what is the right word to describe the overall system, please?) but there are other things, like emonhub, service-runner, feedwriter, redis etc that the system installs and/or depends on. Are those dependencies and interactions documented anywhere?

And yes, I appreciate that some of these things are mentioned around scattered install docs and suchlike, but is there anything that describes the overall structure?

I clicked on the build guide and thought it wasn’t what I wanted. But then I clicked on emonPi SD card build guide and that is pretty much what I’m thinking of, so thanks.

Though as you say, it is well out of date and so wrong in many respects.