Community
OpenEnergyMonitor

Community

Can't connect to local emoncms


(Sam) #1

Just moved to the latest emonSD image and everything was working fine. Did expand, updates, restored backup, feeds working, all seemed ok. Added emoncms.org read/write API. Rebooted and tried to access local emonCMS (192.168.1.8/emoncms) in browser and got this error:

Can't connect to database, please verify credentials/configuration in settings.php
Error message:  **Connection refused**

Not sure what credentials have changed? Can anyone point me to a fix?

Cheers.


Keeping an EmonSD installation up to date
(Bill Thomson) #2

Sounds like the emonCMS username and / or password in the settings.php file may have been overwritten.

Full path, if memory serves, is /var/www/html/emoncms/settings.php


(Sam) #3

Yes, I was poking around in there last night but couldn’t figure out where/how to manually update. Some reading mentioned scrambled passwords, etc.

In my tired state last night the smart me thought, “that’s ok, I will factory reset using emonPi command line” and everything will be fixed. Same issue with access and now no longer on wifi as I am still locked out - hoping I can use LCD to enable SSH when I get back to working on it later today.

Failing that, I’ll start again.


(Sam) #4

Started again, all good - expect now emoncms won’t log remotely. Getting the following in the log:

2018-12-17 16:54:40,912 INFO     emoncmsorg sending: https://emoncms.org/input/bulk.json?apikey=E-M-O-N-C-M-S-A-P-I-K-E-Y&data=[[1545025989.906381,5,-593.85,1125.1999999999998,415,227.74,0,0,0,0,0,0,0],[1545025994.919577,5,-823.9000000000001,1385.04,424,228.38,0,0,0,0,0,0,0],[1545026007.314981,5,-885.96,1388.52,369,229.6,0,0,0,0,0,0,0],[1545026012.317648,5,-870.98,1375.76,372,228.56,0,0,0,0,0,0,0],[1545026017.35508,5,-864.5600000000001,1373.4399999999998,376,228.87,0,0,0,0,0,0,0],[1545026022.314832,5,-851.72,1361.84,378,229.24,0,0,0,0,0,0,0],[1545026027.30557,5,-884.8900000000001,1358.36,344,228.18,0,0,0,0,0,0,0],[1545026032.330206,5,-844.23,1293.3999999999999,326,228.65,0,0,0,0,0,0,0],[1545026037.335377,5,-876.33,1352.56,347,229.52,0,0,0,0,0,0,0],[1545026042.354042,5,-725.46,1358.36,493,228.75,0,0,0,0,0,0,0],[1545026047.309328,5,-705.13,1354.8799999999999,509,228.31,0,0,0,0,0,0,0],[1545026052.322569,5,-734.0200000000001,1387.36,510,228.65,0,0,0,0,0,0,0],[1545026057.347394,5,-677.3100000000001,1329.36,513,228.56,0,0,0,0,0,0,0],[1545026062.358653,5,-698.71,1329.36,493,227.86,0,0,0,0,0,0,0],[1545026067.328263,5,-704.0600000000001,1350.24,506,229,0,0,0,0,0,0,0],[1545026072.351217,5,-707.2700000000001,1347.9199999999998,501,228.55,0,0,0,0,0,0,0],[1545026077.272134,5,-698.71,1342.12,504,227.65,0,0,0,0,0,0,0]]&sentat=1545026080
2018-12-17 16:54:41,239 WARNING  emoncmsorg emoncmsorg couldn't send to server, URLError: getrandom() initialization failed. (_ssl.c:661)
2018-12-17 16:54:41,240 WARNING  emoncmsorg send failure: wanted 'ok' but got ''

I’ve grabbed the API read/write from emoncms.org as I have done multiple occasions and added to emonhub config, saved - looks fine to me. Have I broken something here?

EDIT: removed API, saved, readded, saved, restarted emonhub - working.
EDIT #2: shutdown to relocate the pi, on reboot same issue occurring. Restarted emonhub from local gui and working again…


(Glyn Hudson) split this topic #5

6 posts were split to a new topic: Getrandom() initialization failed


(Brian Orpin) split this topic #6

5 posts were split to a new topic: Mariadb cannot connect after dist-upgrade