Community
OpenEnergyMonitor

OpenEnergyMonitor Community

Systemctl status degraded

Something interesting happened last night as the emonhub stopped to resend to emoncms.org. Also local emoncms web interface not working. Did a power off cycle and now systemctl status shows degraded, i.e. failed to start.

Reinstalled ./emonhub.sh and everything is back to normal. Anyhow still the dhcp server is not starting - I guess its not needed.

Using latest SD image with rPi, both orded from shop a couple of weeks ago.

Systemlog tells Mosquitto did not connect ???

Thanks @PetriK noted, not sure what went wrong there…

No it means at least one service did not start correctly. You need to identify which service is not happy.

I doubt that actually made any difference - coincidence.

In what way?

@TrystanLea, this has been happening for a while.

[email protected]:/opt/openenergymonitor/EmonScripts/install $ systemctl --failed
  UNIT                    LOAD   ACTIVE SUB    DESCRIPTION
● isc-dhcp-server.service loaded failed failed LSB: DHCP server

LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.

1 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.

[email protected]:/opt/openenergymonitor/EmonScripts/install $ systemctl status isc-dhcp-server.service
● isc-dhcp-server.service - LSB: DHCP server
   Loaded: loaded (/etc/init.d/isc-dhcp-server; generated)
   Active: failed (Result: exit-code) since Tue 2020-08-11 17:28:12 BST; 6 days ago
     Docs: man:systemd-sysv-generator(8)

Aug 11 17:28:10 emonpi dhcpd[538]: bugs on either our web page at www.isc.org or in the README file
Aug 11 17:28:10 emonpi dhcpd[538]: before submitting a bug.  These pages explain the proper
Aug 11 17:28:10 emonpi dhcpd[538]: process and the information we find helpful for debugging.
Aug 11 17:28:10 emonpi dhcpd[538]:
Aug 11 17:28:10 emonpi dhcpd[538]: exiting.
Aug 11 17:28:12 emonpi isc-dhcp-server[492]: Starting ISC DHCPv4 server: dhcpdcheck syslog for diagnostics. ... failed!
Aug 11 17:28:12 emonpi isc-dhcp-server[492]:  failed!
Aug 11 17:28:12 emonpi systemd[1]: isc-dhcp-server.service: Control process exited, code=exited, status=1/FAILURE
Aug 11 17:28:12 emonpi systemd[1]: isc-dhcp-server.service: Failed with result 'exit-code'.
Aug 11 17:28:12 emonpi systemd[1]: Failed to start LSB: DHCP server.

I think that might be expected re isc-dhcp-server as its only used as part of the access point?

Well it never starts (this is on my emonPi) - perhaps this is why the AP seems to be having issues.

When do you expect it to start?

Are you connected via WiFi / Ethernet at the time as a client?

This is what I see:

[email protected]:~ $ systemctl status isc-dhcp-server.service
● isc-dhcp-server.service - LSB: DHCP server
   Loaded: loaded (/etc/init.d/isc-dhcp-server; generated)
   Active: failed (Result: exit-code) since Wed 2020-08-12 15:44:16 BST; 5 days ago
     Docs: man:systemd-sysv-generator(8)

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

But Im connected via Ethernet so dont expect it to be running.

At boot as it is enabled. I suspect a conflict with the dhcpd.service - I think Raspbian has changed since isc was included.

When would you expect it to start? Does it?

Also local emoncms web interface not working.

It was not updating and this happened b4 adding node-red or anything else to sd card.

I guess it should not matter if local DHCP service starts or not - just noted that when investigating.

I doubt that actually made any difference - coincidence.

hmm, in install script it enables and restarts the emonhub.service.

anayway, now everything is working seamlessly since …

In that the inputs were not updating? If you could navigate between pages, the apache server was fine. the inputs stop when emonhub fails.

Exactly, emonhub is more likely to be the issue.

Was there anything in any of the logs?