ConnectionRefusedError:[Errno 111]连接被拒绝REDIS-SERVER

时间:2019-07-02 22:37:28

标签: python-3.x ubuntu-16.04

我正在尝试启动我的python程序。但是我遇到以下错误

我尝试重新安装redis-server。并且我已经尝试通过配置防火墙来允许通过端口的流量。

> **"Traceback (most recent call last):   File "/usr/local/lib/python3.6/site-packages/redis/connection.py", line
> 492, in connect
>     sock = self._connect()   File "/usr/local/lib/python3.6/site-packages/redis/connection.py", line
> 550, in _connect
>     raise err   File "/usr/local/lib/python3.6/site-packages/redis/connection.py", line
> 538, in _connect
>     sock.connect(socket_address) ConnectionRefusedError: [Errno 111] Connection refused During handling of the above exception, another
> exception occurred: Traceback (most recent call last):   File
> "main.py", line 11, in <module>
>     from instance import Data, Instance   File "/root/FLUID3/instance.py", line 256, in <module>
>     Data.init()   File "/root/FLUID3/instance.py", line 64, in init
>     Data.load_user_addresses()   File "/root/FLUID3/instance.py", line 156, in load_user_addresses
>     for k in Data.redis.keys("addresses:*"):   File "/usr/local/lib/python3.6/site-packages/redis/client.py", line 1319,
> in keys
>     return self.execute_command('KEYS', pattern)   File "/usr/local/lib/python3.6/site-packages/redis/client.py", line 772, in
> execute_command
>     connection = pool.get_connection(command_name, **options)   File "/usr/local/lib/python3.6/site-packages/redis/connection.py", line
> 994, in get_connection
>     connection.connect()   File "/usr/local/lib/python3.6/site-packages/redis/connection.py", line
> 497, in connect
>     raise ConnectionError(self._error_message(e)) redis.exceptions.ConnectionError: Error 111 connecting to
> localhost:6379. Connection refused. "**

0 个答案:

没有答案