proxy_pool 127.0.0.1:5010可以访问,可是127.0.0.1:5010/get的页面出现500 内部服务器错误问题

nuypyhwy  于 2023-02-04  发布在  其他
关注(0)|答案(6)|浏览(265)

依赖都安装了,也是直接运行cli里面的start.sh

rjzwgtxy

rjzwgtxy1#

是配置的问题吗?

koaltpgm

koaltpgm2#

报错日志截图放出来
或者你单独启动webserver看报什么错

jckbn6z7

jckbn6z73#

@Johnserf-Seed 如果你用过2.0之前的版本 那么你可能要删除之前的redis表,不然会存在两种存储格式的表,get方法解析会报错

ih99xse1

ih99xse14#

终端提示connection refused

[2019-09-19 00:21:25,419] ERROR in app: Exception on /get/ [GET]
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/redis/connection.py", line 538, in connect
sock = self._connect()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/redis/connection.py", line 595, in _connect
raise err
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/redis/connection.py", line 583, in _connect
sock.connect(socket_address)
ConnectionRefusedError: [Errno 61] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/flask/app.py", line 1982, in wsgi_app
response = self.full_dispatch_request()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/flask/app.py", line 1614, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/flask/app.py", line 1517, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/flask/_compat.py", line 33, in reraise
raise value
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/flask/app.py", line 1612, in full_dispatch_request
rv = self.dispatch_request()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/flask/app.py", line 1598, in dispatch_request
return self.view_functions rule.endpoint
File "../Api/ProxyApi.py", line 57, in get
proxy = ProxyManager().get()
File "../Manager/ProxyManager.py", line 74, in get
item_list = self.db.getAll()
File "../DB/DbClient.py", line 102, in getAll
return self.client.getAll()
File "/Users/zz/python/weapons/proxy_pool-master/DB/SsdbClient.py", line 109, in getAll
item_dict = self.__conn.hgetall(self.name)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/redis/client.py", line 2717, in hgetall
return self.execute_command('HGETALL', name)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/redis/client.py", line 836, in execute_command
conn = self.connection or pool.get_connection(command_name, **options)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/redis/connection.py", line 1222, in get_connection
connection.connect()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/redis/connection.py", line 543, in connect
raise ConnectionError(self._error_message(e))
redis.exceptions.ConnectionError: Error 61 connecting to 127.0.0.1:8000. Connection refused.
127.0.0.1 - [19/Sep/2019:00:21:25 +0800] "GET /get/ HTTP/1.1" 500 "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"

wj8zmpe1

wj8zmpe15#

@novazz redis.exceptions.ConnectionError: Error 61 connecting to 127.0.0.1:8000. Connection refused
数据库你配的是ssdb 127.0.0.1 8000
报错是说数据库连不上

dnph8jn4

dnph8jn46#

有可能是因为你之前开启了后台程序占用了 5010端口,切换别的端口试试

相关问题