1

我用 Python 开发了一个聊天系统。使用的库:easygui、pycrypto、netifaces、stepic、redis、rabbitmq、pika、PIL 和 setuptools。所有库似乎都安装得很好,请参阅:python> import library by using redis-server on localhost, users can connect to redis and signup,login,chat,.. 但是在不同设备上设置 redis 并将 localhost 更改为代码中的 redis 服务器 ip ,我收到以下错误。(我在 oracle 虚拟机中使用 lubuntu 最新版本)

enter code here
Traceback (most recent call last):
File "kiducb.py", line 392, in <module>
g = Gui()
File "kiducb.py", line 19, in __init__
self.welcome()
File "kiducb.py", line 33, in welcome
rl = self.login()
File "kiducb.py", line 126, in login
resp = self.check_up(fvals[0], fvals[1], mac)
File "kiducb.py", line 76, in check_up
val = self.re.get(username)
File "/usr/lib/python2.7/dist-packages/redis/client.py", line 423, in get
return self.execute_command('GET', name)
File "/usr/lib/python2.7/dist-packages/redis/client.py", line 283, in execute_command
connection.send_command(*args)
File "/usr/lib/python2.7/dist-packages/redis/connection.py", line 260, in send_command
self.send_packed_command(self.pack_command(*args))
File "/usr/lib/python2.7/dist-packages/redis/connection.py", line 243, in 
send_packed_command        
self.connect()
File "/usr/lib/python2.7/dist-packages/redis/connection.py", line 191, in connect
raise ConnectionError(self._error_message(e))
redis.exceptions.ConnectionError: Error 111 connecting 10.1.1.12:6379. Connection refused.
4

1 回答 1

3

为了解决这个问题,我从系统中删除了我之前使用 apt-get 安装的 redis-server,并按照以下链接说明进行操作:https ://www.digitalocean.com/community/articles/how-to-install-和-使用-redis

于 2013-10-19T02:52:19.747 回答