EmonPi and emonBase Update buttons don't work

Hi!

Because my Inputs still don’t work I digging little more and I discover, that Emoncms and emonpi have new version ( my system have 2.8.2 emonpi and Emoncms 9.8.0 version) - but when I pressing the update buttons, system starts to something, rebooting, but version’s of system still are the same.
Can I update my system from terminal somehow ? or what are my options ?

Edit - Log file is attached to post #3 in this thread. BT, Moderator

Hi Margus,

Please upload your log file here. i.e. as an attachment to your post. We avoid using third party sites. If your file were to become inacessable, or disappear altogether, your post would become useless.

If it’s not a short file, the preferred method is to zip it first, then upload it.

Here Is my log file - can anybody help me ?

emonpiupdate.log.zip (7.6 KB)

Have you tried clearing your cache on the machine you are browsing from?

The logs show you have updated to the latest versions, 4 times in fact yesterday.

Try using CTRL-F5 on the admin page and see if the version info is updated there.

Yes I cleaned cache and trying with 2-3 different browser and PC - but seems the system itself on old version - because when booting up system the emonpi LCD shows version 2.82 - newest is 2.83 - I think the problem with that - that system don’t updating ;(

Ok that is the firmware version, can you confirm if emoncms has updated?

The firmware update does try to run, looking at this part or the last log entry

Start emonPi Atmega328 firmware update:

=================================
EmonPi update started
=================================

EUID: 1000

Requirement already up-to-date: paho-mqtt in /usr/local/lib/python2.7/dist-packages
Stopping OpenEnergyMonitor emonHub: emonhub has been stopped ok.
Start ATmega328 serial upload using avrdude with latest.hex
Discrete Sampling
avrdude -c arduino -p ATMEGA328P -P /dev/ttyAMA0 -b 115200 -U flash:w:/home/pi/emonpi/firmware/compiled/latest.hex
avrdude-original: Using autoreset DTR on GPIO Pin 7
Starting OpenEnergyMonitor emonHub: emonhub has been started ok.

there is no sign of a problem (or confirmation of a successful upload for that matter).

Can you check for a file called /var/log/service-runner.log for any errors. There is a quirk in the way the emonPi update log works and some errors get posted to this less used logfile. If you have rebooted it will be lost so you may need to retry the “update emonPi” button from emoncms again.

[edit - for more info on this see the Errors not reported in emonpiupdate.log file thread]

In Admin tab from web showing old emoncms version as well

And in service-runner.log is hundred and thousand road with " update via service-runner" and nothing more

how odd, your logs say it’s up to date

Start emoncms update:

=================================
Emoncms update started

Tue  2 May 22:26:02 UTC 2017

EUID: 1000
Checking cron tab for service runner entry...
service runner crontab entry already installed

git pull /var/www/emoncms
  dev-mosquitto-php
  master
* stable
  symlinked_modules
On branch stable
Your branch is up-to-date with 'origin/stable'.
nothing to commit, working directory clean

Have you tried restarting the apache server?

sudo service apache2 restart

I have just fired up my test emonPi and looked at /var/log/service-runner.log and found

update via service-runner
update via service-runner
update via service-runner

after running the update from emoncms I had this

update via service-runner
update via service-runner
update via service-runner
STARTING: /home/pi/emonpi/service-runner-update.sh emonpi >> /home/pi/data/emonpiupdate.log
From https://github.com/openenergymonitor/emonpi
   e60cb72..ec62210  master     -> origin/master
 * [new branch]      startupAP  -> origin/startupAP
 * [new tag]         2.8.3      -> 2.8.3
update via service-runner
From https://github.com/openenergymonitor/RFM2Pi
   30e650d..e5d874d  master     -> origin/master
From https://github.com/openenergymonitor/emonhub
   79ff05b..0a4da93  emon-pi    -> origin/emon-pi
 * [new branch]      dev        -> origin/dev
 * [new branch]      lanip-status -> origin/lanip-status
error: insufficient permission for adding an object to repository database .git/objects
fatal: failed to write object
fatal: unpack-objects failed
From https://github.com/openenergymonitor/huawei-hilink-status
   e5c046b..48ee3d0  master     -> origin/master
You are using pip version 8.1.2, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

avrdude-original: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude-original: Device signature = 0x1e950f
avrdude-original: NOTE: "flash" memory has been specified, an erase cycle will be performed
                  To disable this feature, specify the -D option.
avrdude-original: erasing chip
avrdude-original: reading input file "/home/pi/emonpi/firmware/compiled/latest.hex"
avrdude-original: input file /home/pi/emonpi/firmware/compiled/latest.hex auto detected as Intel Hex
avrdude-original: writing flash (17898 bytes):

Writing | ################################################## | 100% 2.47s

avrdude-original: 17898 bytes of flash written
avrdude-original: verifying flash memory against /home/pi/emonpi/firmware/compiled/latest.hex:
avrdude-original: load data flash data from input file /home/pi/emonpi/firmware/compiled/latest.hex:
avrdude-original: input file /home/pi/emonpi/firmware/compiled/latest.hex auto detected as Intel Hex
avrdude-original: input file /home/pi/emonpi/firmware/compiled/latest.hex contains 17898 bytes
avrdude-original: reading on-chip flash data:

Reading | ################################################## | 100% 1.87s

avrdude-original: verifying ...
avrdude-original: 17898 bytes of flash verified
strace: |autoreset: Broken pipe
strace: |autoreset: Broken pipe
strace: |autoreset: Broken pipe
strace: |autoreset: Broken pipe
strace: |autoreset: Broken pipe

avrdude-original done.  Thank you.

strace: |autoreset: Broken pipe
From https://github.com/emoncms/emoncms
   0ea274f..2e48fd1  master     -> origin/master
 * [new branch]      emonpi-setup-wizard -> origin/emonpi-setup-wizard
   22c0ae9..1044bec  stable     -> origin/stable
 * [new tag]         9.8.1      -> 9.8.1
 * [new tag]         9.8.3      -> 9.8.3
error: Your local changes to the following files would be overwritten by merge:
        Modules/admin/admin_main_view.php
Please, commit your changes or stash them before you can merge.
Aborting
From https://github.com/emoncms/app
   14345bc..6d07ab2  9.0        -> origin/9.0
 * [new branch]      refactor   -> origin/refactor
From https://github.com/emoncms/wifi
   149f909..14fa926  9.0        -> origin/9.0
 * [new branch]      develop    -> origin/develop
From https://github.com/emoncms/dashboard
   0687caa..a06cd2f  master     -> origin/master
update via service-runner
From https://github.com/emoncms/graph
   28e1536..e68cdc7  master     -> origin/master
Already on 'emonpi'
From https://github.com/emoncms/postprocess
   93c7cd7..526a254  emonpi     -> origin/emonpi
   a4a0c89..33f1d21  emoncmsorg -> origin/emoncmsorg
error: The following untracked working tree files would be overwritten by merge:
        mainserver/postprocess/postprocess_menu.php
Please move or remove them before you can merge.
Aborting
mount: / is busy
COMPLETE: /home/pi/emonpi/service-runner-update.sh emonpi >> /home/pi/data/emonpiupdate.log
update via service-runner
update via service-runner
update via service-runner

since then I have noticed another “update via service-runner” gets added about every minute or so. try clicking the “update emonpi” button again and rechecking this log. The “avrdude” stuff and the “strace” errors are produced with every update attempt so they should be there at the very least.

something like this I found from service-runner.log

STARTING: /home/pi/emonpi/service-runner-update.sh rfm69pi >> /home/pi/data/emonpiupdate.log
fatal: unable to access 'https://github.com/openenergymonitor/emonpi/': Failed to connect to github.com port 443: No route to host
fatal: unable to access 'https://github.com/openenergymonitor/RFM2Pi/': Failed to connect to github.com port 443: No route to host
fatal: unable to access 'https://github.com/openenergymonitor/emonhub.git/': Failed to connect to github.com port 443: No route to host
update via service-runner
fatal: unable to access 'https://github.com/openenergymonitor/oem_openHab/': Failed to connect to github.com port 443: No route to host
fatal: unable to access 'https://github.com/emoncms/usefulscripts/': Failed to connect to github.com port 443: No route to host
error: cannot open .git/FETCH_HEAD: Permission denied

wget: missing URL
Usage: wget [OPTION]... [URL]...

Try `wget --help' for more options.
fatal: unable to access 'https://github.com/emoncms/emoncms.git/': Failed to connect to github.com port 443: No route to host
fatal: unable to access 'https://github.com/emoncms/app.git/': Failed to connect to github.com port 443: No route to host
fatal: unable to access 'https://github.com/emoncms/config/': Failed to connect to github.com port 443: No route to host
fatal: unable to access 'https://github.com/emoncms/wifi.git/': Failed to connect to github.com port 443: No route to host
fatal: unable to access 'https://github.com/emoncms/dashboard.git/': Failed to connect to github.com port 443: No route to host
fatal: unable to access 'https://github.com/emoncms/graph/': Failed to connect to github.com port 443: No route to host
Already on 'emonpi'
update via service-runner
fatal: unable to access 'https://github.com/emoncms/postprocess.git/': Failed to connect to github.com port 443: No route to host
fatal: unable to access 'https://github.com/emoncms/backup.git/': Failed to connect to github.com port 443: No route to host
COMPLETE: /home/pi/emonpi/service-runner-update.sh rfm69pi >> /home/pi/data/emonpiupdate.log

I suppose when I trying to update then after that the system boots up and with that restarting the apache server as well ?

This looks like you have a limited internet connection. Are you behind a managed corperate or school firewall ?

I assume you are ssh’ing in to the emonPi so there must be some form of network connection. Can you ping google and github from the commandline? eg

sudo ping google.com

and

sudo ping github.com

yes ping is working - but - now I killed wifi connection ( I have wifi and LAN in same time ) after that I updated again and now the system is up to date - then came the settings.php issues, but loaded from default and It’s works!
BUT this all don’t fix the main problem - “My Input don’t loading” - now it’s grey and “the wheel spins” , but still nothing - I want add new component - but I cant to this very long time ;(

You can’t do that with an emonPi, it does cause problems as there is an unresolved issue, see the 22dec image WiFi issues thread for more info.

Yes as annoying as it is that is “intended operation”.

Oh dear, that too is an unresolved issue that I have no idea about fixing beyond trying to flush redis,

sudo redis-cli flushall

searching the forum for "input page not loading" may give you some other ideas to try.

Thanks ph66 for looking for answers, but all the input not loading ideas is done - refresh page, flush the redis(once it’s helps - some weeks ago) , but now still nothing ;( the input just not loading - and with that problem I can’t add any device as well to monitoring.

not sure how your wifi/LAN was set up. but from the sounds, on the same access point --generally you can not have two networks connected to the same access point from the same device. as spanning protocols come into effect, then either one or both device will be blocked, if no spanning protocol is enabled then it creates a network loop and nothing works or works sporadically as what you described above.

I have lan and wifi enable on my pi, but the wifi is an AP in it own range just for wifi capable IOT devices to connect too and the lan is for routing internet access