Services not restarting on upgrade to 9.9.7

Installed okay on 9.9.5 but after reboot all the services don’t start (also my pulse count reset from over 8000 to 0).

Running the update again seems to start the services.

It is worth downloading the log after each attempt at updating, as the log is overwritten each time.

I note one interesting message…

And the log if it helps plus I note the pulse count seems to have been reset again :frowning:

emonpiupdate.zip (4.2 KB)

Is this an EmonPi or an EmonSD? Is it an old Jessie image?

Looks like you have made changes within the usefulscripts folder but I don’t think that would have been the cause.

Same problem here from 9.9.5 to 9.9.7
Those services not restart after reboot or shutdown.
Whith a new update all seams fine

But if you restart or shutdown again every time service is dead.

Thnx

Do you have the original Log?

Which services are the problem?

No original log

Mqtt and service runner as in the picture

Thnx

Maybe could help

1 Like

@lord_valex do you have SSH access?

If so could you please do the following;

sudo systemctl status emoncms_mqtt service-runner

systemctl status emoncms_mqtt.service
systemctl status service-runner.service

and post the output.

You’ll need to use sudo with that, plus you can pass multiple service names to systemctl in one hit, eg

sudo systemctl status emoncms_mqtt service-runner

I checked before I posted on an EmonPi and the output is the same with/without sudo.

I’d forgotten that part.

Now you sat that, I think I recall you or someone else posting about status not needing sudo before. I had thought you were perhaps still in dietpi mode and just forgot the sudo.

I think I will continue to use sudo to check status rather than mess about with an exception to the rule. It’s easier to just stick to sudo systemctl rather than remember/explain why not for just checking status. I’m sure this will come up again :slight_smile:

1 Like

My system dates back to August 2017.
emonPi
(Enclosure & LCD: Fully Assembled, Raspberry Pi: Raspberry Pi 3 & 8GB Pre-built SD card, Additional Current Sensor: Additional 100A max clip-on current sensor CT (2 PCS total), AC Voltage Sensor Adapter: UK Plug)

Just using 1xCT, Voltage sense and pulse counting gas in cubic feet via reed switch in gas meter.

Ok, That gives a starting point. It might be issues with the Jessie base OS. Can you do:

sudo systemctl status emoncms_mqtt service-runner

And post output please?

pi@emonpi(ro):~$ sudo systemctl status emoncms_mqtt service-runner
● emoncms_mqtt.service - Emoncms emoncms_mqtt script
   Loaded: loaded (/var/www/emoncms/scripts/services/emoncms_mqtt/emoncms_mqtt.service; disabled)
   Active: active (running) since Wed 2019-02-27 22:26:33 UTC; 11h ago
     Docs: https://github.com/emoncms/emoncms/blob/master/docs/RaspberryPi/MQTT.md
Main PID: 11558 (php)
   CGroup: /system.slice/emoncms_mqtt.service
           └─11558 /usr/bin/php /var/www/emoncms/scripts/services/emoncms_mqt...

Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.

● service-runner.service - Emoncms service-runner Input Script
   Loaded: loaded (/var/www/emoncms/scripts/services/service-runner/service-runner.service; disabled)
   Active: active (running) since Wed 2019-02-27 22:26:45 UTC; 11h ago
     Docs: https://github.com/emoncms/emoncms/blob/master/scripts/services/install-service-runner-update.md
 Main PID: 11802 (python)
   CGroup: /system.slice/service-runner.service
           └─11802 /usr/bin/python /var/www/emoncms/scripts/services/service-...

Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.

@IM35461, if they do not start on boot, would you be willing to reboot and post it again please?

Just trying that…
after reboot you get this

login as: pi
[email protected]'s password:

╔══════════════════════════════════════════════════════════════════════╗
║                                                   ooooooooo.    o8o  ║
║                                                   `888   `Y88.  `"'  ║
║  .ooooo.  ooo. .oo.  .oo.    .ooooo.  ooo. .oo.    888   .d88' oooo  ║
║ d88' `88b `888P"Y88bP"Y88b  d88' `88b `888P"Y88b   888ooo88P'  `888  ║
║ 888ooo888  888   888   888  888   888  888   888   888          888  ║
║ 888    .o  888   888   888  888   888  888   888   888          888  ║
║ `Y8bod8P' o888o o888o o888o `Y8bod8P' o888o o888o o888o        o888o ║
╚══════════════════════════════════════════════════════════════════════╝

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.

The file system is in Read Only (RO) mode. If you need to make changes,
use the command 'rpi-rw' to put the file system in Read Write (RW) mode.
Use 'rpi-ro' to return to RO mode. The /home/pi/data directory is always in RW mode.

pi@emonpi(ro):~$ sudo systemctl status emoncms_mqtt service-runner
● emoncms_mqtt.service - Emoncms emoncms_mqtt script
   Loaded: loaded (/var/www/emoncms/scripts/services/emoncms_mqtt/emoncms_mqtt.service; disabled)
   Active: inactive (dead)
     Docs: https://github.com/emoncms/emoncms/blob/master/docs/RaspberryPi/MQTT.md

● service-runner.service - Emoncms service-runner Input Script
   Loaded: loaded (/var/www/emoncms/scripts/services/service-runner/service-runner.service; disabled)
   Active: inactive (dead)
     Docs: https://github.com/emoncms/emoncms/blob/master/scripts/services/install-service-runner-update.md

Feb 28 10:21:01 emonpi systemd[1]: [/var/www/emoncms/scripts/services/servi...t'
Feb 28 10:22:28 emonpi systemd[1]: [/var/www/emoncms/scripts/services/servi...t'
Hint: Some lines were ellipsized, use -l to show in full.
pi@emonpi(ro):~$

Ok, could you try (just the one service for comparison)

sudo systemctl restart emoncms_mqtt

[edit] then the status command again.

I get this and the service is running but not the service-runner

pi@emonpi(ro):~$ sudo systemctl restart emoncms_mqtt
pi@emonpi(ro):~$ sudo systemctl status emoncms_mqtt service-runner
● emoncms_mqtt.service - Emoncms emoncms_mqtt script
   Loaded: loaded (/var/www/emoncms/scripts/services/emoncms_mqtt/emoncms_mqtt.service; disabled)
   Active: active (running) since Thu 2019-02-28 10:29:05 UTC; 35s ago
     Docs: https://github.com/emoncms/emoncms/blob/master/docs/RaspberryPi/MQTT.md
 Main PID: 4189 (php)
   CGroup: /system.slice/emoncms_mqtt.service
           └─4189 /usr/bin/php /var/www/emoncms/scripts/services/emoncms_mqtt...

Feb 28 10:29:05 emonpi systemd[1]: Started Emoncms emoncms_mqtt script.

● service-runner.service - Emoncms service-runner Input Script
   Loaded: loaded (/var/www/emoncms/scripts/services/service-runner/service-runner.service; disabled)
   Active: inactive (dead)
     Docs: https://github.com/emoncms/emoncms/blob/master/scripts/services/install-service-runner-update.md

Feb 28 10:21:01 emonpi systemd[1]: [/var/www/emoncms/scripts/services/servi...t'
Feb 28 10:22:28 emonpi systemd[1]: [/var/www/emoncms/scripts/services/servi...t'
Feb 28 10:29:21 emonpi systemd[1]: [/var/www/emoncms/scripts/services/servi...t'
Feb 28 10:29:41 emonpi systemd[1]: [/var/www/emoncms/scripts/services/servi...t'
Hint: Some lines were ellipsized, use -l to show in full.
pi@emonpi(ro):~$

@IM35461 - if you paste output from the shell, or code, if you put 3 backticks (top left of keyboard) on the line before and 3 on the line after, it will fomat it better.

Ok great, looks like it has not been enabled to start at boot.

Could you try this please,

sudo systemctl enable service-runner.service
sudo systemctl start service-runner.service

and post the output please.