I tried to upgrade an install I had of emoncms installed locally, in particular I wanted to use emonhub. I went to the admin page and tried from there with no luck. I then looked at the pages on github.
I initially had an issue because I wanted emoncms in a different www directory but in part of the script it is hardcoded, so initially there were no web pages installed. I am now at a stranger point. I have the web up and I am receiving inputs from emonhub after some trial and error.
However the issue I now have is that when I click on feeds, I just get the spinning (sun?) icon. The previous inputs I have defined are still visible, and there were several feeds before. Iām guessing the system is failing because of those? There is nothing written to the log files for this. The last thing in the log file is for mosquitto because it was not installed.
Iāve been able to track down and resolve or work through several issues but this has me beat for now.
I notice that on my input, I tried to create a feed, and it shows this:
Still have nothing loading when I hit the feed button.
Is there a setting I can change for more debug information? Iām guessing there is a database schema discrepancy. Not sure if it can be resolved or if I will have to clean the existing feeds and data?
OS
Linux 4.19.97-v7+
Running on raspbian lite buster
So, on this version it does show the feeds, including the new Vrms that I created. However, both versions show:
Services
emonhub Active Running
feedwriter Inactive DeadService is not running loadingā¦
service-runner Active Running
redis-server Active Running
mosquitto Active Running
demandshaper Activating Auto-restart
I have a pi that is running apache, munin, traccar. I added emoncms with the intention of feeding data from my solar - I see that I have files and directories dating back to 2018. Iām sure at that point I followed the instructions I could find to install the application.
When I tried to update the app from the admin page, if I hit the button the page reloaded without anything obvious happening, including nothing showing in log files.
Yes, I ran the install scripts from github - I now realize there is also an update script that may have been a better choice.
ā emonhub.service - emonHub service description
Loaded: loaded (/opt/openenergymonitor/emonhub/service/emonhub.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2020-06-17 10:16:25 EDT; 5h 33min ago
Process: 12198 ExecStartPre=/bin/mkdir -p /var/log/emonhub/ (code=exited, status=0/SUCCESS)
Process: 12199 ExecStartPre=/bin/chgrp -R emonhub /var/log/emonhub/ (code=exited, status=0/SUCCESS)
Process: 12200 ExecStartPre=/bin/chmod 775 /var/log/emonhub/ (code=exited, status=0/SUCCESS)
Main PID: 12201 (python3)
Tasks: 3 (limit: 2179)
Memory: 14.5M
CGroup: /system.slice/emonhub.service
āā12201 python3 /usr/local/bin/emonhub/emonhub.py --config-file=/etc/emonhub/emonhub.conf --logfile=/var
Jun 17 10:16:25 munitrac systemd[1]: Starting emonHub service description...
Jun 17 10:16:25 munitrac systemd[1]: Started emonHub service description.
ā feedwriter.service - Emoncms feedwriter script
Loaded: loaded (/var/www/html/emoncms/scripts/services/feedwriter/feedwriter.service; enabled; vendor preset: en
Active: inactive (dead) since Tue 2020-06-16 21:35:23 EDT; 18h ago
Docs: https://github.com/emoncms/emoncms/blob/master/scripts/services/install-service-feedwriter.md
Main PID: 4911 (code=exited, status=0/SUCCESS)
Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
This helped, and now gives:
sudo systemctl enable feedwriter.service
root@munitrac:~# systemctl restart feedwriter.service
root@munitrac:~# systemctl status feedwriter.service
ā feedwriter.service - Emoncms feedwriter script
Loaded: loaded (/var/www/html/emoncms/scripts/services/feedwriter/feedwriter.service; enabled; vendor preset: en
Active: activating (auto-restart) (Result: exit-code) since Wed 2020-06-17 15:53:05 EDT; 5s ago
Docs: emoncms/install-service-feedwriter.md at master Ā· emoncms/emoncms Ā· GitHub
Process: 10813 ExecStartPre=/bin/mkdir -p ${LOG_PATH} (code=exited, status=0/SUCCESS)
Process: 10814 ExecStartPre=/bin/chown ${USER} ${LOG_PATH} (code=exited, status=0/SUCCESS)
Process: 10815 ExecStartPre=/bin/touch ${LOG_PATH}/emoncms.log (code=exited, status=0/SUCCESS)
Process: 10816 ExecStartPre=/bin/chmod 666 ${LOG_PATH}/emoncms.log (code=exited, status=0/SUCCESS)
Process: 10817 ExecStart=/usr/bin/php /var/www/emoncms/scripts/feedwriter.php (code=exited, status=1/FAILURE)
Main PID: 10817 (code=exited, status=1/FAILURE)
Jun 17 15:53:05 munitrac systemd[1]: feedwriter.service: Main process exited, code=exited, status=1/FAILURE
Jun 17 15:53:05 munitrac systemd[1]: feedwriter.service: Failed with result 'exit-code'.
I see here, that even having set the environment for emoncs_www, the feed service is still looking at the default location. Iāve changed the feedwriter.service file and the service starts and the admin page shows it green.
Demandshaper is still red and says activating. This really doesnāt apply to me so Iām not too concerned and would be ok removing it.
Unfortunately, feeds still hangs when I select the page.
I guess in hindsight I could / should have just used the default /var/www/emoncms and then changed my apache configuration to map that to http://server/emoncms
Iām still not making any headway on resolving the feeds page or information unfortunately.
Ok, I was getting ready to do a fresh install. As part of that I went to backup the existing installation.
I had previously seen in the error logs reference to not finding phpfina files and I had seen that the old installation I had was using /var/lib/phpfina but the new code was looking in /var/opt/emoncms/phpfina
Looking at the backup module and running a backup I realised that there was also a phptimeseries directory. Copying files to the new location, the new version is up and running!