Would it be possible to do a release / module info for this repo as well? When helping users it would be good to know what version that is sitting at as well as everything else.
Yes but that isn’t visible in the admin page.
It just started to be an issue within the last month. Difficult to point to a day. Looks like the update script is running and updating things. With the last run on May 25.
Git:
URL : https://github.com/emoncms/emoncms.git
Branch : * stable
Describe : 10.1.11-7-g90f39158
Yes. I use node-red on the remote Dakboard machine to read a motion sensor and turn off the Dakboard monitor when no one is in the room, and to format some of the solar and use data for display on the Dakboard.
At the moment I do. My emonCMS server is on the internet, handling traffic on port 80 and doing a reverse proxy to emonCMS and a few other internal servers. My home setup grew up around my emonCMS Pi, which is the reason this particular machine is the proxy server. I could divide that out to a separate Pi, but haven’t gotten around to it. So as things stand, the way I understand internet security, it is best to have ufw in place.
I will take a look at that. I tried disabling some of the things I knew to be requesting data from the emonCMS server, and the blocked requests kept rolling in. So there is something I put in place that I’m forgetting, or ufw is logging a blocked request even while my server is responding and things seem to be working otherwise.
My initial thought it is that (Port 1880).
Check you update logs, it should be on 10.2.3. It is only a manual update process for emoncms.
Update: The cause of apache2 going down was certbot. It was random because certbot tries to run at random intervals to distribute the timing of requests to their servers. The certbot service tries to use “apachectl -k start” to restart apache, and for some reason this doesn’t work, even though “systemctl start apache2” does work when I do so manually. Still investigating that here: Apache2 does not come back up, certbot finishes abnormally - #9 by brandock - Help - Let's Encrypt Community Support
In the meantime, /var/log is full again, and I could still use some help figuring out how to handle this situation. One strategy is to try to calm down the logging of Letsencrypt certbot and ufw, and I’m working on that, but shouldn’t the log rotating be able to handle the volume?
pi@emonpi:~$ sudo find /var/log -type f -exec du -ah {} + | sort -n -r | head -n 20
456K /var/log/letsencrypt/letsencrypt.log
444K /var/log/ufw.log
288K /var/log/lastlog
256K /var/log/auth.log
220K /var/log/daemon.log
112K /var/log/wtmp
112K /var/log/logrotate/logrotate.log.1
72K /var/log/messages
72K /var/log/kern.log
40K /var/log/syslog
28K /var/log/apt/eipp.log.xz
24K /var/log/logrotate/logrotate.log
24K /var/log/faillog
12K /var/log/emonhub/emonhub.log
12K /var/log/emoncms/emonpiupdate.log
8.0K /var/log/logrotate/logrotate.log.7.gz
8.0K /var/log/logrotate/logrotate.log.5.gz
8.0K /var/log/logrotate/logrotate.log.2.gz
8.0K /var/log/emonpilcd/emonpilcd.log
4.0K /var/log/wifiAP.log
pi@emonpi:~$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 4.0G 2.9G 949M 76% /
devtmpfs 459M 0 459M 0% /dev
tmpfs 464M 0 464M 0% /dev/shm
tmpfs 464M 12M 452M 3% /run
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 464M 0 464M 0% /sys/fs/cgroup
tmpfs 30M 0 30M 0% /tmp
tmpfs 1.0M 0 1.0M 0% /var/lib/php/sessions
tmpfs 1.0M 0 1.0M 0% /var/tmp
/dev/mmcblk0p3 10G 1.2G 8.4G 12% /var/opt/emoncms
/dev/mmcblk0p1 253M 53M 200M 21% /boot
log2ram 50M 50M 0 100% /var/log
tmpfs 93M 0 93M 0% /run/user/1000
pi@emonpi:~$ ls -lh --size /var/log
total 1.6M
0 -rw-r--r-- 1 root root 0 Dec 1 00:00 alternatives.log
0 drwxr-x--- 2 root adm 100 Nov 17 2019 apache2
0 drwxr-xr-x 2 root root 100 Dec 1 00:00 apt
256K -rw-r----- 1 root adm 256K May 29 08:55 auth.log
0 -rw-r--r-- 1 root root 0 Sep 25 2019 bootstrap.log
4.0K -rw-rw---- 1 root utmp 2.3K May 29 08:45 btmp
220K -rw-r----- 1 root adm 220K May 29 08:48 daemon.log
4.0K -rw-r----- 1 root adm 2.9K May 28 21:48 debug
0 -rw-r--r-- 1 root root 0 Dec 1 00:00 dpkg.log
0 drwxr-xr-x 2 pi root 160 May 28 23:17 emoncms
0 drwxrwxr-x 2 root emonhub 60 Oct 17 2019 emonhub
0 drwxr-xr-x 2 pi root 60 Oct 17 2019 emonpilcd
24K -rw-r--r-- 1 root root 24K Oct 17 2019 faillog
72K -rw-r----- 1 root adm 70K May 28 21:48 kern.log
288K -rw-rw-r-- 1 root utmp 286K May 29 08:45 lastlog
0 -rw-r--r-- 1 root root 0 May 26 21:27 lastlog.log
0 drwx------ 2 root root 60 May 27 21:57 letsencrypt
4.0K -rw-r--r-- 1 root root 2.5K May 29 08:17 log2ram.log
0 drwxr-xr-x 2 root adm 220 May 29 08:17 logrotate
0 -rw-r--r-- 1 root root 0 May 26 21:28 logrotate.log.1
72K -rw-r----- 1 root adm 72K May 29 08:55 messages
0 drwxr-xr-x 2 mosquitto root 60 Oct 17 2019 mosquitto
0 drwxr-s--- 2 mysql adm 60 May 29 00:17 mysql
0 drwx------ 2 root root 40 Sep 25 2019 private
0 drwxr-s--- 2 redis adm 60 May 27 00:00 redis
0 lrwxrwxrwx 1 root root 12 Oct 17 2019 rotated_logs -> /var/log.old
44K -rw-r----- 1 root adm 44K May 29 08:55 syslog
444K -rw-r----- 1 root adm 444K May 29 08:55 ufw.log
4.0K -rw-r----- 1 root adm 570 May 28 21:48 user.log
4.0K -rw-r--r-- 1 root root 1.1K May 28 21:48 wifiAP.log
112K -rw-rw-r-- 1 root utmp 110K May 29 08:45 wtmp
pi@emonpi:~$
Here is the output of testing logrotate.
pi@emonpi:~$ sudo /usr/sbin/logrotate -v /etc/logrotate.conf
reading config file /etc/logrotate.conf
including /etc/logrotate.d
reading config file 00_defaults
reading config file 00_olddir
olddir is now /var/log.old
reading config file alternatives
reading config file apache2
reading config file apt
reading config file btmp
reading config file certbot
reading config file dpkg
reading config file emoncms
olddir is now /var/log.old/emoncms
reading config file emonhub
olddir is now /var/log.old/emonhub
reading config file log2ram
reading config file mosquitto
reading config file mysql-server
reading config file redis-server
reading config file rsyslog
reading config file ufw
reading config file wtmp
Reading state from file: /var/lib/logrotate/status
Allocating hash table for state file, size 64 entries
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Creating new state
Handling 18 logs
rotating pattern: /var/log/logrotate/*.log 102400 bytes (7 rotations)
empty log files are not rotated, log files >= 512000 are rotated earlier, old logs are removed
considering log /var/log/logrotate/logrotate.log
Now: 2020-05-29 09:08
Last rotated at 2020-05-24 00:00
log does not need rotating (log size is below the 'size' threshold)
rotating pattern: /var/log/alternatives.log monthly (12 rotations)
olddir is /var/log.old, empty log files are not rotated, log files >= 512000 are rotated earlier, old logs are removed
considering log /var/log/alternatives.log
Now: 2020-05-29 09:08
Last rotated at 2019-12-01 00:00
log does not need rotating (log is empty)
rotating pattern: /var/log/apache2/*.log after 1 days (14 rotations)
olddir is /var/log.old, empty log files are not rotated, log files >= 512000 are rotated earlier, old logs are removed
considering log /var/log/apache2/access.log
Now: 2020-05-29 09:08
Last rotated at 2019-11-16 22:00
log does not need rotating (log is empty)
considering log /var/log/apache2/error.log
Now: 2020-05-29 09:08
Last rotated at 2019-11-17 00:00
log does not need rotating (log is empty)
considering log /var/log/apache2/other_vhosts_access.log
Now: 2020-05-29 09:08
Last rotated at 2019-11-16 22:00
log does not need rotating (log is empty)
not running prerotate script, since no logs will be rotated
not running postrotate script, since no logs were rotated
rotating pattern: /var/log/apt/term.log monthly (12 rotations)
olddir is /var/log.old, empty log files are not rotated, log files >= 512000 are rotated earlier, old logs are removed
considering log /var/log/apt/term.log
Now: 2020-05-29 09:08
Last rotated at 2019-12-01 00:00
log does not need rotating (log is empty)
rotating pattern: /var/log/apt/history.log monthly (12 rotations)
olddir is /var/log.old, empty log files are not rotated, log files >= 512000 are rotated earlier, old logs are removed
considering log /var/log/apt/history.log
Now: 2020-05-29 09:08
Last rotated at 2019-12-01 00:00
log does not need rotating (log is empty)
rotating pattern: /var/log/btmp monthly (1 rotations)
olddir is /var/log.old, empty log files are rotated, log files >= 512000 are rotated earlier, old logs are removed
considering log /var/log/btmp
Now: 2020-05-29 09:08
Last rotated at 2020-05-01 00:00
log does not need rotating (log has been rotated at 2020-5-1 0:0, that is not month ago yet)
rotating pattern: /var/log/letsencrypt/*.log weekly (12 rotations)
olddir is /var/log.old, empty log files are rotated, log files >= 512000 are rotated earlier, old logs are removed
considering log /var/log/letsencrypt/letsencrypt.log
Now: 2020-05-29 09:08
Last rotated at 2020-05-24 00:00
log does not need rotating (log has been rotated at 2020-5-24 0:0, that is not week ago yet)
rotating pattern: /var/log/dpkg.log monthly (12 rotations)
olddir is /var/log.old, empty log files are not rotated, log files >= 512000 are rotated earlier, old logs are removed
considering log /var/log/dpkg.log
Now: 2020-05-29 09:08
Last rotated at 2019-12-01 00:00
log does not need rotating (log is empty)
rotating pattern: /var/log/emoncms/*.log weekly (4 rotations)
olddir is /var/log.old/emoncms, empty log files are rotated, log files >= 3145728 are rotated earlier, old logs are removed
considering log /var/log/emoncms/apache2-error.log
Now: 2020-05-29 09:08
Last rotated at 2020-05-24 00:00
log does not need rotating (log has been rotated at 2020-5-24 0:0, that is not week ago yet)
considering log /var/log/emoncms/emoncms.log
Now: 2020-05-29 09:08
Last rotated at 2020-05-24 00:00
log does not need rotating (log has been rotated at 2020-5-24 0:0, that is not week ago yet)
considering log /var/log/emoncms/emonpiupdate.log
Now: 2020-05-29 09:08
Last rotated at 2020-05-24 00:00
log does not need rotating (log has been rotated at 2020-5-24 0:0, that is not week ago yet)
considering log /var/log/emoncms/emonupdate.log
Now: 2020-05-29 09:08
Last rotated at 2020-05-24 00:00
log does not need rotating (log has been rotated at 2020-5-24 0:0, that is not week ago yet)
considering log /var/log/emoncms/importbackup.log
Now: 2020-05-29 09:08
Last rotated at 2020-05-24 00:00
log does not need rotating (log has been rotated at 2020-5-24 0:0, that is not week ago yet)
considering log /var/log/emoncms/wificheck.log
Now: 2020-05-29 09:08
Last rotated at 2020-05-24 00:00
log does not need rotating (log has been rotated at 2020-5-24 0:0, that is not week ago yet)
rotating pattern: /var/log/emonhub/emonhub.log weekly (4 rotations)
olddir is /var/log.old/emonhub, empty log files are rotated, log files >= 3145728 are rotated earlier, old logs are removed
considering log /var/log/emonhub/emonhub.log
Now: 2020-05-29 09:08
Last rotated at 2020-05-24 00:00
log does not need rotating (log has been rotated at 2020-5-24 0:0, that is not week ago yet)
rotating pattern: /var/log/log2ram.log
after 1 days (7 rotations)
olddir is /var/log.old, empty log files are not rotated, log files >= 512000 are rotated earlier, old logs are removed
considering log /var/log/log2ram.log
Now: 2020-05-29 09:08
Last rotated at 2020-05-29 00:00
log does not need rotating (log has been rotated at 2020-5-29 0:0, that is not day ago yet)
rotating pattern: /var/log/mosquitto/mosquitto.log 102400 bytes (7 rotations)
olddir is /var/log.old, empty log files are rotated, log files >= 512000 are rotated earlier, old logs are removed
considering log /var/log/mosquitto/mosquitto.log
Now: 2020-05-29 09:08
Last rotated at 2019-11-16 22:00
log does not need rotating (log size is below the 'size' threshold)
rotating pattern: /var/log/mysql/mysql.log /var/log/mysql/mysql-slow.log /var/log/mysql/mariadb-slow.log /var/log/mysql/error.log after 1 days (7 rotations)
olddir is /var/log.old, empty log files are rotated, log files >= 512000 are rotated earlier, old logs are removed
considering log /var/log/mysql/mysql.log
log /var/log/mysql/mysql.log does not exist -- skipping
considering log /var/log/mysql/mysql-slow.log
log /var/log/mysql/mysql-slow.log does not exist -- skipping
considering log /var/log/mysql/mariadb-slow.log
log /var/log/mysql/mariadb-slow.log does not exist -- skipping
considering log /var/log/mysql/error.log
Now: 2020-05-29 09:08
Last rotated at 2020-05-29 00:00
log does not need rotating (log has been rotated at 2020-5-29 0:0, that is not day ago yet)
not running postrotate script, since no logs were rotated
rotating pattern: /var/log/redis/redis-server*.log weekly (12 rotations)
olddir is /var/log.old, empty log files are not rotated, log files >= 512000 are rotated earlier, old logs are removed
considering log /var/log/redis/redis-server.log
Now: 2020-05-29 09:08
Last rotated at 2020-05-27 00:00
log does not need rotating (log has been rotated at 2020-5-27 0:0, that is not week ago yet)
rotating pattern: /var/log/syslog
after 1 days (7 rotations)
olddir is /var/log.old, empty log files are not rotated, log files >= 512000 are rotated earlier, old logs are removed
considering log /var/log/syslog
Now: 2020-05-29 09:08
Last rotated at 2020-05-29 00:00
log does not need rotating (log has been rotated at 2020-5-29 0:0, that is not day ago yet)
rotating pattern: /var/log/mail.info
/var/log/mail.warn
/var/log/mail.err
/var/log/mail.log
/var/log/daemon.log
/var/log/kern.log
/var/log/auth.log
/var/log/user.log
/var/log/lpr.log
/var/log/cron.log
/var/log/debug
/var/log/messages
weekly (4 rotations)
olddir is /var/log.old, empty log files are not rotated, log files >= 512000 are rotated earlier, old logs are removed
considering log /var/log/mail.info
log /var/log/mail.info does not exist -- skipping
considering log /var/log/mail.warn
log /var/log/mail.warn does not exist -- skipping
considering log /var/log/mail.err
log /var/log/mail.err does not exist -- skipping
considering log /var/log/mail.log
log /var/log/mail.log does not exist -- skipping
considering log /var/log/daemon.log
Now: 2020-05-29 09:08
Last rotated at 2020-05-24 00:00
log does not need rotating (log has been rotated at 2020-5-24 0:0, that is not week ago yet)
considering log /var/log/kern.log
Now: 2020-05-29 09:08
Last rotated at 2020-05-24 00:00
log does not need rotating (log has been rotated at 2020-5-24 0:0, that is not week ago yet)
considering log /var/log/auth.log
Now: 2020-05-29 09:08
Last rotated at 2020-05-24 00:00
log does not need rotating (log has been rotated at 2020-5-24 0:0, that is not week ago yet)
considering log /var/log/user.log
Now: 2020-05-29 09:08
Last rotated at 2020-05-24 00:00
log does not need rotating (log has been rotated at 2020-5-24 0:0, that is not week ago yet)
considering log /var/log/lpr.log
log /var/log/lpr.log does not exist -- skipping
considering log /var/log/cron.log
log /var/log/cron.log does not exist -- skipping
considering log /var/log/debug
Now: 2020-05-29 09:08
Last rotated at 2020-05-24 00:00
log does not need rotating (log has been rotated at 2020-5-24 0:0, that is not week ago yet)
considering log /var/log/messages
Now: 2020-05-29 09:08
Last rotated at 2020-05-24 00:00
log does not need rotating (log has been rotated at 2020-5-24 0:0, that is not week ago yet)
not running postrotate script, since no logs were rotated
rotating pattern: /var/log/ufw.log
weekly (4 rotations)
olddir is /var/log.old, empty log files are not rotated, log files >= 512000 are rotated earlier, old logs are removed
considering log /var/log/ufw.log
Now: 2020-05-29 09:08
Last rotated at 2020-05-29 00:00
log does not need rotating (log has been rotated at 2020-5-29 0:0, that is not week ago yet)
not running postrotate script, since no logs were rotated
rotating pattern: /var/log/wtmp monthly (1 rotations)
olddir is /var/log.old, empty log files are rotated, only log files >= 1048576 bytes are rotated, log files >= 512000 are rotated earlier, old logs are removed
considering log /var/log/wtmp
Now: 2020-05-29 09:08
Last rotated at 2019-10-17 09:00
log does not need rotating ('minsize' directive is used and the log size is smaller than the minsize value)
pi@emonpi:~$
As far as the version I am on, the Admin page says Version: low-write 10.1.13 for emonCMS. Here is the update log.
Starting update via service-runner-update.sh (v3.0) >
- emonSD version: emonSD-17Oct19
emonSD base image check passed...continue update
git pull /opt/openenergymonitor/EmonScripts
master
* stable
On branch stable
Your branch is up to date with 'origin/stable'.
Changes not staged for commit:
(use "git add ..." to update what will be committed)
(use "git checkout -- ..." to discard changes in working directory)
modified: defaults/etc/logrotate.d/00_defaults
no changes added to commit (use "git add" and/or "git commit -a")
Already up to date.
-------------------------------------------------------------
Main Update Script
-------------------------------------------------------------
Date: Mon 25 May 22:22:28 CDT 2020
EUID: 1000
openenergymonitor_dir: /opt/openenergymonitor
type: all
firmware:
Hardware detected: rfm2pi
git pull /opt/openenergymonitor/emonpi
* master
On branch master
Your branch is up to date with 'origin/master'.
nothing to commit, working tree clean
Fetching origin
Already up to date.
git pull /opt/openenergymonitor/RFM2Pi
* master
On branch master
Your branch is up to date with 'origin/master'.
nothing to commit, working tree clean
Fetching origin
Already up to date.
Start emonhub update script:
-------------------------------------------------------------
emonHub update
-------------------------------------------------------------
git pull /opt/openenergymonitor/emonhub
* emon-pi
On branch emon-pi
Your branch is up to date with 'origin/emon-pi'.
nothing to commit, working tree clean
From https://github.com/openenergymonitor/emonhub
* [new branch] MQTTSubscriberInterfacer -> origin/MQTTSubscriberInterfacer
Already up to date.
Failed to restart .service.service: Unit .service.service not found.
- Service
Running emonhub automatic node addition script
…
Start emoncms update:
-------------------------------------------------------------
Update Emoncms Core
-------------------------------------------------------------
Checking status of /var/www/emoncms git repository
- git branch: stable
- no local changes
- running: git pull origin stable
Fetching origin
From https://github.com/emoncms/emoncms
* branch stable -> FETCH_HEAD
error: Your local changes to the following files would be overwritten by merge:
default-settings.php
example.settings.ini
example.settings.php
Please commit your changes or stash them before you merge.
Aborting
Updating 90f39158..8af639a9
Update Emoncms database
[]
-------------------------------------------------------------
Update Emoncms Services
-------------------------------------------------------------
emoncms_mqtt.service already installed
feedwriter.service already installed
service-runner.service already installed
Reloading systemctl deamon
Restarting Services...
- sudo systemctl restart feedwriter.service
--- ActiveState=active ---
- sudo systemctl restart emoncms_mqtt.service
--- ActiveState=active ---
- sudo systemctl restart emonhub.service
--- ActiveState=active ---
/opt/openenergymonitor/EmonScripts/sudoers.d/emoncms-rebootbutton: parsed OK
emonPi emoncms admin reboot button sudoers updated
-------------------------------------------------------------
Update Emoncms Modules
-------------------------------------------------------------
------------------------------------------
Updating /var/www/emoncms/Modules/app module
------------------------------------------
- git branch: stable
- git tags: 2.1.1-42-ge5d51a4
- no local changes
- running: git pull origin stable
Fetching origin
Already on 'stable'
Your branch is up to date with 'origin/stable'.
Already up to date.
------------------------------------------
Updating /var/www/emoncms/Modules/config module
------------------------------------------
- git branch: stable
- git tags: 2.0.5
- no local changes
- running: git pull origin stable
Fetching origin
Already on 'stable'
Your branch is up to date with 'origin/stable'.
Already up to date.
------------------------------------------
Updating /var/www/emoncms/Modules/dashboard module
------------------------------------------
- git branch: stable
- git tags: 2.0.7
- no local changes
- running: git pull origin stable
Fetching origin
Already on 'stable'
Your branch is up to date with 'origin/stable'.
Already up to date.
------------------------------------------
Updating /var/www/emoncms/Modules/device module
------------------------------------------
- git branch: stable
- git tags: 2.0.5
- no local changes
- running: git pull origin stable
Fetching origin
Already on 'stable'
Your branch is up to date with 'origin/stable'.
Already up to date.
------------------------------------------
Updating /var/www/emoncms/Modules/graph module
------------------------------------------
- git branch: stable
- git tags: 2.0.9
- no local changes
- running: git pull origin stable
Fetching origin
Already on 'stable'
Your branch is up to date with 'origin/stable'.
Already up to date.
------------------------------------------
Updating /var/www/emoncms/Modules/setup module
------------------------------------------
- git branch: stable
fatal: No names found, cannot describe anything.
- git tags:
- no local changes
- running: git pull origin stable
Fetching origin
Already on 'stable'
Your branch is up to date with 'origin/stable'.
Already up to date.
------------------------------------------
Updating /var/www/emoncms/Modules/wifi module
------------------------------------------
- git branch: stable
- git tags: 2.0.0-29-g274bcd5
- no local changes
- running: git pull origin stable
Fetching origin
Already on 'stable'
Your branch is up to date with 'origin/stable'.
Already up to date.
/opt/openenergymonitor/EmonScripts/sudoers.d/wifi-sudoers: parsed OK
wifi sudoers entry updated
------------------------------------------
Updating /opt/emoncms/modules/backup module
------------------------------------------
- git branch: stable
- git tags: 2.2.2-6-g70894e1
- no local changes
- running: git pull origin stable
Already up to date.
Already on 'stable'
Your branch is up to date with 'origin/stable'.
------------------------------------------
Updating /opt/emoncms/modules/demandshaper module
------------------------------------------
- git branch: stable
- git tags: 1.2.4-5-gd689aae
- no local changes
- running: git pull origin stable
From https://github.com/emoncms/demandshaper
5865855..62acab6 master -> origin/master
* [new branch] modular_forecasts -> origin/modular_forecasts
Already up to date.
Already on 'stable'
Your branch is up to date with 'origin/stable'.
------------------------------------------
Updating /opt/emoncms/modules/postprocess module
------------------------------------------
- git branch: stable
- git tags: 2.1.3-4-g5c50627
- no local changes
- running: git pull origin stable
Already up to date.
Already on 'stable'
Your branch is up to date with 'origin/stable'.
------------------------------------------
Updating /opt/emoncms/modules/sync module
------------------------------------------
- git branch: stable
- git tags: 2.0.5
- no local changes
- running: git pull origin stable
Already up to date.
Already on 'stable'
Your branch is up to date with 'origin/stable'.
------------------------------------------
Updating /opt/emoncms/modules/usefulscripts module
------------------------------------------
- git branch: stable
fatal: No names found, cannot describe anything.
- git tags:
- no local changes
- running: git pull origin stable
Already up to date.
Already on 'stable'
Your branch is up to date with 'origin/stable'.
--------------------------------------------
Backup module installation and update script
--------------------------------------------
- Loading EmonScripts config.ini
- Copying default.config.cfg to config.cfg
- Setting config.cfg settings
- Backup module symlink already exists
- PHP Version: 7.3
- Creating /etc/php/7.3/mods-available/emoncmsbackup.ini
post_max_size = 3G
upload_max_filesize = 3G
upload_tmp_dir = /var/opt/emoncms/backup/uploads
- phpenmod emoncmsbackup
- /var/opt/emoncms/backup already exists
- /var/opt/emoncms/backup/uploads already exists
- restarting apache
Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.
Update Emoncms database
[]
-------------------------------------------------------------
emonPi update done: Mon 25 May 22:23:12 CDT 2020
-------------------------------------------------------------
restarting service-runner
Regarding ufw and getting it to be less verbose. I took the suggestion to go to /etc/rsyslog.d/20-ufw.conf
and remove the comment character before the &stop
back when you suggested it. I have also added a specific “allow” rule for traffic coming from 192.168.1.80, my Dakboard node-red server that causes all the [BLOCK] entries in ufw.log. This hasn’t slowed down the logging a bit. I am suspicious that this is because the inbound hits from node-red all have different, seemingly random destination ports.
May 29 08:43:02 emonpi kernel: [39258.075608] [UFW BLOCK] IN=eth0 OUT= MAC=b8:27:eb:3d:21:50:b8:27:eb:e2:7d:67:08:00:45:00:00:28:00:00:40:00:40:06:b7:07 SRC=192.168.1.80 DST=192.168.1.40 LEN=40 TOS=0x00 PREC=0x00 TTL=64 ID=0 DF PROTO=TCP SPT=1880 DPT=54308 WINDOW=0 RES=0x00 RST URGP=0
May 29 08:43:32 emonpi kernel: [39288.157728] [UFW BLOCK] IN=eth0 OUT= MAC=b8:27:eb:3d:21:50:b8:27:eb:e2:7d:67:08:00:45:00:00:28:00:00:40:00:40:06:b7:07 SRC=192.168.1.80 DST=192.168.1.40 LEN=40 TOS=0x00 PREC=0x00 TTL=64 ID=0 DF PROTO=TCP SPT=1880 DPT=53602 WINDOW=0 RES=0x00 RST URGP=0
May 29 08:43:41 emonpi kernel: [39297.116653] [UFW BLOCK] IN=eth0 OUT= MAC=b8:27:eb:3d:21:50:b8:27:eb:e2:7d:67:08:00:45:00:00:28:00:00:40:00:40:06:b7:07 SRC=192.168.1.80 DST=192.168.1.40 LEN=40 TOS=0x00 PREC=0x00 TTL=64 ID=0 DF PROTO=TCP SPT=1880 DPT=54502 WINDOW=0 RES=0x00 RST URGP=0
May 29 08:44:02 emonpi kernel: [39318.237702] [UFW BLOCK] IN=eth0 OUT= MAC=b8:27:eb:3d:21:50:b8:27:eb:e2:7d:67:08:00:45:00:00:28:00:00:40:00:40:06:b7:07 SRC=192.168.1.80 DST=192.168.1.40 LEN=40 TOS=0x00 PREC=0x00 TTL=64 ID=0 DF PROTO=TCP SPT=1880 DPT=54502 WINDOW=0 RES=0x00 RST URGP=0
May 29 08:44:31 emonpi kernel: [39347.034810] [UFW BLOCK] IN=eth0 OUT= MAC=b8:27:eb:3d:21:50:b8:27:eb:e2:7d:67:08:00:45:00:00:28:00:00:40:00:40:06:b7:07 SRC=192.168.1.80 DST=192.168.1.40 LEN=40 TOS=0x00 PREC=0x00 TTL=64 ID=0 DF PROTO=TCP SPT=1880 DPT=53426 WINDOW=0 RES=0x00 RST URGP=0
May 29 08:45:05 emonpi kernel: [39380.492002] [UFW BLOCK] IN=eth0 OUT= MAC=b8:27:eb:3d:21:50:b8:27:eb:e2:7d:67:08:00:45:00:00:28:00:00:40:00:40:06:b7:07 SRC=192.168.1.80 DST=192.168.1.40 LEN=40 TOS=0x00 PREC=0x00 TTL=64 ID=0 DF PROTO=TCP SPT=1880 DPT=54112 WINDOW=0 RES=0x00 RST URGP=0
May 29 08:45:05 emonpi kernel: [39380.702926] [UFW BLOCK] IN=eth0 OUT= MAC=b8:27:eb:3d:21:50:b8:27:eb:e2:7d:67:08:00:45:00:00:28:00:00:40:00:40:06:b7:07 SRC=192.168.1.80 DST=192.168.1.40 LEN=40 TOS=0x00 PREC=0x00 TTL=64 ID=0 DF PROTO=TCP SPT=1880 DPT=54112 WINDOW=0 RES=0x00 RST URGP=0
May 29 08:45:35 emonpi kernel: [39410.732790] [UFW BLOCK] IN=eth0 OUT= MAC=b8:27:eb:3d:21:50:b8:27:eb:e2:7d:67:08:00:45:00:00:28:00:00:40:00:40:06:b7:07 SRC=192.168.1.80 DST=192.168.1.40 LEN=40 TOS=0x00 PREC=0x00 TTL=64 ID=0 DF PROTO=TCP SPT=1880 DPT=55624 WINDOW=0 RES=0x00 RST URGP=0
May 29 08:45:42 emonpi kernel: [39417.677312] [UFW BLOCK] IN=eth0 OUT= MAC=b8:27:eb:3d:21:50:b8:27:eb:e2:7d:67:08:00:45:00:00:28:00:00:40:00:40:06:b7:07 SRC=192.168.1.80 DST=192.168.1.40 LEN=40 TOS=0x00 PREC=0x00 TTL=64 ID=0 DF PROTO=TCP SPT=1880 DPT=55624 WINDOW=0 RES=0x00 RST URGP=0
May 29 08:46:03 emonpi kernel: [39438.562653] [UFW BLOCK] IN=eth0 OUT= MAC=b8:27:eb:3d:21:50:b8:27:eb:e2:7d:67:08:00:45:00:00:28:00:00:40:00:40:06:b7:07 SRC=192.168.1.80 DST=192.168.1.40 LEN=40 TOS=0x00 PREC=0x00 TTL=64 ID=0 DF PROTO=TCP SPT=1880 DPT=55624 WINDOW=0 RES=0x00 RST URGP=0
May 29 08:46:33 emonpi kernel: [39468.636009] [UFW BLOCK] IN=eth0 OUT= MAC=b8:27:eb:3d:21:50:b8:27:eb:e2:7d:67:08:00:45:00:00:28:00:00:40:00:40:06:b7:07 SRC=192.168.1.80 DST=192.168.1.40 LEN=40 TOS=0x00 PREC=0x00 TTL=64 ID=0 DF PROTO=TCP SPT=1880 DPT=55822 WINDOW=0 RES=0x00 RST URGP=0
May 29 08:47:05 emonpi kernel: [39500.991027] [UFW BLOCK] IN=eth0 OUT= MAC=b8:27:eb:3d:21:50:b8:27:eb:e2:7d:67:08:00:45:00:00:28:00:00:40:00:40:06:b7:07 SRC=192.168.1.80 DST=192.168.1.40 LEN=40 TOS=0x00 PREC=0x00 TTL=64 ID=0 DF PROTO=TCP SPT=1880 DPT=55064 WINDOW=0 RES=0x00 RST URGP=0
May 29 08:47:05 emonpi kernel: [39501.202692] [UFW BLOCK] IN=eth0 OUT= MAC=b8:27:eb:3d:21:50:b8:27:eb:e2:7d:67:08:00:45:00:00:28:00:00:40:00:40:06:b7:07 SRC=192.168.1.80 DST=192.168.1.40 LEN=40 TOS=0x00 PREC=0x00 TTL=64 ID=0 DF PROTO=TCP SPT=1880 DPT=55064 WINDOW=0 RES=0x00 RST URGP=0
May 29 08:47:35 emonpi kernel: [39531.122554] [UFW BLOCK] IN=eth0 OUT= MAC=b8:27:eb:3d:21:50:b8:27:eb:e2:7d:67:08:00:45:00:00:28:00:00:40:00:40:06:b7:07 SRC=192.168.1.80 DST=192.168.1.40 LEN=40 TOS=0x00 PREC=0x00 TTL=64 ID=0 DF PROTO=TCP SPT=1880 DPT=51778 WINDOW=0 RES=0x00 RST URGP=0
You need to look in the logs and work out what is causing the excessive logging - it is the only way to fix it. I suggest you cast your query wider to Stackoverflow [edit] (or the Node-RED forum) for instance as this is not an emoncms issue.
I have also suggested using tshark
on the Node-Red machine and see if you can work out what is sending the requests. Maybe try stopping some flows and see if that stops the requests.
The issue is you have ignored the comment at the top that says do not edit this file.
The changes you made to ‘default-settings.ini’ need to be moved to the settings.ini
file.
Then the files should be reverted to their GitHub state.
I cannot remember the correct command. Do…
cd /var/www/emoncms
git pull
and the message will tell you what to do to delete your changes.
[edit]
It is the same problem with the first git pull that fails but that is because of the logrotate fix you used. You can revert that change as I’m sure Trystan said the fix had been merged.
git checkout -- <filename>
will revert your changes so the git pull
works.
I admit I did find it confusing as to which settings file I needed to edit. In the end I did put my changes in settings.ini, but maybe I left behind some differences in the other files. The change I made to settings.ini was max_node_id_limit = 64
Just now I did this.
pi@emonpi:/var/www/emoncms$ git checkout -- default-settings.php
pi@emonpi:/var/www/emoncms$ git checkout -- example.settings.ini
pi@emonpi:/var/www/emoncms$ git checkout -- example.settings.php
pi@emonpi:/var/www/emoncms$ git pull
Updating 90f39158..8af639a9
Fast-forward
.travis.yml | 5 +
Lib/EmonLogger.php | 59 ++-
Lib/dbschemasetup.php | 76 ++-
Lib/email.php | 100 ++--
Lib/enum.php | 29 +-
Lib/misc/nav_functions.php | 11 +-
Lib/misc/sidebar.css | 50 +-
Lib/misc/sidebar.js | 7 +-
Lib/process_old_settings.php | 6 +-
Lib/units.php | 6 +-
Modules/admin/admin_controller.php | 43 +-
Modules/admin/admin_db_view.php | 23 -
Modules/admin/admin_main_view.php | 16 +-
Modules/admin/admin_menu.php | 2 +-
Modules/admin/admin_model.php | 74 +--
Modules/admin/locale/it_IT/LC_MESSAGES/messages.mo | Bin 2392 -> 6742 bytes
Modules/admin/locale/it_IT/LC_MESSAGES/messages.po | 537 +++++++++++++++++---
Modules/admin/locale/messages.pot | 462 +++++++++++++++++
Modules/admin/pi-model.json | 623 ++++++++++++-----------
Modules/admin/static/admin_styles.css | 39 ++
Modules/admin/userlist_view.php | 4 +-
Modules/eventp/locale/eventp_messages.pot | 1138 +++++++++++++++++++++++++++++++++++++++++
Modules/eventp/locale/it_IT/LC_MESSAGES/eventp_messages.mo | Bin 0 -> 999 bytes
Modules/eventp/locale/it_IT/LC_MESSAGES/eventp_messages.po | 1167 +++++++++++++++++++++++++++++++++++++++++++
Modules/feed/Views/feedapi_view.php | 2 +-
Modules/feed/Views/feedlist_view.php | 39 +-
Modules/feed/engine/TemplateEngine.php | 67 ++-
Modules/feed/engine/VirtualFeed.php | 46 +-
Modules/feed/feed_controller.php | 48 +-
Modules/feed/feed_model.php | 33 +-
Modules/feed/locale/it_IT/LC_MESSAGES/messages.mo | Bin 1827 -> 3995 bytes
Modules/feed/locale/it_IT/LC_MESSAGES/messages.po | 742 ++++++++++++++++++++++++---
Modules/feed/locale/messages.pot | 631 +++++++++++++++++++++++
Modules/input/Views/input_api.php | 2 +-
Modules/input/Views/input_view.js | 31 +-
Modules/input/Views/input_view.php | 25 +-
Modules/input/Views/schedule.php | 8 +-
Modules/input/input_controller.php | 3 +-
Modules/input/input_menu.php | 10 +-
Modules/input/input_methods.php | 1 +
Modules/input/input_model.php | 6 +-
Modules/input/locale/it_IT/LC_MESSAGES/messages.mo | Bin 1153 -> 4010 bytes
Modules/input/locale/it_IT/LC_MESSAGES/messages.po | 777 +++++++++++++++++++---------
Modules/input/locale/messages.pot | 543 ++++++++++++++++++++
Modules/process/Views/process_ui.js | 14 +-
Modules/process/Views/process_ui.php | 9 +-
Modules/process/locale/it_IT/LC_MESSAGES/process_messages.mo | Bin 0 -> 6119 bytes
Modules/process/locale/it_IT/LC_MESSAGES/process_messages.po | 1166 ++++++++++++++++++++++++++++++++++++++++++
Modules/process/locale/process_messages.pot | 922 ++++++++++++++++++++++++++++++++++
Modules/process/process_model.php | 32 +-
Modules/process/process_processlist.php | 80 ++-
Modules/schedule/locale/it_IT/LC_MESSAGES/schedule_messages.mo | Bin 0 -> 2817 bytes
Modules/schedule/locale/it_IT/LC_MESSAGES/schedule_messages.po | 317 ++++++++++++
Modules/schedule/locale/schedule_messages.pot | 261 ++++++++++
Modules/user/locale/it_IT/LC_MESSAGES/messages.mo | Bin 4776 -> 7188 bytes
Modules/user/locale/it_IT/LC_MESSAGES/messages.po | 387 ++++++++------
Modules/user/locale/messages.pot | 361 +++++++++++++
Modules/user/rememberme_model.php | 4 +-
Modules/user/user_controller.php | 4 +-
Modules/user/user_menu.php | 5 +-
Modules/user/user_model.php | 31 +-
Modules/vis/README.md | 38 ++
Modules/vis/locale/it_IT/LC_MESSAGES/vis_messages.mo | Bin 4865 -> 8493 bytes
Modules/vis/locale/it_IT/LC_MESSAGES/vis_messages.po | 1051 +++++++++++++++++++++++++++++---------
Modules/vis/locale/vis_messages.pot | 941 ++++++++++++++++++++++++++++++++++
Modules/vis/vis_object.php | 40 +-
Modules/vis/visualisations/editrealtime.php | 58 ++-
Modules/vis/visualisations/multigraph.php | 86 ++--
Modules/vis/visualisations/multigraph/multigraph.js | 290 ++++++-----
Modules/vis/visualisations/rawdata.php | 1 +
Modules/vis/visualisations/realtime.php | 2 +-
Modules/vis/visualisations/stacked.php | 9 +-
Modules/vis/visualisations/stackedsolar.php | 9 +-
Theme/basic/embed.php | 9 +-
Theme/basic/emon-blue.css | 4 +-
Theme/basic/emon-standard.css | 4 +-
Theme/basic/emon-sun.css | 4 +-
Theme/basic/locale/it_IT/LC_MESSAGES/theme_messages.mo | Bin 0 -> 983 bytes
Theme/basic/locale/it_IT/LC_MESSAGES/theme_messages.po | 54 ++
Theme/basic/locale/theme_messages.pot | 54 ++
Theme/basic/menu_view.php | 7 +-
Theme/basic/sidebar_view.php | 3 -
Theme/basic/theme.php | 5 +-
composer.json | 12 +-
core.php | 215 +++++---
default-settings.ini | 12 +-
default-settings.php | 14 +-
docs/RaspberryPi/language_support.md | 49 ++
example.settings.ini | 14 +-
example.settings.php | 8 +-
index.php | 704 +++++++++++++-------------
locale.php | 31 +-
param.php | 79 ++-
php-info.php | 2 +-
process_settings.php | 87 ++--
readme.md | 41 +-
route.php | 8 +-
scripts/phpmqtt_input.php | 18 +-
scripts/services/emoncms_mqtt/emoncms_mqtt.php | 110 ++--
settings.env.ini | 27 +-
version.txt | 2 +-
101 files changed, 12911 insertions(+), 2275 deletions(-)
delete mode 100644 Modules/admin/admin_db_view.php
create mode 100644 Modules/admin/locale/messages.pot
create mode 100644 Modules/eventp/locale/eventp_messages.pot
create mode 100644 Modules/eventp/locale/it_IT/LC_MESSAGES/eventp_messages.mo
create mode 100644 Modules/eventp/locale/it_IT/LC_MESSAGES/eventp_messages.po
create mode 100644 Modules/feed/locale/messages.pot
create mode 100644 Modules/input/locale/messages.pot
create mode 100644 Modules/process/locale/it_IT/LC_MESSAGES/process_messages.mo
create mode 100644 Modules/process/locale/it_IT/LC_MESSAGES/process_messages.po
create mode 100644 Modules/process/locale/process_messages.pot
create mode 100644 Modules/schedule/locale/it_IT/LC_MESSAGES/schedule_messages.mo
create mode 100644 Modules/schedule/locale/it_IT/LC_MESSAGES/schedule_messages.po
create mode 100644 Modules/schedule/locale/schedule_messages.pot
create mode 100644 Modules/user/locale/messages.pot
create mode 100644 Modules/vis/README.md
create mode 100644 Modules/vis/locale/vis_messages.pot
create mode 100644 Theme/basic/locale/it_IT/LC_MESSAGES/theme_messages.mo
create mode 100644 Theme/basic/locale/it_IT/LC_MESSAGES/theme_messages.po
create mode 100644 Theme/basic/locale/theme_messages.pot
create mode 100644 docs/RaspberryPi/language_support.md
pi@emonpi:/var/www/emoncms$
Yep that worked.
Me again. /var/log is full again despite turning off ufw and certbot (I moved this setup to another machine). Any suggestions on what to do next?
pi@emonpi:/etc/apache2/sites-enabled$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 4.0G 2.7G 1.1G 72% /
devtmpfs 459M 0 459M 0% /dev
tmpfs 464M 0 464M 0% /dev/shm
tmpfs 464M 47M 417M 11% /run
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 464M 0 464M 0% /sys/fs/cgroup
tmpfs 1.0M 0 1.0M 0% /var/lib/php/sessions
tmpfs 30M 4.0K 30M 1% /tmp
tmpfs 1.0M 0 1.0M 0% /var/tmp
/dev/mmcblk0p3 10G 1.2G 8.4G 12% /var/opt/emoncms
/dev/mmcblk0p1 253M 53M 200M 21% /boot
log2ram 50M 50M 0 100% /var/log
tmpfs 93M 0 93M 0% /run/user/1000
pi@emonpi:/etc/apache2/sites-enabled$ ls -lh --size /var/log
total 536K
0 -rw-r--r-- 1 root root 0 Dec 1 2019 alternatives.log
0 drwxr-x--- 2 root adm 100 Nov 17 2019 apache2
0 drwxr-xr-x 2 root root 100 Dec 1 2019 apt
40K -rw-r----- 1 root adm 40K Jun 10 12:40 auth.log
0 -rw-r--r-- 1 root root 0 Sep 25 2019 bootstrap.log
0 -rw-rw---- 1 root utmp 0 Jun 3 15:17 btmp
28K -rw-r----- 1 root adm 28K Jun 10 12:39 daemon.log
0 -rw-r----- 1 root adm 0 Jun 3 15:17 debug
0 -rw-r--r-- 1 root root 0 Dec 1 2019 dpkg.log
0 drwxr-xr-x 2 pi root 160 Jun 9 16:17 emoncms
0 drwxrwxr-x 2 root emonhub 60 Oct 17 2019 emonhub
0 drwxr-xr-x 2 pi root 60 Oct 17 2019 emonpilcd
24K -rw-r--r-- 1 root root 24K Oct 17 2019 faillog
0 -rw-r----- 1 root adm 0 Jun 8 22:10 kern.log
288K -rw-rw-r-- 1 root utmp 286K Jun 9 14:43 lastlog
0 -rw-r--r-- 1 root root 0 May 26 21:27 lastlog.log
0 drwx------ 2 root root 60 Jun 7 00:17 letsencrypt
0 -rw-r--r-- 1 root root 0 Jun 4 01:17 log2ram.log
0 drwxr-xr-x 2 root adm 220 Jun 10 12:17 logrotate
0 -rw-r--r-- 1 root root 0 May 26 21:28 logrotate.log.1
4.0K -rw-r----- 1 root adm 4.0K Jun 10 12:40 messages
0 drwxr-xr-x 2 mosquitto root 60 Oct 17 2019 mosquitto
0 drwxr-s--- 2 mysql adm 60 Jun 10 00:17 mysql
0 drwx------ 2 root root 40 Sep 25 2019 private
0 drwxr-s--- 2 redis adm 60 Jun 3 15:17 redis
0 lrwxrwxrwx 1 root root 12 Oct 17 2019 rotated_logs -> /var/log.old
12K -rw-r----- 1 root adm 12K Jun 10 12:40 syslog
24K -rw-r----- 1 root adm 24K Jun 9 15:19 ufw.log
0 -rw-r----- 1 root adm 0 Jun 3 15:17 user.log
4.0K -rw-r--r-- 1 root root 1.1K Jun 3 14:18 wifiAP.log
112K -rw-rw-r-- 1 root utmp 112K Jun 9 14:43 wtmp
pi@emonpi:/etc/apache2/sites-enabled$ sudo find /var/log -type f -exec du -ah {} + | sort -n -r | head -n 20
288K /var/log/lastlog
112K /var/log/wtmp
112K /var/log/logrotate/logrotate.log.1
96K /var/log/logrotate/logrotate.log
40K /var/log/auth.log
28K /var/log/daemon.log
28K /var/log/apt/eipp.log.xz
24K /var/log/ufw.log
24K /var/log/faillog
12K /var/log/syslog
8.0K /var/log/logrotate/logrotate.log.7.gz
8.0K /var/log/logrotate/logrotate.log.4.gz
8.0K /var/log/logrotate/logrotate.log.3.gz
8.0K /var/log/logrotate/logrotate.log.2.gz
8.0K /var/log/emonpilcd/emonpilcd.log
4.0K /var/log/wifiAP.log
4.0K /var/log/mosquitto/mosquitto.log
4.0K /var/log/messages
4.0K /var/log/logrotate/logrotate.status
4.0K /var/log/logrotate/logrotate.log.6.gz
For those that might benefit, here’s what I’ve learned in the last couple weeks.
- If you are going to run a reverse proxy on a Raspberry Pi within your network, don’t use the same Pi that you are using for emonCMS. Every time you need to restart apache2 to update your proxy settings, emonCMS is effected. And all the logging that you want from your proxy server is more logging than you might want on your emonCMS server. At least this is my opinion after what I’ve been doing lately.
- Cloudflare proxy makes a lot of sense, and Paul Reed has a nice write-up on how to set it up with ufw to limit traffic into your network to only that which has come through Cloudflare, including a script that keeps ufw up-to-date with Cloudflare’s current IP addresses.
So I now have a separate reverse proxy Pi inside my network that is looking for valid traffic from Cloudflare and proxying it to emonCMS.
I like this setup better, and I hoped it would resolve the full /var/log problem, but apparently not.
Those numbers do not seem to add up to 50M which is the size of /var/log