-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
服务异常 #4
Comments
加了referer校验,curl -X POST 'http://127.0.0.1:8000/bing/chat' -H 'content-type: application/json' -H 'Referer: servicewechat.com/wxee7496be5b68b740' --data '{"q":"你是谁?","t":1,"sid":"1"}' |
宿主机器已经开启redis了,不知道在这个docker里面为啥连不上,不能是127.0.0.1吗? |
开放外网访问redis了,但是有一个这个报错 [2023-06-27 16:53:09 +0000] [1] [INFO] Sanic v23.3.0
[2023-06-27 16:53:09 +0000] [1] [INFO] Goin' Fast @ http://0.0.0.0:8000
[2023-06-27 16:53:09 +0000] [1] [INFO] mode: production, single worker
[2023-06-27 16:53:09 +0000] [1] [INFO] server: sanic, HTTP/1.1
[2023-06-27 16:53:09 +0000] [1] [INFO] python: 3.11.2
[2023-06-27 16:53:09 +0000] [1] [INFO] platform: Linux-5.15.0-1030-oracle-x86_64-with
[2023-06-27 16:53:09 +0000] [1] [INFO] packages: sanic-routing==22.8.0
[2023-06-27 16:53:11 +0000] [15] [INFO] Starting worker [15]
2023-06-27 16:53:57,826 /sanic/app.py [line:347] INFO: [bing] Http request payload: {'q': '你是谁?', 't': 1, 'sid': '1'}
[2023-06-27 16:53:57 +0000] [15] [ERROR] Exception occurred while handling uri: 'http://127.0.0.1:8000/bing/chat'
Traceback (most recent call last):
File "handle_request", line 97, in handle_request
from sanic_ext.extensions.base import Extension # type: ignore
^^^^^^^^^^^^^^
File "/sanic/app.py", line 427, in chat
res = await do_chat(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/sanic/app.py", line 349, in do_chat
return await get_bot(request.json.get('sid')).ask(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/sanic/app.py", line 118, in get_bot
cookie_path = cookie_path or get_cookie_file(sid, COOKIE_FILES)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/sanic/app.py", line 104, in get_cookie_file
return cookie_files[(
^
ZeroDivisionError: integer modulo by zero 配置文件指向json啊,应该是对的 |
重新拉一下镜像 |
镜像怎么拉取? |
搭建new-bing服务
1.使用Dockerfile自行build,服务起来后执行
curl -X POST 'http://127.0.0.1:8000/bing/chat' -H 'content-type: application/json' --data '{"q":"你是谁?","t":1,"sid":"1"}'
报错{"description":"Internal Server Error","status":500,"message":"The application encountered an unexpected error and could not continue."}
在docker容器里面调试,得到报错信息:
2.使用start.sh拉镜像,服务起来后执行
curl -X POST 'http://127.0.0.1:8000/bing/chat' -H 'content-type: application/json' --data '{"q":"你是谁?","t":1,"sid":"1"}'
报错{"description":"Not Found","status":404,"message":"Requested URL /bing/chat not found"}
我的env文件内容如下:
COOKIE_FILES=["/sanic/cookies/cookie0.json"]
ALL_PROXY=socks5://172.17.0.1:1080
REDIS_HOST=172.17.0.1
REDIS_PORT=6379
REDIS_PASSWD=12345678
The text was updated successfully, but these errors were encountered: