Skip to content
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

超算运行后startup.py一键启动后 部署成功 但是只能打开API的连接 无法打开WEBUI的连接 #3396

Closed
A-runaaaa opened this issue Mar 18, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@A-runaaaa
Copy link

微信图片_20240318162513
在超算服务器上运行startup.py一件启动后 也是正常的读取模型部署模型,全部部署完之后有上面图片的日志,能够打开Streamlit的API界面但是无法打开webui的界面是什么原因呢,需要修改哪个地方么

@A-runaaaa A-runaaaa added the bug Something isn't working label Mar 18, 2024
Copy link

dosubot bot commented Mar 18, 2024

嗨,@A-runaaaa!很高兴再次见到你。希望你一切都好!

根据您提供的信息,无法打开Web UI界面可能是由于网络配置或Web UI服务方式的问题。具体来说,run_webui函数使用subprocess.Popen来启动用于Web UI的Streamlit服务器,并通过命令行参数指定主机和端口。如果从尝试访问Web UI的网络无法访问指定的主机和端口,或者如果超级计算机服务器的防火墙规则阻止了端口,那么Web UI将无法访问。

要解决此问题,可以考虑以下修改:

  1. 确保指定的主机和端口可访问:Web UI使用的主机和端口在WEBUI_SERVER配置中指定。确保主机设置为从您尝试访问Web UI的网络可达的IP地址或主机名。此外,确保指定的端口是开放的,并且没有被超级计算机服务器的任何防火墙阻止。

  2. 检查防火墙规则:超级计算机服务器通常有严格的防火墙规则,可能会阻止对某些端口的入站连接。确保为Web UI指定的端口被允许通过防火墙。

  3. 使用反向代理:如果由于网络限制或安全策略,无法直接访问Web UI的端口,可以考虑设置一个反向代理,该代理可以将来自公开可访问端口的请求转发到localhost上的Web UI的端口。这可以使用Nginx或Apache等工具完成。

  4. 验证Streamlit配置:启动Streamlit服务器的命令包括几个Streamlit特定的命令行参数。确保这些参数已正确配置您的环境。您可能还想检查Streamlit文档中可能影响可访问性的任何其他配置选项。

这是启动Web UI的Streamlit服务器的相关代码部分:

cmd = ["streamlit", "run", "webui.py",
       "--server.address", host,
       "--server.port", str(port),
       "--theme.base", "light",
       "--theme.primaryColor", "#165dff",
       "--theme.secondaryBackgroundColor", "#f5f5f5",
       "--theme.textColor", "#000000",
       ]
if run_mode == "lite":
    cmd += [
        "--",
        "lite",
    ]
p = subprocess.Popen(cmd)

确保WEBUI_SERVER配置中的hostport变量设置为允许Web UI从您的客户端网络访问的值。

此外,我在Langchain-Chatchat存储库中找到了一些类似的问题,可能会对您有所帮助:

如果您在尝试打开Langchain-Chatchat的web版本时在应用程序日志中看到确切的错误消息,它可能会提供更多线索来帮助解决问题。提供更多信息将有助于更有效地解决问题。

Sources

About Dosu

This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

@CRonaldo1997
Copy link

@A-runaaaa 同样的问题,请问解决了吗

@CRonaldo1997
Copy link

我把服务器防火墙关了就好了:
service firewalld stop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants