简体   繁体   English

如何修复“连接到 localhost:6379 的错误 111。 当我启动 rq-worker 时连接被拒绝?

[英]How to fix 'Error 111 connecting to localhost:6379. Connection refused' when I start rq-worker?

I'm working with flask, redis and rq-worker in my web application that is hosted ina debian 9 machine.我在托管在 debian 9 机器上的 Web 应用程序中使用烧瓶、redis 和 rq-worker。 When I start rq-worker I get this error: "Error 111 connecting to localhost:6379. Connection refused".当我启动 rq-worker 时,我收到此错误:“连接到 localhost:6379 的错误 111。连接被拒绝”。

I already checked if Redis was installed and running, I tried these comands:我已经检查了 Redis 是否已安装并正在运行,我尝试了以下命令:

/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.我读过其他帖子,这是 Redis 正在运行和工作的证据。

I also check the file redis.conf and I set this variable:我还检查了文件 redis.conf 并设置了这个变量:

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.

对不起,这是redis配置绑定属性,我设置为127.0.0.1 ::00,但正确的配置是127.0.0.1 ::01。

您必须通过 ipconfig 而不是 localhost 放置您的 Ip

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 连接到 localhost:6379 时出现错误 111。 连接被拒绝。 姜戈赫鲁库 - Error 111 connecting to localhost:6379. Connection refused. Django Heroku Docker 上的 Redis:连接到 0.0.0.0:6379 时出现错误 111。 拒绝连接 - Redis on Docker: Error 111 connecting to 0.0.0.0:6379. Connection refused 连接到 localhost:6379 时出现错误 99。 无法分配请求的地址。 运行连接到redis的应用程序时 - Error 99 connecting to localhost:6379. Cannot assign requested address. when running app connected to redis Redis 错误 8 连接本地主机:6379。 提供了节点名或服务名,或未知 - Redis Error 8 connecting localhost:6379. nodename nor servname provided, or not known 从远程linux服务器连接到mongoDb时,如何解决Python中的“ [Errno 111]连接被拒绝”错误 - How to fix “[Errno 111] Connection refused” error in Python while connecting to mongoDb from remote linux server 连接到 redis://redis:6379:6379 时出现错误 -2。 名称或服务未知 - Error -2 connecting to redis://redis:6379:6379. Name or service not known redis.exceptions.ConnectionError: Error -2 连接到 localhost:6379。 名称或服务未知 - redis.exceptions.ConnectionError: Error -2 connecting to localhost:6379. Name or service not known redis.exceptions.ConnectionError:连接到 localhost:6379 时出现错误 97。 协议不支持的地址族 - redis.exceptions.ConnectionError: Error 97 connecting to localhost:6379. Address family not supported by protocol 在连接到Heroku上的mongoDB时出现错误:“ localhost:27017:[Errno 111]连接被拒绝”,但在我的计算机上工作正常 - Getting error: “localhost:27017: [Errno 111] Connection refused” while connecting to mongoDB on Heroku but works fine on my computer 如何修复 [Errno 111] 连接被拒绝 - How to fix [Errno 111] Connection refused
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM