I have been using a raspberry pi 3 for over a year now adding sensors to it every now and then.
Today i started adding a new sensor and a dashboard to go with it, when i saved the dashboard i started getting this error, although redis is installed and as far as i can see running correctly.
Warning: Redis::connect(): php_network_getaddresses: getaddrinfo failed: System error in /var/www/emoncms/index.php on line 32
Can’t connect to redis at localhost:6379 , it may be that redis-server is not installed or started see readme for redis installation
This comes up 70% of the time trying to access anything from emoncms, i have managed to log back in and delete the newly created dashboard but am still encountering the problem although less frequent.
Before i recreate the dashboard and encounter the same problem, has anyone seen this before or have any idea how to stop it happening?
I’m running emoncms V9.8.3, redis V2.8.17, mqtt V 1.4.11, if that helps.
I have updated php-redis this morning from 2.2.5 to 3.1.2, which has made the errors less frequent, other than that they’re the same versions which have been installed since build, i did a system update when i migrated to emoncms 9.8.3 20 days ago which may have updated somthing but not since then and until today everything has been OK.
I’ve just tried redis-cli “flushall” i got an OK message, but the issue is still there, i can access redis through the redis-cli while i have this error.
Top is reporting 1.2% CPU usage for redis and a total load average of 0.13.
On trying to edit a dashboard i am also getting this error.
Thinking back, i had this problem last year when i had an attempt at creating my own widget for the dashboard, i cleared the issue by deleting the files i created, last week i updated my battery widget, via topic:
FYI @TrystanLea and for anyone else it may affect.
I appear to have solved this issue by replacing ‘host’ => ‘localhost’ with ‘host’ => ‘127.0.0.1’ in my settings.php file for emoncms in the redis section.
I am running PHP version 5.6.30, only because thats what happened to be installed when i set it up, not through any other choice, I’m not against upgrading if it will cause issues.
I’ve not noticed any issues, but i can see from your link how it could be an issue, especially as one of my next projects is to employ an ESP8266 with a light sensor to count the pulses from my electricity meter and hopefully somehow optically from my gas meter in a way that wont upset the supplier.