Hi,
I have been using emoncms v8.0.3 on my own server for several months now. Its been a relatively smooth system for me until about a couple week ago when I began getting the following series error messages below (logged in /var/log/apache2/error.log) multiplied out by about 20 every second. I have gone through a lot of pain to deduce the problem to these errors but I am stumped. And I only discovered this was a problem when my storage space ran out due to enormous error log files (~20GB!). So I have to periodically delete the log files...but even still, I cannot view any graphs of these feeds.
When checking my /var/lib/phpfiwa/ folder all the .meta and .dat files appear with normal-looking file sizes. However, in emonCMS on the feeds page, about 195 of 200 feeds I have show a size of 0kb, which I know is wrong. Not sure what may have triggered this problem as its been working like a charm and nothing I know of would have caused this problem.
Thanks for any help.
Kevin
[Tue Nov 04 01:54:36 2014] [error] [client 174.116.187.224] PHP Notice: Undefined offset: 0 in /var/www/emoncms/Modules/feed/engine/PHPFiwa.php on line 104
[Tue Nov 04 01:54:36 2014] [error] [client 174.116.187.224] PHP Warning: Division by zero in /var/www/emoncms/Modules/feed/engine/PHPFiwa.php on line 104
[Tue Nov 04 01:54:36 2014] [error] [client 174.116.187.224] PHP Notice: Undefined offset: 0 in /var/www/emoncms/Modules/feed/engine/PHPFiwa.php on line 104
[Tue Nov 04 01:54:36 2014] [error] [client 174.116.187.224] PHP Notice: Undefined offset: 0 in /var/www/emoncms/Modules/feed/engine/PHPFiwa.php on line 107
[Tue Nov 04 01:54:36 2014] [error] [client 174.116.187.224] PHP Notice: Undefined offset: 0 in /var/www/emoncms/Modules/feed/engine/PHPFiwa.php on line 116
[Tue Nov 04 01:54:36 2014] [error] [client 174.116.187.224] PHP Warning: Division by zero in /var/www/emoncms/Modules/feed/engine/PHPFiwa.php on line 116
[Tue Nov 04 01:54:36 2014] [error] [client 174.116.187.224] PHP Notice: Undefined offset: 0 in /var/www/emoncms/Modules/feed/engine/PHPFiwa.php on line 118
[Tue Nov 04 01:54:36 2014] [error] [client 174.116.187.224] PHP Notice: Undefined offset: 0 in /var/www/emoncms/Modules/feed/engine/PHPFiwa.php on line 137
[Tue Nov 04 01:54:36 2014] [error] [client 174.116.187.224] PHP Notice: Undefined offset: 0 in /var/www/emoncms/Modules/feed/engine/PHPFiwa.php on line 145
FOR REFERENCE:
/var/www/emoncms/Modules/feed/engine/PHPFiwa.php:
Line 104: $timestamp = floor($timestamp / $meta->interval[$layer]) * $meta->interval[$layer];
Re: emonCMS not recognizing PHPFIWA feed meta data
Just a quick update to further pinpoint the problem. When running the getmeta API call below, it appears the meta data is missing.
Running: ../emoncms/feed/getmeta.json?id=276 (no need for my Apikey since I'm logged in)
Returns: {"id":0,"start_time":0,"nlayers":0,"npoints":[],"interval":[]}
Anyone know why this is occurring? Or how I can recover the true meta data from my .dat or .meta files?
Any help is much appreciated!
Kevin
Re: emonCMS not recognizing PHPFIWA feed meta data
Another update if anyone is listening. Help wanted!
When I run the integritytest.php script (discussed here: http://openenergymonitor.org/emon/node/5213), all my feeds (which were working file up until Oct 20, 2014) return meta errors: Here's a snippet of what it returns for my phpfiwa and phpfina feeds:
CHECKING INTEGRITY OF phpfiwa META DATA:
Feed 166 [nlayers out of range: 0] [08:11:2014 0:02]
Feed 167 [nlayers out of range: 0] [08:11:2014 0:02]
Feed 168 [nlayers out of range: 0] [08:11:2014 0:02]
Feed 172 [nlayers out of range: 0] [08:11:2014 7:35]
Feed 173 [nlayers out of range: 0] [08:11:2014 7:35]
Feed 174 [nlayers out of range: 0] [08:11:2014 1:01]
Feed 176 [nlayers out of range: 0] [08:11:2014 1:01]
Feed 177 [nlayers out of range: 0] [08:11:2014 7:35]
Feed 178 [nlayers out of range: 0] [08:11:2014 0:02]
Feed 179 [nlayers out of range: 0] [08:11:2014 7:35]
Feed 180 [nlayers out of range: 0] [08:11:2014 7:35]
PHP Warning: unpack(): Type I: not enough input, need 4, have 0 in /var/usefuls cripts/integritycheck/lib/phpfiwa.php on line 49
PHP Warning: unpack(): Type I: not enough input, need 4, have 0 in /var/usefuls cripts/integritycheck/lib/phpfiwa.php on line 51
Feed 181 [nlayers out of range: ] [22:10:2014 0:01]
PHP Warning: unpack(): Type I: not enough input, need 4, have 0 in /var/usefuls cripts/integritycheck/lib/phpfiwa.php on line 49
PHP Warning: unpack(): Type I: not enough input, need 4, have 0 in /var/usefuls cripts/integritycheck/lib/phpfiwa.php on line 51
Feed 182 [nlayers out of range: ] [22:10:2014 20:34]
...
CHECKING INTEGRITY OF phpfina META DATA:
Feed 22 [interval: 0][start==0] [25:10:2014 11:05]
Feed 255 [interval: 0][start==0] [25:10:2014 11:05]
Feed 267 [interval: 0][start==0] [26:10:2014 0:01]
Feed 269 [interval: 0][start==0] [25:10:2014 11:05]
Feed 271 [interval: 0][start==0] [25:10:2014 11:05]
Feed 273 [interval: 0][start==0] [26:10:2014 0:00]
Feed 277 [interval: 0][start==0] [25:10:2014 11:05]
Feed 279 [interval: 0][start==0] [25:10:2014 11:05]
Feed 28 [interval: 0][start==0] [25:10:2014 11:05]
Feed 281 [interval: 0][start==0] [25:10:2014 11:05]
Feed 283 [interval: 0][start==0] [26:10:2014 0:01]
Feed 285 [interval: 0][start==0] [26:10:2014 0:01]
Feed 287 [interval: 0][start==0] [25:10:2014 11:05]
Feed 291 [interval: 0][start==0] [26:10:2014 0:01]
Feed 293 [interval: 0][start==0] [25:10:2014 11:05]
Feed 295 [interval: 0][start==0] [26:10:2014 0:01]
Feed 297 [interval: 0][start==0] [26:10:2014 0:01]
Feed 299 [interval: 0][start==0] [25:10:2014 11:05]
Feed 301 [interval: 0][start==0] [25:10:2014 11:05]
PHP Warning: unpack(): Type I: not enough input, need 4, have 0 in /var/usefuls cripts/integritycheck/lib/phpfina.php on line 49
PHP Warning: unpack(): Type I: not enough input, need 4, have 0 in /var/usefuls cripts/integritycheck/lib/phpfina.php on line 51
Feed 303 [interval: ][start==0] [22:10:2014 20:34]
...
I hope I can recover the data I've collected...about 2 months worth.
Kevin