Closed liruixue closed 9 months ago
使用最新的main代码,服务启动后,GUI上输入问题,后台应答过程中出现 Forbidden for url: http://toolservermanager:8080/get_available_tools异常
输入问题后,后台应正常应答,无异常抛出。
··· | Exception in thread Thread-1 (task_handler): | Traceback (most recent call last): XAgent-Server | File "/app/XAgent/toolserver_interface.py", line 195, in get_available_tools XAgent-Server | response.raise_for_status() XAgent-Server | File "/usr/local/lib/python3.10/site-packages/requests/models.py", line 1021, in raise_for_status XAgent-Server | raise HTTPError(http_error_msg, response=self) XAgent-Server | requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: http://toolservermanager:8080/get_available_tools
···
我在1.00版本代码没有看到这个异常,8080端口的hostname应该为localhost,不知道toolservermanager的这个hostname为什么会出现这里
在同一 Docker 网络内的服务(如 XAgentServer)应该能够通过 http://ToolServerManager:8080 地址访问 ToolServerManager 服务。这是因为 Docker Compose 默认会在其内部网络中使用服务名称作为其主机名,从而使得服务间可以通过这些名称相互访问。
请问你使用http://localhost:8080 可以访问了么
Issue Description / 问题描述
使用最新的main代码,服务启动后,GUI上输入问题,后台应答过程中出现 Forbidden for url: http://toolservermanager:8080/get_available_tools异常
Expected Behavior / 预期行为
输入问题后,后台应正常应答,无异常抛出。
Environment / 环境信息
Error Screenshots or Logs / 错误截图或日志
··· | Exception in thread Thread-1 (task_handler): | Traceback (most recent call last): XAgent-Server | File "/app/XAgent/toolserver_interface.py", line 195, in get_available_tools XAgent-Server | response.raise_for_status() XAgent-Server | File "/usr/local/lib/python3.10/site-packages/requests/models.py", line 1021, in raise_for_status XAgent-Server | raise HTTPError(http_error_msg, response=self) XAgent-Server | requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: http://toolservermanager:8080/get_available_tools
···
Additional Notes / 其他备注
我在1.00版本代码没有看到这个异常,8080端口的hostname应该为localhost,不知道toolservermanager的这个hostname为什么会出现这里