Community
OpenEnergyMonitor

Community

Sync Continuously Hitting emoncms.org

Tags: #<Tag:0x00007f6e099e0c68>

I set up a stock standard RPi 3B+ using the emonSD-30Oct18 (Stable) image.

I managed to connect to the EMONCMS server with my account and download the feeds that were there. All good.

I couldn’t see any of the inputs that should have been showing on this local version of emoncms from various ESP8266 sensor and another RPi running an old version of emoncms.

As part of my trouble shooting I noticed that the log file was showing:

2019-02-18 03:38:55.895|ERROR|index.php|Invalid API key ‘xxxxxxxxx’
2019-02-18 03:38:56.033|ERROR|index.php|Invalid API key ‘xxxxxxxxx’
2019-02-18 03:38:56.170|ERROR|index.php|Invalid API key ‘xxxxxxxxx’
2019-02-18 03:38:56.308|ERROR|index.php|Invalid API key ‘xxxxxxxxx’
2019-02-18 03:38:56.446|ERROR|index.php|Invalid API key ‘xxxxxxxxx’
2019-02-18 03:38:56.585|ERROR|index.php|Invalid API key ‘xxxxxxxxx’
2019-02-18 03:38:56.725|ERROR|index.php|Invalid API key ‘xxxxxxxxx’
2019-02-18 03:38:56.862|ERROR|index.php|Invalid API key ‘xxxxxxxxx’
2019-02-18 03:38:57.022|ERROR|index.php|Invalid API key ‘xxxxxxxxx’
2019-02-18 03:38:57.179|ERROR|index.php|Invalid API key ‘xxxxxxxxx’

It didn’t seem to matter what I did with the Sync section. I even redirected the setting to sync with a local EMONCMS, but still my RPi 3B+ appeared to be hitting the emoncms.org server 7 times a second. No additional data was being download/synced.

Actually thinking about it further, I am not sure that it is hitting the emoncms.org, it just appears to be attempting to hit a sync server.

I tried rebooting the but still my RPi 3B+ appeared to be hitting the emoncms.org.

I’ve set up a vanilla EmonSD and I am not seeing these errors.

Are you meaning the local instance here? Or do you mean that there were feeds on emoncms.org that you pulled to the local instance?

Is this the main emoncms log, as in do you see this in the admin log view page?

How do you know those errors are being created by the sync module?

AFAICS, the Sync module does not use the API Key interface. I think this is likely to be a different process hitting the local server.

It would be useful if that error gave a bit more detail. I have added the IP address to the error message, that may help you track it down. Put this on line 109 of 'index.php` (just adds the server address in).

$log->error("Invalid API key '" . $apikey. "' | ".$_SERVER["REMOTE_ADDR"]);

[edit] PR https://github.com/emoncms/emoncms/pull/1206

Yes, that makes sense. I just didn’t want to be hitting emoncms.org for no good reason.

There were feeds on emoncms.org that you pulled to the local instance?

Yes, this is the local admin log view page.

I think something has gone wrong with this install, so I think I will create a new install.

Thanks for your help.

I’ve merged in your pull request @borpin thankyou for the addition

1 Like