1
io.adapter(redis({ host: config.redisHost, port: config.redisPort }));

Both the confif.redisHost and config.redisPort are the correct values, but when I try to connect from my code I get the error -

'Error: Redis connection to 104.xxx.xx.xxx:6379 failed - connect ECONNREFUSED 104.xxx.xx.xxx:6379'

In redis.conf I've changed the bind to 0.0.0.0 as well as removing it completely and I've also tried setting protected mode to off just to try and get the connection working.

The IP and port are definitely, correct. Does anyone know why I might not be able to access the server from my code? My code is just being ran on my local machine and the redis server is being ran on a digital ocean ubuntu 14.04 machine. The status of the server is definitely running and I can access the redis-cli from the machine itself.

joe
  • 1,563
  • 4
  • 16
  • 35

1 Answers1

0

For some reason, it wasn't using redis.conf when I tried starting the server, I had to manually tell it to use it when starting up, now it's working.

joe
  • 1,563
  • 4
  • 16
  • 35