Community
OpenEnergyMonitor

Community

All feeds stopped updating

notupdating
Tags: #<Tag:0x00007f880e29ef08>
(Chris Wilson) #1

It seems that without warning, all my feeds stopped updating 3 days ago:

Any idea what could cause this, or how to fix it? I haven’t rebooted yet in case there’s important state on the box. I’m unable to SSH in because the instructions to activate SSH didn’t work, and I only have 5 hours of logs in the web console, and I’m unable to download more.

(Paul) #2

Any clues from the admin page?

ie what versions are you running and are the services all ok?

Plus on the emonhub config page, are there any errors or clues reported in the emonhub.log?

(Brian Orpin) #3

Is the swap file use high? Chances are that the log folder is full. If you cannot SSH in, then the only option is to reboot I’m afraid (after checking Paul’s suggestions).

(Chris Wilson) #4

Thanks both for the suggestions!

I see this over and over in the logs (and that’s all). Is it possible that the MQTT service died, or is somehow broken?

2019-04-28 16:51:24.167|WARN|emoncms_mqtt.php|Connecting to MQTT server: Connection Accepted.: code: 0
2019-04-28 16:51:49.241|WARN|emoncms_mqtt.php|Not connected, retrying connection

emonPiLCD Active Exited, otherwise all services are running.

Versions are:

Emoncms Version low-write 9.9.8
Modules Administration App v1.2.1 Backup v1.1.6 EmonHub Config v1.1.0 Dashboard v1.3.3 Device v1.2.1 EventProcesses Feed Graph v1.2.3 Input Postprocess v1.0.0 CoreProcess Schedule Network Setup v1.0.0 sync Time User Visualisation WiFi v1.3.1
Git URL: https://github.com/emoncms/emoncms.git Branch: * stable Describe: v9.5.1-1775-gd0db7a57
Server OS Linux 4.14.71-v7+
Host emonpi emonpi (192.168.1.109)
Date 2019-05-02 20:19:07 UTC
Uptime 20:19:07 up 20 days, 5:02, 0 users, load average: 0.58, 0.22, 0.13

I tried to update and I don’t think it did anything, so I’m guessing I’m running the latest versions of everything.

Swap is nearly full (Total: 100 MB Used: 96.25 MB Free: 3.75 MB), but there is RAM free (Total: 976.74 MB Used: 250.34 MB Free: 726.4 MB) so why would that happen?

Does anyone know a way to enable SSH that actually works? (The one in the video did not.)

Better handling of files in tmpfs /var/log
(Paul) #5

I don’t know what is in “the video” but there are 2 ways to enable SSH (3 if you include plugging in a keyboard and monitor), either via the LCD button, or by adding a blank file called ssh to the boot partition on another PC (so that involves a power cycle).

IMO it shouldn’t happen on a low-write optimised image. Using the swap just delays the inevitable crash and shortens the sdcard life in the process. I think we should be reducing the “swappiness” setting down from 60 to 1 so that use of the swap is seriously reduced or removed entirely.

(Brian Orpin) #6

There is the clue. Prettry sure you’d find /var/log is full - known problem

@TrystanLea @glyn.hudson - another one IMHO.

1 Like
(Chris Wilson) #7

Thanks both! The swap usage has mysteriously dropped to 80% and the box has started working again, all by itself, I didn’t reboot it. All services including emonPiLCD are now showing as “running” on the Administration page.

I tried to enable SSH by following the instructions in this video, without success. I could not find any other instructions at all, can you point me to them? How can I connect a monitor to an emonPi without a VGA socket? Would a serial console work?

(Paul) #8

Ordinarily that is “0%” used. The only reason there is no specific limiting of the use of swap space is that it doesn’t get used, so limiting it isn’t on the radar.

There’s a lot of hard work going on trying to minimise the disk writes by moving things that write to disk, in to RAM. That seems pointless if the RAM is then extented to use swap out of our control.

Sorry I don’t watch “how to video’s” they tend to be way too slow to keep my attention.

There is a whole discussion on emonPi ssh here “emonPi SSH disabled by default” and AFAIA the default Raspian method to enable via blank “ssh” file in the boot partition is still active on the emonSD. See section 3 here “https://www.raspberrypi.org/documentation/remote-access/ssh/README.md”.

Using the hdmi port, that would involve removing the Pi from it’s case as the hdmi port is on the side edge.

Not without editing /boot/cmdline.txt and stripping down the emonPi add-on board from the RPi as the GPIO serial UART is used for the emonpi add-on board, the serial console is disabled.

Unfortunately, if the button method doesn’t work, you need a torx screwdriver whatever method you choose. I would opt for the easiest option of just putting a blank “ssh” file on the boot partition from another PC by putting the sdcard in a usb card reader.