I run a stand-alone emoncms on my home server and am having all sorts of problems after upgrading to 9.9.6 this morning. I followed the normal upgrade procedure:
pull all of the modules and base code from git
switch to the 9.9.6 branch in the base directory
run the database upgrader
restart php-fpm to ensure I don’t have any cached code
However, while my dashboards load and data is still collected, there are multiple problems.
Dashboards have lost some of their widgets, I think this is related to the next issue
My feeds are all fubared, the feeds page won’t even load and the inputs show wait… on all of the entries in the process lists. When I try and edit an input any feed log or Power to KWh entries look like Feedid "+feedid+" does not exists or was deleted
The MySolar app wants to reinitialize everything probably because of the feed issue
Any idea what might have happened during the update? If I revert back to the 9.8.6 branch MySolar loads and it is getting data, but all of the inputs show “Unsupported” and none of the other dashboards work (likely because the dashboard module updates aren’t compatible with 9.8.6). I haven’t tried restoring the database yet, I figure that is a last resort as I don’t want to risk losing any data that has been collected in the past 30 mins.
One additional piece of data – I see that the feeds have NULL in several of the columns in the database. Is this normal after the upgrade?
mysql> select * from feeds;
+-----+----------------------------------+--------+--------+------------+------------------+----------+--------+------+--------+-------------+--------+------+
| id | name | userid | tag | time | value | datatype | public | size | engine | processList | server | unit |
+-----+----------------------------------+--------+--------+------------+------------------+----------+--------+------+--------+-------------+--------+------+
| 1 | Main A Power | 1 | Node 1 | 1486345200 | 628.36 | 1 | 0 | NULL | 6 | NULL | 0 | |
| 2 | Main B Power | 1 | Node 1 | 1486345200 | 806.45 | 1 | 0 | NULL | 6 | NULL | 0 | |
and I see that server and unit are new columns. Should they have been populated with something other than 0 and an empty value?
That’s quite a step back, there are a lot of changes in the last 9.9.5 to 9.9.6 merges, does 9.9.5 work?
What version were you running beforehand? I assume <9.8.6, if it was <9.8 (or there abouts) the dash module was changed and moved out of the main repo, since then it needs installing separately as per the app module and graph module etc,
I assume you tried the usual culprits and updated the database and cleared the browser cache?
I was running 9.8.6 before the upgrade. The database update went fine with no errors and I’ve even tried running in an incognito window to make sure I have nothing cached on the browser side. I’ve checked a couple of different branches, the 9.9.0 tag is the last time the feeds work – 9.9.3 and on show the same issue that I’m having with 9.9.6.
The real issue seems to be the feeds. I have a hunch that if I can figure out what is causing that I will solve the dashboard and MySolar app issues.
Ok, that is useful – it throws a couple of errors.
<b>Warning</b>: fopen(/var/lib/phptimeseries/feed_90.MYD): failed to open stream: No such file or directory
<br/>
<b>Warning</b>: filesize(): stat failed for /var/lib/phptimeseries/feed_90.MYD in <b>/srv/www/htdocs-www/emoncms/Modules/feed/engine/PHPTimeSeries.php</b> on line <b>71</b><br />
which is interesting, as I don’t even have a /var/lib/phptimeseries directory! I just have /var/lib/phpfina/ and /var/lib/phpfiwa/. Any idea when that was added? I just created it, but emoncms isn’t adding any data files to it. Is there a way to populate it from phpfina and phpfiwa?
Glad that found something. Could you repeat your mysql command above but search for phptimeseries feeds:
select * from feeds where engine=2;
Perhaps there’s a feed that did not delete correctly… if its not there then it may be that the redis cache is out of sync with your mysql data, you could clear redis (assuming your not using redis for other applications) with:
mysql> select * from feeds where engine=2;
+----+-----------------+--------+--------+------------+-----------------+----------+--------+------+--------+-------------+--------+------+
| id | name | userid | tag | time | value | datatype | public | size | engine | processList | server | unit |
+----+-----------------+--------+--------+------------+-----------------+----------+--------+------+--------+-------------+--------+------+
| 90 | Main Power kWhd | 1 | Node 1 | 1469832794 | 6.7553338555542 | 2 | 0 | NULL | 2 | NULL | 0 | |
+----+-----------------+--------+--------+------------+-----------------+----------+--------+------+--------+-------------+--------+------+
1 row in set (0.01 sec)
And I just fixed the problem – although I still don’t know what caused it…
touch /var/lib/phptimeseries/feed_90.MYD
That lets the json feed return clean json with no HTML embedded in it, which fixes both my feeds and my dashboards! More importantly, the MySolar app now returns a dashboard (which is more than a bit depressing since it’s raining today and I’m not producing any power. )
It sort-of works – it’s there, just a whole lot wider than the display… My guess it’s the entry with /var/lib/lxd/images/f70ceacb0c15661d8603d041c5c5e94a5de63fbac54803963be700cbed6f721e.zfs throwing off the column width.
That cut-n-paste was from 9.9.6. I just switched to stable:
> git co stable
Previous HEAD position was acbfca0... Update version.txt
Branch stable set up to track remote branch stable from origin.
Switched to a new branch 'stable'
> git status
On branch stable
Your branch is up-to-date with 'origin/stable'.
nothing to commit, working directory clean
I did a full shift-reload of the page before posting the new server info. And on my end I’m using Chrome since my safari beachballs more than it works these days (too many JIRA, Service Now and Splunk tabs open).
The point of me asking for the info was that the services mqtt_input & service-runner (as well as feedwriter but I doubt you use that) have changed and if you use them you might be interested as you did a manual upgrade.
I’m not using mqtt with emoncms, although I do use it with a couple other automation services (hassio for example). I don’t believe I’m using feedwriter either.
What I really need to do is move this over to a raspberry pi so i can just use the provided image instead of doing this all manually…
BTW, the example you gave is how it looks to me in chrome. The only issue is that the table is incredibly wide due to some unwrappable items in the first column.