O dear, that error should not happen as it should only try to create a device if the device did not exist in the device list initially loaded from the device module.
Which suggests that there is a discrepancy between the redis cache of the device list and the persistent mysql table.
Do you see the emonpi device in the result given by this api?:
If this becomes a widespread issue I could add a check in the device create function to check against both the redis cache and the mysql table, with an automatic device redis cache reload if they differ. It could then also be possible to respond to the error in the input list javascript and reload the device list.
The redis cache and mysql table should not differ in the first place, but it seems to have done here so its something to keep an eye on.
I will say it again for emphasis, there is little information on the ‘device’ facility. For example, this is the diskstats input we created a while back (not actuallt running ATM)
What would be the correct ‘device’ to select and why?
The box listed as location is what comes out as description
I’m also having an issue with the inputs page on Emoncms 10.1.2 hosted on an emonBase. Initially I was getting the same error message but now going to inputs causes my browser to freeze.
I tried flushing Redis and rebooting but to no avail.
It is possible one of the Repos has not updated correctly. Could you post the update log please? You could try another update - it doesn’t hurt. Is this an EmonPi?
Here is the log, it’s an emonBase I’m using. I will try another update unless there’s something obvious below.
(second half of log in another post due to length)
LAST ENTRIES ON THE LOG FILE
Starting update via service-runner-update.sh (v2.0) >
- emonSD version: emonSD-30Oct18
emonSD base image check passed...continue update
git pull /home/pi/emonpi
sudo: unable to resolve host emonpi: Connection timed out
enable-ssh
enable-ssh-button
gpiozero-enable-ssh
greeebs-patch-1
* master
python-systemd-servicerunner
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working tree clean
Already up-to-date.
-------------------------------------------------------------
Main Update Script
-------------------------------------------------------------
Date: Mon 1 Jul 08:54:19 UTC 2019
EUID: 1000
usrdir: /home/pi
type: all
firmware: custom
Checking environment:
- pi user found
EUID: 1000
sudo: unable to resolve host emonpi: Connection timed out
sudo: unable to resolve host emonpi: Connection timed out
Hardware detected: rfm2pi
Stopping emonPiLCD service
sudo: unable to resolve host emonpi: Connection timed out
Display update message on LCD
sudo: unable to resolve host emonpi: Connection timed out
I2C LCD NOT DETECTED on either 0x['27', '3f'] ...exiting LCD script
-------------------------------------------------------------
sudo: unable to resolve host emonpi: Connection timed out
Get:1 http://archive.raspberrypi.org/debian stretch InRelease [25.4 kB]
Get:2 http://raspbian.raspberrypi.org/raspbian stretch InRelease [15.0 kB]
Get:3 http://archive.raspberrypi.org/debian stretch/main armhf Packages [221 kB]
Get:4 http://archive.raspberrypi.org/debian stretch/ui armhf Packages [45.0 kB]
Get:5 http://raspbian.raspberrypi.org/raspbian stretch/main armhf Packages [11.7 MB]
Get:6 http://raspbian.raspberrypi.org/raspbian stretch/non-free armhf Packages [95.5 kB]
Fetched 12.1 MB in 15s (789 kB/s)
Reading package lists...
sudo: unable to resolve host emonpi: Connection timed out
Reading package lists...
Building dependency tree...
Reading state information...
python-rpi.gpio is already the newest version (0.6.5~stretch-1).
Suggested packages:
python-gpiozero-docs
The following NEW packages will be installed:
python-colorzero rng-tools
The following packages will be upgraded:
python-gpiozero
1 upgraded, 2 newly installed, 0 to remove and 123 not upgraded.
Need to get 159 kB of archives.
After this operation, 420 kB of additional disk space will be used.
Get:1 http://archive.raspberrypi.org/debian stretch/main armhf python-colorzero all 1.1 [21.7 kB]
Get:2 http://archive.raspberrypi.org/debian stretch/main armhf python-gpiozero all 1.5.0 [88.2 kB]
Get:3 http://raspbian.mirror.uk.sargasso.net/raspbian stretch/main armhf rng-tools armhf 2-unofficial-mt.14-1 [48.7 kB]
apt-listchanges: Reading changelogs...
debconf: unable to initialize frontend: Dialog
debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
dpkg-preconfigure: unable to re-open stdin:
Fetched 159 kB in 0s (397 kB/s)
Selecting previously unselected package rng-tools.
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 46885 files and directories currently installed.)
Preparing to unpack .../rng-tools_2-unofficial-mt.14-1_armhf.deb ...
Unpacking rng-tools (2-unofficial-mt.14-1) ...
Selecting previously unselected package python-colorzero.
Preparing to unpack .../python-colorzero_1.1_all.deb ...
Unpacking python-colorzero (1.1) ...
Preparing to unpack .../python-gpiozero_1.5.0_all.deb ...
Unpacking python-gpiozero (1.5.0) over (1.4.1) ...
Setting up rng-tools (2-unofficial-mt.14-1) ...
Processing triggers for systemd (232-25+deb9u4) ...
Setting up python-colorzero (1.1) ...
Processing triggers for man-db (2.7.6.1-2) ...
Setting up python-gpiozero (1.5.0) ...
E: Write error - ~LZMAFILE (28: No space left on device)
sudo: unable to resolve host emonpi: Connection timed out
Requirement already up-to-date: paho-mqtt in /usr/local/lib/python2.7/dist-packages
-------------------------------------------------------------
git pull /home/pi/RFM2Pi
* master
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working tree clean
Already up-to-date.
git pull /home/pi/usefulscripts
* master
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working tree clean
Already up-to-date.
git pull /home/pi/huawei-hilink-status
* master
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working tree clean
Already up-to-date.
git pull /home/pi/oem_node-red
* master
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working tree clean
Already up-to-date.
Start emonhub update script:
-------------------------------------------------------------
emonHub update started
-------------------------------------------------------------
- usr directory: /home/pi
git pull /home/pi/emonhub
* emon-pi
On branch emon-pi
Your branch is up-to-date with 'origin/emon-pi'.
nothing to commit, working tree clean
Already up-to-date.
Creating emonhub logfile
Symlinking emonhub.conf to /etc/emonhub/emonhub.conf
sudo: unable to resolve host emonpi: Connection timed out
sudo: unable to resolve host emonpi: Connection timed out
sudo: unable to resolve host emonpi: Connection timed out
sudo: unable to resolve host emonpi: Connection timed out
removing initd emonhub service
sudo: unable to resolve host emonpi: Connection timed out
Fatal: cannot find /usr/share/emonhub/emonhub.py
sudo: unable to resolve host emonpi: Connection timed out
Installing emonhub.service in /lib/systemd/system (creating symlink)
sudo: unable to resolve host emonpi: Connection timed out
sudo: unable to resolve host emonpi: Connection timed out
Created symlink /etc/systemd/system/multi-user.target.wants/emonhub.service → /home/pi/emonhub/service/emonhub.service.
Created symlink /etc/systemd/system/emonhub.service → /home/pi/emonhub/service/emonhub.service.
sudo: unable to resolve host emonpi: Connection timed out
sudo: unable to resolve host emonpi: Connection timed out
sudo: unable to resolve host emonpi: Connection timed out
-------------------------------------------------------------
Emoncms update started
Emoncms update script V1.3 (26th March 2019)
-------------------------------------------------------------
- usr directory: /home/pi
- emoncms directory: /var/www/emoncms
current settings.php md5: bfcadb4356440ffc96c06a5d91aa2a02
Default settings.php md5: bfcadb4356440ffc96c06a5d91aa2a02
settings.php has NOT been user modifed
Checking status of /var/www/emoncms git repository
- git branch: stable
- no local changes
- running: git pull origin stable
NEW default settings.php md5: 0e4803a641b7784ed23edf87506ce761
Update required to settings.php...
sudo: unable to resolve host emonpi: Connection timed out
settings.php autoupdated
LAST ENTRIES ON THE LOG FILE
-------------------------------------------------------------
Updating Emoncms Modules
-------------------------------------------------------------
sudo: unable to resolve host emonpi: Connection timed out
/home/pi/emonpi/sudoers.d/wifi-sudoers: parsed OK
sudo: unable to resolve host emonpi: Connection timed out
sudo: unable to resolve host emonpi: Connection timed out
wifi-sudoers sudoers entry installed
sudo: unable to resolve host emonpi: Connection timed out
sudo: unable to resolve host emonpi: Connection timed out
www-data : www-data video systemd-journal
------------------------------------------
SERVICES
------------------------------------------
Removing mqtt_input.service from /etc/systemd/system
sudo: unable to resolve host emonpi: Connection timed out
sudo: unable to resolve host emonpi: Connection timed out
Installing emoncms_mqtt.service in /lib/systemd/system (creating symlink)
sudo: unable to resolve host emonpi: Connection timed out
sudo: unable to resolve host emonpi: Connection timed out
Created symlink /etc/systemd/system/multi-user.target.wants/emoncms_mqtt.service → /var/www/emoncms/scripts/services/emoncms_mqtt/emoncms_mqtt.service.
Created symlink /etc/systemd/system/emoncms_mqtt.service → /var/www/emoncms/scripts/services/emoncms_mqtt/emoncms_mqtt.service.
sudo: unable to resolve host emonpi: Connection timed out
removing initd feedwriter service
sudo: unable to resolve host emonpi: Connection timed out
Log is turned off
Stopping feedwriter: stopped
sudo: unable to resolve host emonpi: Connection timed out
Installing feedwriter.service in /lib/systemd/system (creating symlink)
sudo: unable to resolve host emonpi: Connection timed out
sudo: unable to resolve host emonpi: Connection timed out
Created symlink /etc/systemd/system/multi-user.target.wants/feedwriter.service → /var/www/emoncms/scripts/services/feedwriter/feedwriter.service.
Created symlink /etc/systemd/system/feedwriter.service → /var/www/emoncms/scripts/services/feedwriter/feedwriter.service.
sudo: unable to resolve host emonpi: Connection timed out
service-runner.service already installed
------------------------------------------
Installing mariadb service config
sudo: unable to resolve host emonpi: Connection timed out
sudo: unable to resolve host emonpi: Connection timed out
[Service]
ProtectHome=false
Reloading systemctl deamon
sudo: unable to resolve host emonpi: Connection timed out
Update Emoncms database
[]
Restarting Services...
- sudo systemctl restart feedwriter.service
sudo: unable to resolve host emonpi: Connection timed out
--- ActiveState=active ---
- sudo systemctl restart emoncms_mqtt.service
sudo: unable to resolve host emonpi: Connection timed out
--- ActiveState=active ---
- sudo systemctl restart emonhub.service
sudo: unable to resolve host emonpi: Connection timed out
--- ActiveState=active ---
Symlinking emonpiupdate.log
Installing emoncms logrotate...
sudo: unable to resolve host emonpi: Connection timed out
sudo: unable to resolve host emonpi: Connection timed out
sudo: unable to resolve host emonpi: Connection timed out
Now setting up Logrotate...
Backing up old logrotate configuration...
sudo: unable to resolve host emonpi: Connection timed out
Linked to new logrotate configuration...
sudo: unable to resolve host emonpi: Connection timed out
sudo: unable to resolve host emonpi: Connection timed out
Backing up old logrotate cron job...
sudo: unable to resolve host emonpi: Connection timed out
Linked to new logrotate cron job...
sudo: unable to resolve host emonpi: Connection timed out
sudo: unable to resolve host emonpi: Connection timed out
sudo: unable to resolve host emonpi: Connection timed out
Completed
Completed
Running logrotate...
sudo: unable to resolve host emonpi: Connection timed out
set log rotate config owner to root
sudo: unable to resolve host emonpi: Connection timed out
Starting emonPi LCD service..
sudo: unable to resolve host emonpi: Connection timed out
-------------------------------------------------------------
emonPi update done: Mon 1 Jul 08:58:07 UTC 2019
-------------------------------------------------------------
restarting service-runner
service-runner: no process found
sudo: unable to resolve host emonpi: Connection timed out