FeedWriter script error every hour - Version low-write 9.9.8

Hi

Raspberry Pi 3 Model B+ Rev 1.3 - 1 GB running latest emonCMS

Looking in administration I noticed a recurring error.

LAST ENTRIES ON THE LOG FILE
2019-03-19 14:27:49.207|ERROR|feedwriter.php|Starting feedwriter script
2019-03-19 15:27:19.129|ERROR|feedwriter.php|Starting feedwriter script
2019-03-19 16:27:21.418|ERROR|feedwriter.php|Starting feedwriter script
2019-03-19 17:27:44.007|ERROR|feedwriter.php|Starting feedwriter script
2019-03-19 18:00:49.421|WARN|emoncms_mqtt.php|Not connected, retrying connection
2019-03-19 18:00:49.437|WARN|emoncms_mqtt.php|Connecting to MQTT server: Connection Accepted.: code: 0
2019-03-19 18:27:54.288|ERROR|feedwriter.php|Starting feedwriter script
2019-03-19 19:27:51.058|ERROR|feedwriter.php|Starting feedwriter script
2019-03-19 20:27:50.095|ERROR|feedwriter.php|Starting feedwriter script
2019-03-19 21:27:46.463|ERROR|feedwriter.php|Starting feedwriter script
2019-03-19 22:27:44.497|ERROR|feedwriter.php|Starting feedwriter script
2019-03-19 23:27:44.479|ERROR|feedwriter.php|Starting feedwriter script
2019-03-20 00:25:26.230|ERROR|feedwriter.php|Starting feedwriter script
2019-03-20 01:25:26.141|ERROR|feedwriter.php|Starting feedwriter script
2019-03-20 02:25:25.952|ERROR|feedwriter.php|Starting feedwriter script
2019-03-20 03:25:26.060|ERROR|feedwriter.php|Starting feedwriter script
2019-03-20 04:25:26.130|ERROR|feedwriter.php|Starting feedwriter script
2019-03-20 05:25:26.131|ERROR|feedwriter.php|Starting feedwriter script
2019-03-20 06:25:26.079|ERROR|feedwriter.php|Starting feedwriter script
2019-03-20 07:25:26.219|ERROR|feedwriter.php|Starting feedwriter script
2019-03-20 08:25:26.247|ERROR|feedwriter.php|Starting feedwriter script
2019-03-20 09:25:26.259|ERROR|feedwriter.php|Starting feedwriter script
2019-03-20 10:27:54.371|ERROR|feedwriter.php|Starting feedwriter script
2019-03-20 11:28:14.156|ERROR|feedwriter.php|Starting feedwriter script
2019-03-20 12:28:17.776|ERROR|feedwriter.php|Starting fe

Emoncms is fully up to date. Is this something that needs attention?

Server Information

Server Information
Services
emonhub Active Running
emoncms_mqtt Active Running
feedwriter Active Running - sleep 60s
service-runner Active Running
emonPiLCD Active Exited
redis-server Active Running
mosquitto Inactive Dead
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 : demandshaper : 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: GitHub - emoncms/emoncms: Web-app for processing, logging and visualising energy, temperature and other environmental data : Branch: * stable : Describe: 9.9.8-4-gd0db7a57
Server OS Linux 4.14.71-v7+
Host emonpi : emonpi : (192.168.1.22)
Date 2019-03-21 09:29:39 UTC
Uptime 09:29:39 up 2 days, 23:48, 0 users, load average: 0.26, 0.18, 0.11
HTTP Server Apache/2.4.25 (Raspbian) HTTP/1.1 CGI/1.1 80
MySQL Version 5.5.5-10.1.23-MariaDB-9+deb9u1
Host 127.0.0.1 (127.0.0.1)
Date 2019-03-21 09:29:39 (UTC 00:00‌​)
Stats Uptime: 258477 Threads: 4 Questions: 1097255 Slow queries: 0 Opens: 53 Flush tables: 1 Open tables: 47 Queries per second avg: 4.245
Redis Version 3.2.6
Host localhost:6379 (127.0.0.1)
Size
Uptime 2 days
MQTT Server Version Mosquitto 1.4.10
Host 192.168.1.28:2082 (192.168.1.28)
Pi Model Raspberry Pi 3 Model B+ Rev 1.3 - 1 GB (Sony UK)
SoC Broadcom BCM2835
Serial num. 4F2878CB
Temperature CPU: 47.24°C - GPU: 47.2’C
Release emonSD-30Oct18
Memory RAM Used: 30.82% Total: 976.74 MB Used: 301 MB Free: 675.74 MB
Swap Used: 99.93% Total: 100 MB Used: 99.93 MB Free: 68 KB
Disk Mount Stats
/ Used: 44.70% Total: 3.81 GB Used: 1.71 GB Free: 1.93 GB
/boot Used: 51.69% Total: 42.52 MB Used: 21.98 MB Free: 20.54 MB
/home/pi/data Used: 8.10% Total: 25.4 GB Used: 2.06 GB Free: 22.05 GB
PHP Version 7.0.30-0+deb9u1 (Zend Version 3.0.0)
Modules apache2handler : calendar v7.0.30-0+deb9u1 : Core v7.0.30-0+deb9u1 : ctype v7.0.30-0+deb9u1 : curl v7.0.30-0+deb9u1 : date v7.0.30-0+deb9u1 : dom v20031129 : exif v7.0.30-0+deb9u1 : fileinfo v1.0.5 : filter v7.0.30-0+deb9u1 : ftp v7.0.30-0+deb9u1 : gd v7.0.30-0+deb9u1 : gettext v7.0.30-0+deb9u1 : hash v1.0 : iconv v7.0.30-0+deb9u1 : igbinary v2.0.1 : json v1.4.0 : libxml v7.0.30-0+deb9u1 : mbstring v7.0.30-0+deb9u1 : mcrypt v7.0.30-0+deb9u1 : mosquitto v0.4.0 : mysqli v7.0.30-0+deb9u1 : mysqlnd vmysqlnd 5.0.12-dev - 20150407 - $Id: b5c5906d452ec590732a93b051f3827e02749b83 $ : openssl v7.0.30-0+deb9u1 : pcre v7.0.30-0+deb9u1 : PDO v7.0.30-0+deb9u1 : pdo_mysql v7.0.30-0+deb9u1 : Phar v2.0.2 : posix v7.0.30-0+deb9u1 : readline v7.0.30-0+deb9u1 : redis v4.1.1 : Reflection v7.0.30-0+deb9u1 : session v7.0.30-0+deb9u1 : shmop v7.0.30-0+deb9u1 : SimpleXML v7.0.30-0+deb9u1 : sockets v7.0.30-0+deb9u1 : SPL v7.0.30-0+deb9u1 : standard v7.0.30-0+deb9u1 : sysvmsg v7.0.30-0+deb9u1 : sysvsem v7.0.30-0+deb9u1 : sysvshm v7.0.30-0+deb9u1 : tokenizer v7.0.30-0+deb9u1 : wddx v7.0.30-0+deb9u1 : xml v7.0.30-0+deb9u1 : xmlreader v7.0.30-0+deb9u1 : xmlwriter v7.0.30-0+deb9u1 : xsl v7.0.30-0+deb9u1 : Zend OPcache v7.0.30-0+deb9u1 : zlib v7.0.30-0+deb9u1
Client Information
HTTP Browser Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36
Screen Resolution 1920 x 1080
Window Size 1528 x 927

Edit

I have just realised what might be causing this. I recently had a problem that caused lost data. As a temporary measure I am taking backups every hour. I have just reverted to daily backups and will check again tomorrow about the same time.

Looks like it is likely to be related but you will get the error once a day instead of once an hour!

How are you taking the backups?

Doing a systemctl status feedwriter.service will give you the last few log messages for the feedwriter service but it seems the backup is probably causing the service to crash.

I’ll also point out the Mosquitto service is reporting as Dead. I suspect this is deliberate as the broker settings point to a different IP address. If you do not need it, best to mask it out:

sudo systemctl mask mosquitto

otherwise other services will try and start it. (a disable just stops it starting automatically; a mask prevents it being started at all) and it will go from the list.

It will help if you can tell us what the hardware is (is there and EmonBase/RFM card installed).

Hi

I was running

~/backup/./emoncms-export.sh

every hour. Now back to daily as I think the issue I had has been resolved.

I am using Mosquitto on a different Pi so I have masked as suggested.

The PI has no additional hardware. All inputs are coming over the network from NanodeRF base stations and EmonESP equipped emonTX devices. I gave up on RFM as it was dropping to much data. The ESPs over Wifi have been more reliable.

That script stops and starts the feedwriter service which is where the ‘ERROR’ is coming from.

Actually it should not be an error, but an INFO as it is simply telling you it is starting the script.

HTH

1 Like