Community
OpenEnergyMonitor

Community

Issues with emoncms update

update
database
commit
emoncms
Tags: #<Tag:0x00007f1fe47c70a8> #<Tag:0x00007f1fe47c6db0> #<Tag:0x00007f1fe47c6c48> #<Tag:0x00007f1fe47c6ae0>

(Dan) #1

Maybe this thread can save time finding your local issue with updates.

My emonpi were not able to update from administration panel, with the button “emonPi Update”. Also has not present any update in database , when i check with button “Update & Check” from admin panel. Application seem to be ok, internet access ok, iptables ok… but is not possible update from emoncms, why?

Update log not seems to have errors:

/home/pi/data/emonpiupdate.log

But in logfile:

/var/log/service-runner.log

I can see some messages relative to pending commit changes:

...
error: Your local changes to the following files would be overwritten by merge:
        Lib/email.php
Please, commit your changes or stash them before you can merge.
Aborting
Already on 'emonpi'
error: Your local changes to the following files would be overwritten by merge:
        backup/backup_view.php
        backup/module.json
Please, commit your changes or stash them before you can merge.
Aborting
..
..

Checking Glyn notes in another thread, i can notify some manual tests:

rpi-rw
cd /var/www/emoncms
git status
git log | head
git branch
git pull 
rpi-ro

That give me the clue about the issue:

[email protected](rw):emoncms# git status
On branch stable
Your branch is behind 'origin/stable' by 90 commits, and can be fast-forwarded.
  (use "git pull" to update your local branch)
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        modified:   Lib/email.php
        modified:   scripts/logger/logrotate.conf

Untracked files:
  (use "git add <file>..." to include in what will be committed)

        Lib/email.php_20170715
        Theme/basic/dashboard/
        Theme/basic/emon.css
        Theme/basic/emoncms_logo.png
        backup.settings.php
        settings.php_20170615
        settings.php_20171112
        settings.php_20180106

no changes added to commit (use "git add" and/or "git commit -a")

After exclude both files:

[email protected](rw):emoncms# git checkout -- Lib/email.php
[email protected](rw):emoncms# git checkout -- scripts/logger/logrotate.conf

Status return now does not notify changes for these files:

[email protected](rw):emoncms# git status
On branch stable
Your branch is behind ‘origin/stable’ by 127 commits, and can be fast-forwarded.
(use “git pull” to update your local branch)
Untracked files:
(use “git add …” to include in what will be committed)

    Lib/email.php_20170715
    Theme/basic/dashboard/
    Theme/basic/emon.css
    Theme/basic/emoncms_logo.png
    backup.settings.php
    settings.php_20170615
    settings.php_20171112
    settings.php_20180106

nothing added to commit but untracked files present (use “git add” to track)

[email protected](rw):emoncms# git add .
[email protected](rw):emoncms# git status
On branch stable
Your branch is behind 'origin/stable' by 127 commits, and can be fast-forwarded.
  (use "git pull" to update your local branch)
Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

        new file:   Lib/email.php_20170715
        new file:   Theme/basic/dashboard/02-html-clean.png
        new file:   Theme/basic/emon.css
        new file:   Theme/basic/emoncms_logo.png
        new file:   backup.settings.php
        new file:   settings.php_20170615
        new file:   settings.php_20171112
        new file:   settings.php_20180106


[email protected](rw):emoncms# git branch
  dev-mosquitto-php
  master
* stable
  symlinked_modules
[email protected](rw):emoncms# git pull
Updating a21a27e..86adaec
Fast-forward
 Lib/dbschemasetup.php                                        |    5 +-
 Lib/email.php                                                |    4 +-
 Lib/tablejs/custom-table-fields.js                           |   45 ++-
 Modules/admin/admin_main_view.php                            |   96 +++--
 Modules/feed/engine/MysqlTimeSeries.php                      |    7 +-
 Modules/feed/feed_controller.php                             |   12 +-
 Modules/feed/feed_model.php                                  |  244 ++++++++++---
 Modules/feed/feed_schema.php                                 |    6 +-
 Modules/input/Views/input.js                                 |    2 +-
 Modules/input/Views/input_api.php                            |    4 +-
 Modules/input/input_controller.php                           |    2 +-
 Modules/input/input_methods.php                              |    6 +-
 Modules/input/input_model.php                                |  263 +++++++++++---
 Modules/input/input_schema.php                               |    2 +-
 Modules/input/locale/fr_FR/LC_MESSAGES/messages.mo           |  Bin 9809 -> 11421 bytes
 Modules/input/locale/fr_FR/LC_MESSAGES/messages.po           | 1130 +++++++++++++++++++++++++++++++--------------------------
 Modules/process/process_model.php                            |    4 +
 Modules/process/process_processlist.php                      |    8 +-
 Modules/schedule/Views/schedule_view.php                     |    5 +-

After that, from administration panel with the button “emonPi Update” and button “Update & Check” emoncms has been updated successfully from 9.8.10 to last present version 9.8.28.

I have not clear if the procedure is the best one, but at least for me has worked fine.


(Brian Orpin) #2

I’ve seen the same issue recently on updates to a self installed system that, as far as I know had not had any updates to files. I had exactly the same issue with my most recent update as well. There is something odd going on.
[edit]
Another example of update issues with git. emonPi update Emoncms V9.8.28


(Dan) #3

Yeap, me too. Upgrade to V9.8.28 does not work for me with GUI Administration panel. I have to applied this method again…:roll_eyes:


(Brian Orpin) #4

Can I suggest this should either be to 9.9.8 or from 9.8.28 (if that ever existed :smile:)

Can you post the complete update log please?

Is the issue that the button was not working? There was a change in place for a short while for EmonPis that did break the update process. The issue will be that service-runner will not start.


(Geoffrey) #5

I have problems any help available I am on 9.8.30 but my sd card seems stuck at emonSD-26Oct17 It will not update from the admin page. What should I do?

Thanks for any replies.


(Brian Orpin) #6

Are you able to SSH into the EmonPi?

Is the backup module available on that version?


(Geoffrey) #7

I have just checked I can SSH. How /where do I look for backup module?
Thanks


(Brian Orpin) #8

Under setup menu (where you find administration). Not sure if it was part of that build or not.


(Geoffrey) #9

Thanks for the help. I have decided to write the latest sd image to a new card and go from there.