I used the Proxmox Helper Scripts for mine.
Ha, I do too.
I just did a fresh install of 22.04 LXC, just did updates and then used EmonScripts to install.
When going to the Admin/Update GUI page, the Update Log said that /var/log/emoncms/update.log was missing - so I created that with touch, and set the permissions to match a couple of the other logs in there.
➜ emoncms ls -al
total 19
drwxr-xr-x 2 pi root 5 Nov 6 18:27 .
drwxr-xr-x 12 root syslog 25 Nov 6 18:25 ..
-rw-r--r-- 1 root root 2047 Nov 6 18:27 apache2-error.log
-rw-rw-rw- 1 root root 1683 Nov 6 18:31 emoncms.log
-rw-rw-rw- 1 root root 0 Nov 6 18:27 update.log
Anyway, interestingly Full Update, and Update Emoncms don’t seem to do anything on this clean install from the GUI …
Are all the services running?
I went back to my install post and noticed I created a user ‘pi’. I think there are some things lurking around that still have this as the hardcoded user
Yeah I learnt the pi mistake first time round when I couldn’t quite make everything work without it. This time aside from root, pi is the only user I created.
I also did a
sudo echo $USER' ALL=(ALL) NOPASSWD: ALL' | sudo tee /etc/sudoers.d/$USER && sudo chmod 0440 /etc/sudoers.d/$USER
per the instructions on here.
I modified config.ini correctly I think and the install seemed to complete ok. I updated everything available with apt.
Services are running … (I need emonhub, but that can come later as I was just testing the update mechanism).
Including redis and service-runner
Command line update seemed to run fine
/opt/openenergymonitor/EmonScripts/update/service-runner-update.sh all
I feel like I’m missing something really obvious
Thanks again for all your help and suggestions!
I note I’m having the same issue too… But using an emonpi!
Ditto.
I wonder if the @
error suppression is hiding something…
[Thu Nov 07 19:13:02.390891 2024] [php:error] [pid 832:tid 832] [client 10.13.37.49:51949] PHP Fatal error: Uncaught Error: Call to private method Admin::runService() from global scope in /var/www/emoncms/Modules/admin/admin_controller.php:221
Stack trace:
#0 /var/www/emoncms/core.php(80): admin_controller()
#1 /var/www/emoncms/index.php(257): controller()
#2 {main}
thrown in /var/www/emoncms/Modules/admin/admin_controller.php on line 221, referer: http://10.13.37.11/admin/update
[Thu Nov 07 19:37:59.514183 2024] [php:error] [pid 1208:tid 1208] [client 10.13.37.49:56537] PHP Fatal error: Uncaught Error: Call to private method Admin::runService() from global scope in /var/www/emoncms/Modules/admin/admin_controller.php:221
Stack trace:
#0 /var/www/emoncms/core.php(80): admin_controller()
#1 /var/www/emoncms/index.php(257): controller()
#2 {main}
thrown in /var/www/emoncms/Modules/admin/admin_controller.php on line 221, referer: http://10.13.37.11/admin/update
@TrystanLea you made the function private, but it’s still seemingly called from elsewhere…
Release 11.6.8 · emoncms/emoncms · GitHub is dated October 25
The prior linked commit is from October 8…
So if you were using master (or similar, rather than releases), that would’ve explained it as you would have had the commit.
EDIT: PR to revert making that private in admin_model.php: Make runService public again by reedy · Pull Request #1904 · emoncms/emoncms · GitHub
Would need a release making, and a manual update on affected devices to bring it in.
Just a note in this thread to add my +1 for this fix ; the same issue breaks both updating front end firmware and running serial config.
Just needs the version bumping and a release tagging…
This is great, back up and running!
Thanks you to everyone for your help.
I’ve got some errors in the logs from when using the GUI that I don’t get when running via CLI.
Appreciate that I should really start a new thread with this, but I was wondering if it might be a quick fix?
I’m getting a lot of git permission denied errors e.g.
error: cannot open .git/FETCH_HEAD: Permission denied
fatal: Unable to create '/var/www/emoncms/Modules/app/.git/index.lock': Permission denied
fatal: Unable to create '/var/www/emoncms/Modules/config/.git/index.lock': Permission denied
fatal: Unable to create '/var/www/emoncms/Modules/dashboard/.git/index.lock': Permission denied
etc etc
Would someone please do me a favour and let me know what permissions all the .git folders and contents should have? Example below.
drwxrwxr-x 8 pi pi 4096 Nov 8 21:02 .git
➜ .git git:(stable) ls -al
total 72
drwxrwxr-x 8 pi pi 4096 Nov 8 21:02 .
drwxrwxr-x 8 pi pi 4096 Oct 12 20:22 ..
-rw-rw-rw- 1 pi pi 1698 Nov 8 21:38 FETCH_HEAD
-rw-rw-r-- 1 pi pi 23 Nov 8 21:02 HEAD
-rw-rw-r-- 1 pi pi 41 Oct 12 20:24 ORIG_HEAD
drwxrwxr-x 2 pi pi 4096 May 18 20:51 branches
-rw-rw-r-- 1 pi pi 259 May 18 20:51 config
-rw-rw-r-- 1 pi pi 73 May 18 20:51 description
drwxrwxr-x 2 pi pi 4096 May 18 20:51 hooks
-rw-rw-r-- 1 pi pi 11118 Nov 8 21:02 index
drwxrwxr-x 2 pi pi 4096 May 18 20:51 info
drwxrwxr-x 3 pi pi 4096 May 18 20:51 logs
drwxrwxr-x 51 pi pi 4096 Nov 8 21:02 objects
-rw-rw-r-- 1 pi pi 4994 May 18 20:51 packed-refs
drwxrwxr-x 5 pi pi 4096 May 18 20:51 refs
Thank you!
pi@emonpi:~ $ ls -al /var/www/emoncms/Modules/app/.git
total 72
drwxr-xr-x 8 pi pi 4096 Nov 7 19:09 .
drwxr-xr-x 8 pi pi 4096 Oct 1 04:01 ..
drwxr-xr-x 2 pi pi 4096 Feb 1 2024 branches
-rw-r--r-- 1 pi pi 259 Feb 1 2024 config
-rw-r--r-- 1 pi pi 73 Feb 1 2024 description
-rw-r--r-- 1 pi pi 1698 Nov 7 19:09 FETCH_HEAD
-rw-r--r-- 1 pi pi 23 Nov 7 19:09 HEAD
drwxr-xr-x 2 pi pi 4096 Feb 1 2024 hooks
-rw-r--r-- 1 pi pi 11118 Nov 7 19:09 index
drwxr-xr-x 2 pi pi 4096 Feb 1 2024 info
drwxr-xr-x 3 pi pi 4096 Feb 1 2024 logs
drwxr-xr-x 119 pi pi 4096 Nov 7 19:09 objects
-rw-r--r-- 1 pi pi 41 Oct 10 17:49 ORIG_HEAD
-rw-r--r-- 1 pi pi 4598 Sep 20 18:13 packed-refs
drwxr-xr-x 5 pi pi 4096 Feb 1 2024 refs
pi@emonpi:~ $ ls -al /var/www/emoncms/Modules/config/.git/
total 60
drwxr-xr-x 8 pi pi 4096 Nov 7 19:09 .
drwxr-xr-x 4 pi pi 4096 Feb 1 2024 ..
drwxr-xr-x 2 pi pi 4096 Feb 1 2024 branches
-rw-r--r-- 1 pi pi 262 Feb 1 2024 config
-rw-r--r-- 1 pi pi 73 Feb 1 2024 description
-rw-r--r-- 1 pi pi 313 Nov 7 19:09 FETCH_HEAD
-rw-r--r-- 1 pi pi 23 Nov 7 19:09 HEAD
drwxr-xr-x 2 pi pi 4096 Feb 1 2024 hooks
-rw-r--r-- 1 pi pi 960 Nov 7 19:09 index
drwxr-xr-x 2 pi pi 4096 Feb 1 2024 info
drwxr-xr-x 3 pi pi 4096 Feb 1 2024 logs
drwxr-xr-x 8 pi pi 4096 Nov 7 19:09 objects
-rw-r--r-- 1 pi pi 41 Jun 16 01:47 ORIG_HEAD
-rw-r--r-- 1 pi pi 1329 Feb 1 2024 packed-refs
drwxr-xr-x 5 pi pi 4096 Feb 1 2024 refs
pi@emonpi:~ $ ls -al /var/www/emoncms/Modules/dashboard/.git
total 72
drwxr-xr-x 8 pi pi 4096 Nov 7 19:09 .
drwxr-xr-x 7 pi pi 4096 Nov 7 19:09 ..
drwxr-xr-x 2 pi pi 4096 Feb 1 2024 branches
-rw-r--r-- 1 pi pi 265 Feb 1 2024 config
-rw-r--r-- 1 pi pi 73 Feb 1 2024 description
-rw-r--r-- 1 pi pi 343 Nov 7 19:09 FETCH_HEAD
-rw-r--r-- 1 pi pi 23 Nov 7 19:09 HEAD
drwxr-xr-x 2 pi pi 4096 Feb 1 2024 hooks
-rw-r--r-- 1 pi pi 12642 Nov 7 19:09 index
drwxr-xr-x 2 pi pi 4096 Feb 1 2024 info
drwxr-xr-x 3 pi pi 4096 Feb 1 2024 logs
drwxr-xr-x 42 pi pi 4096 Nov 7 19:09 objects
-rw-r--r-- 1 pi pi 41 Jul 19 22:43 ORIG_HEAD
-rw-r--r-- 1 pi pi 2359 Feb 1 2024 packed-refs
drwxr-xr-x 5 pi pi 4096 Feb 1 2024 refs
I’m guessing apache2
should run as www-data
…
Does it do a sudo
type command somewhere when running the update scripts to run it as pi
?
Thanks Sam, no idea lol.
My updates now run from the GUI, so I’ll open a separate thread with respect to the Permission Denied errors.
Thanks again everyone - much appreciated!
I have just updated a 22.04 system (via the CLI) and now it doesn’t react to the CLI update button.
I removed the solved
I’m not seeing anything in the Apache log (ever)!
[edit]
@TrystanLea - seems this wasn’t merged before creating 11.6.8.
root@emoncms:/var/www/emoncms# git status -v
On branch stable
Your branch is up to date with 'origin/stable'.
nothing to commit, working tree clean
root@emoncms:/var/www/emoncms# git log
commit 982d3ca6ddbf336998465cf338822acb71bc6d29 (HEAD -> stable, tag: 11.6.8, origin/stable)
Author: Trystan Lea <[email protected]>
Date: Fri Oct 25 17:34:44 2024 +0100
fix missing apikey rawdata and realtime graphs
commit 0cbcea975d381ed9bb45f4970f6a3d7966444530 (tag: 11.6.7)
Author: Trystan Lea <[email protected]>
Date: Tue Oct 8 19:52:15 2024 +0100
update version
commit 8f49021cacfb3d3c6c81ebf8f90a1558ee268788
Author: Trystan Lea <[email protected]>
Date: Tue Oct 8 19:50:59 2024 +0100
fix
HOWEVER anyone who has updated can never update again without SSHing into their system
I suggest it needs some clear instructions on how to run the update from the CLI!
Release 11.6.8 · emoncms/emoncms · GitHub was tagged on October 25, 2024.
2 commits to master since this release
This fix isn’t in there.
On Releases · emoncms/emoncms · GitHub it’s just a more public “release” rather than “just” a git tag.
I’ve updated stable to match master. That was the issue right?
If most people are tracking stable, yeah, that should do it…
Just some people will need to manually cli update if they already got the broken version
And created a new release?