Emonpi stuck showing "booting..." message

Hello,

My emonpi is stuck showing the “booting” message. The main system is running, and I can access both SSH and the web interface. In the web interface, all the feeds show as “inactive”.

I’m a moderately competent Linux sysadmin but I don’t know enough about the architecture of the emonpi to know where to start troubleshooting… advice appreciated!

T

Hi and welcome.

Did you try a search - this has been a common thread, one of those solutions might work for you.

The only solutions I found were for a power-cut situation where the SD card had become corrupt, and the Pi wasn’t booting. I’ll have another look - any specific terms I could add to narrow it away from “dead SD card” results?

Plenty of free space on the device, and the services are all showing as running.

Can you post the details from the Admin page (Copy as Markdown and you can just paste it here - no further formatting).

What does the main log and the emonhub log have to say?

Server Information

Server Information

Services

  • emonhub :- Active Running

  • emoncms_mqtt :- Active Running

  • feedwriter :- Active Running - sleep 300s 0 feed points pending write

  • service-runner :- Active Running

  • emonPiLCD :- Active Running

  • redis-server :- Active Running

  • mosquitto :- Active Running

  • demandshaper :- Active Running

Emoncms

Server

  • OS :- Linux 5.4.51-v7+
  • Host :- emonpi | emonpi | (10.16.0.176)
  • Date :- 2021-11-30 08:16:16 UTC
  • Uptime :- 08:16:16 up 20:39, 0 users, load average: 1.17, 1.07, 1.08

Memory

  • RAM :- Used: 19.49%
    • Total :- 925.86 MB
    • Used :- 180.46 MB
    • Free :- 745.39 MB
  • Swap :- Used: 0.00%
    • Total :- 100 MB
    • Used :- 0 B
    • Free :- 100 MB
      Write Load Period

Disk

  • / :- Used: 49.59%
    • Total :- 4.06 GB
    • Used :- 2.01 GB
    • Free :- 1.85 GB
    • Write Load :- 2.77 KB/s (20 hours 35 mins)
  • /boot :- Used: 21.15%
    • Total :- 252.05 MB
    • Used :- 53.32 MB
    • Free :- 198.73 MB
    • Write Load :- 0.1 B/s (20 hours 35 mins)
  • /var/opt/emoncms :- Used: 0.64%
    • Total :- 9.84 GB
    • Used :- 64.88 MB
    • Free :- 9.28 GB
    • Write Load :- 0 B/s (20 hours 35 mins)
  • /var/log :- Used: 8.74%
    • Total :- 50 MB
    • Used :- 4.37 MB
    • Free :- 45.63 MB
    • Write Load :- n/a

HTTP

  • Server :- Apache/2.4.38 (Raspbian) HTTP/1.1 CGI/1.1 80

MySQL

  • Version :- 5.5.5-10.3.23-MariaDB-0+deb10u1
  • Host :- 127.0.0.1 (127.0.0.1)
  • Date :- 2021-11-30 08:16:16 (UTC 00:00‌​)
  • Stats :- Uptime: 9799066 Threads: 12 Questions: 12845 Slow queries: 0 Opens: 48 Flush tables: 1 Open tables: 42 Queries per second avg: 0.001

Redis

  • Version :-
    • Redis Server :- 5.0.3
    • PHP Redis :- 5.3.1
  • Host :- localhost:6379
  • Size :- 253 keys (838.12K)
  • Uptime :- 113 days

MQTT Server

  • Version :- Mosquitto 1.5.7
  • Host :- localhost:1883 (127.0.0.1)

PHP

  • Version :- 7.3.19-1~deb10u1 (Zend Version 3.3.19)
  • Modules :- apache2handlercalendar Core ctype curl date dom v20031129exif fileinfo filter ftp gd gettext hash iconv json v1.7.0libxml mbstring mosquitto v0.4.0mysqli mysqlnd vmysqlnd 5.0.12-dev - 20150407 - $Id: 7cc7cc96e675f6d72e5cf0f267f48e167c2abb23 $openssl pcre PDO pdo_mysql Phar posix readline redis v5.3.1Reflection session shmop SimpleXML sockets sodium SPL standard sysvmsg sysvsem sysvshm tokenizer wddx xml xmlreader xmlwriter xsl Zend OPcache zlib

Pi

  • Model :- Raspberry Pi 3 Model B Rev 1.2 - 1GB (Sony UK)

  • Serial num. :- 88F0AA12

  • CPU Temperature :- 45.08°C

  • GPU Temperature :- 46.2°C

  • emonpiRelease :- emonSD-24Jul20

  • File-system :- read-write

Client Information

Client Information

HTTP

  • Browser :- Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.55 Safari/537.36
  • Language :- en-GB,en-US;q=0.9,en;q=0.8

Window

  • Size :- 1292 x 830

Screen

  • Resolution :- 1680 x 1050

emonhub log completely empty:

pi@emonpi:~ $ tail /var/log/emonhub/emonhub.log
pi@emonpi:~ $

Which is the “main” log?

Aah, this is part of the syslog that looks interesting!

Nov 30 08:31:17 emonpi python3[9657]: I2C LCD NOT DETECTED on either 0x['27', '3f'] ...exiting LCD script
Nov 30 08:31:17 emonpi systemd[1]: emonPiLCD.service: Succeeded.
Nov 30 08:31:18 emonpi systemd[1]: emonPiLCD.service: Service RestartSec=100ms expired, scheduling restart.
Nov 30 08:31:18 emonpi systemd[1]: emonPiLCD.service: Scheduled restart job, restart counter is at 30112.
Nov 30 08:31:18 emonpi systemd[1]: Stopped emonPi LCD driver.
Nov 30 08:31:18 emonpi systemd[1]: Starting emonPi LCD driver...
Nov 30 08:31:18 emonpi systemd[1]: Started emonPi LCD driver.
Nov 30 08:31:20 emonpi python3[9664]: emonPiLCD logging to: /var/log/emonpilcd/emonpilcd.log
Nov 30 08:31:20 emonpi python3[9664]: I2C LCD NOT DETECTED on either 0x['27', '3f'] ...exiting LCD script
Nov 30 08:31:20 emonpi systemd[1]: emonPiLCD.service: Succeeded.
Nov 30 08:31:20 emonpi systemd[1]: emonPiLCD.service: Service RestartSec=100ms expired, scheduling restart.
Nov 30 08:31:20 emonpi systemd[1]: emonPiLCD.service: Scheduled restart job, restart counter is at 30113.
Nov 30 08:31:20 emonpi systemd[1]: Stopped emonPi LCD driver.
Nov 30 08:31:20 emonpi systemd[1]: Starting emonPi LCD driver...
Nov 30 08:31:20 emonpi systemd[1]: Started emonPi LCD driver.
Nov 30 08:31:22 emonpi python3[9671]: emonPiLCD logging to: /var/log/emonpilcd/emonpilcd.log
Nov 30 08:31:22 emonpi python3[9671]: I2C LCD NOT DETECTED on either 0x['27', '3f'] ...exiting LCD script
Nov 30 08:31:22 emonpi systemd[1]: emonPiLCD.service: Succeeded.
Nov 30 08:31:23 emonpi systemd[1]: emonPiLCD.service: Service RestartSec=100ms expired, scheduling restart.
Nov 30 08:31:23 emonpi systemd[1]: emonPiLCD.service: Scheduled restart job, restart counter is at 30114.
Nov 30 08:31:23 emonpi systemd[1]: Stopped emonPi LCD driver.
Nov 30 08:31:23 emonpi systemd[1]: Starting emonPi LCD driver...
Nov 30 08:31:23 emonpi systemd[1]: Started emonPi LCD driver.
Nov 30 08:31:25 emonpi python3[9678]: emonPiLCD logging to: /var/log/emonpilcd/emonpilcd.log
Nov 30 08:31:25 emonpi python3[9678]: I2C LCD NOT DETECTED on either 0x['27', '3f'] ...exiting LCD script
Nov 30 08:31:25 emonpi systemd[1]: emonPiLCD.service: Succeeded.
Nov 30 08:31:25 emonpi systemd[1]: emonPiLCD.service: Service RestartSec=100ms expired, scheduling restart.
Nov 30 08:31:25 emonpi systemd[1]: emonPiLCD.service: Scheduled restart job, restart counter is at 30115.
Nov 30 08:31:25 emonpi systemd[1]: Stopped emonPi LCD driver.
Nov 30 08:31:25 emonpi systemd[1]: Starting emonPi LCD driver...
Nov 30 08:31:25 emonpi systemd[1]: Started emonPi LCD driver.
Nov 30 08:31:27 emonpi python3[9686]: emonPiLCD logging to: /var/log/emonpilcd/emonpilcd.log
Nov 30 08:31:27 emonpi python3[9686]: I2C LCD NOT DETECTED on either 0x['27', '3f'] ...exiting LCD script
Nov 30 08:31:27 emonpi systemd[1]: emonPiLCD.service: Succeeded.
Nov 30 08:31:28 emonpi systemd[1]: emonPiLCD.service: Service RestartSec=100ms expired, scheduling restart.
Nov 30 08:31:28 emonpi systemd[1]: emonPiLCD.service: Scheduled restart job, restart counter is at 30116.
Nov 30 08:31:28 emonpi systemd[1]: Stopped emonPi LCD driver.
Nov 30 08:31:28 emonpi systemd[1]: Starting emonPi LCD driver...
Nov 30 08:31:28 emonpi systemd[1]: Started emonPi LCD driver.

And lots of repetitions of this in the LCD log iteslf:

2021-11-30 08:32:42,616 INFO Starting emonPiLCD V5
2021-11-30 08:32:42,617 ERROR I2C LCD NOT DETECTED on either 0x['27', '3f'] ...exiting LCD script
2021-11-30 08:32:45,206 INFO Starting emonPiLCD V5
2021-11-30 08:32:45,207 ERROR I2C LCD NOT DETECTED on either 0x['27', '3f'] ...exiting LCD script
2021-11-30 08:32:47,634 INFO Starting emonPiLCD V5
2021-11-30 08:32:47,635 ERROR I2C LCD NOT DETECTED on either 0x['27', '3f'] ...exiting LCD script
2021-11-30 08:32:50,120 INFO Starting emonPiLCD V5
2021-11-30 08:32:50,121 ERROR I2C LCD NOT DETECTED on either 0x['27', '3f'] ...exiting LCD script

Edit - formatted text. BT, Moderator.
- thank you. TW

@TrystanLea any ideas?

On admin page

Hello @wheeto can you restart the emonPiLCD service? you should be able to do this from the Admin information page at the top (If you have a recent version of emoncms).

It keeps on trying to auto start apparently (as per the logs) but the LCD is not being detected.

Aah, thanks. My emoncms file is empty, and the GUI says that LOGLEVEL is set to WARN for me.

Yes, if you watch that page in the HTML GUI, it occasionally flips to “failed” before auto-restarting. This behaviour also persists across reboots.

In the absence of any other suggestions, I replaced the SD card with one with a brand new image, and then restored a backup.

This is now working fine, which is good news as it means there was no hardware problem, but is a bit unsatisfactory in terms of knowing what had spontaneously gone wrong! Anyway, onwards and upwards…

1 Like

Thanks @wheeto I have noticed that if the SD card starts to corrupt it can be a really small thing that only breaks one part so I wonder if it is somehow still down to a corruption. The fact that the problem resolved itself with a new image suggests that it was a software issue, the July20 image uses the same emonpi software scripts for the LCD as the newer image so I dont think it would be that. EmonPi v2.9.4 is also relatively recent…

Hmmm, nothing showed up on an fsck ; is there anything I can helpfully diff from the good image?