Reputation: 11
I'm working with flask, redis and rq-worker in my web application that is hosted ina debian 9 machine. When I start rq-worker I get this error: "Error 111 connecting to localhost:6379. Connection refused".
I already checked if Redis was installed and running, I tried these comands:
/opt/apps/mywebapp/flask$ ps aux | grep redis
sib 4987 0.0 0.0 12784 976 pts/2 S+ 09:37 0:00 grep redis
redis 6574 0.1 0.0 40860 3512 ? Ssl may28 3:38 /usr/bin/redis-server 127.0.0.1:6379
/opt/apps/mywebapp/flask$ redis-cli ping
PONG
I've read other post and this is an evidence that Redis is running and woking.
I also check the file redis.conf and I set this variable:
bind 127.0.0.1
I tried again.
/opt/apps/mywebapp/flask$ rq worker
But I keep receiving the error.
Error 111 connecting to localhost:6379. Connection refused.
Upvotes: 1
Views: 7573
Reputation: 11
Sorry, It was the redis configuration bind property, I set it 127.0.0.1 ::00 but the correct configuration was 127.0.0.1 ::01.
Upvotes: 0