如何解决a“;容器mydashapp没有';t响应端口”;部署python dash web应用程序时出错?

如何解决a“;容器mydashapp没有';t响应端口”;部署python dash web应用程序时出错?,python,azure,port,plotly-dash,Python,Azure,Port,Plotly Dash,——我想要完成什么--- 您好,我需要在Azure应用程序服务上为我工作的项目部署python Dash web应用程序。 我从github下载了dash hello world示例应用程序,并尝试按照以下教程进行部署: ; ——我的环境--- 操作系统:Ubuntu 18.04 蟒蛇3.8 ——代码提出问题的部分--- 我真的不知道 这是我的requirements.txt attrs==20.2.0 beautifulsoup4==4.9.3 Brotli==1.0.9 certifi==

——我想要完成什么---
您好,我需要在Azure应用程序服务上为我工作的项目部署python Dash web应用程序。 我从github下载了dash hello world示例应用程序,并尝试按照以下教程进行部署: ;

——我的环境---
操作系统:Ubuntu 18.04 蟒蛇3.8

——代码提出问题的部分---
我真的不知道

这是我的requirements.txt

attrs==20.2.0
beautifulsoup4==4.9.3
Brotli==1.0.9
certifi==2020.6.20
chardet==3.0.4
click==7.1.2
colorlover==0.3.0
dash==1.17.0
dash-core-components==1.13.0
dash-html-components==1.1.1
dash-renderer==1.8.3
dash-table==4.11.0
dash.ly==0.17.3
decorator==4.4.2
finsymbols==1.3.0
Flask==1.1.2
Flask-Compress==1.8.0
Flask-SeaSurf==0.2.2
future==0.18.2
gunicorn==20.0.4
idna==2.10
importlib-metadata==2.0.0
ipython-genutils==0.2.0
itsdangerous==1.1.0
Jinja2==2.11.2
jsonschema==3.2.0
jupyter-core==4.6.3
lxml==4.6.1
MarkupSafe==1.1.1
nbformat==5.0.8
numpy==1.19.4
pandas==1.1.4
pandas-datareader==0.9.0
plotly==4.12.0
pyrsistent==0.17.3
python-dateutil==2.8.1
pytz==2020.4
requests==2.24.0
requests-file==1.5.1
requests-ftp==0.3.1
retrying==1.3.3
six==1.15.0
soupsieve==2.0.1
traitlets==4.3.3
urllib3==1.25.11
Werkzeug==1.0.1
wrapt==1.12.1
zipp==3.4.0
剧本呢

我使用Azure CLI部署应用程序。 Azure我的应用程序服务配置文件:

[defaults]
group = XXXXX
sku = F1
appserviceplan = XXXXX
location = centralus
web = test-surveillance-web-app
——我期望结果是什么---


在Azure应用程序服务上发布应用程序后,我想在输入URL时访问网页

——我到底得到了什么---


加载页面需要花费大量时间,并导致502错误

当我检查日志时,我看到以下错误

2020-11-12T21:01:22.515Z ERROR - Container test-surveillance-web-app_0_4e7cb5d2 for site test-surveillance-web-app did not start within expected time limit. Elapsed time = 255.7862892 sec
**2020-11-12T21:01:22.597Z ERROR - Container test-surveillance-web-app_0_4e7cb5d2 didn't respond to HTTP pings on port: 8050, failing site start. See container logs for debugging.**
2020-11-12T21:01:22.841Z INFO  - Stopping site test-surveillance-web-app because it failed during startup.
/home/LogFiles/2020_11_12_lw0sdlwk000014_default_docker.log  (https://test-surveillance-web-app.scm.azurewebsites.net/api/vfs/LogFiles/2020_11_12_lw0sdlwk000014_default_docker.log)
**2020-11-12T15:21:06.661995783Z Please update the `dash` module to >= 0.23.1 to use this version of dash_core_components.**
**2020-11-12T15:21:06.662331698Z You are using version 0.17.3**
我不明白为什么容器不响应端口8050上的ping,尽管在我的代码中,我使用指令app.run_server(port=8050,debug=True)侦听该端口

在我搜索解决方案的过程中,我发现可以通过在app service中配置以下环境变量来解决这个问题:PORT和WEBSITES\u PORT。随后,我用8080、8000、8050 ET80端口配置了这些变量和代码,但错误仍然存在

我检查了stackoverflow上所有可能的答案,但没有一个对我有效-_-


感谢您宝贵的帮助

Web应用程序仅在端口80上侦听。如果您的容器侦听端口8050,只需将端口应用程序设置为8050即可创建一个端口。这将把端口80上的传入流量路由到端口8050。删除其他网站的端口设置。然后通过端口80连接到容器。

您好,谢谢您的回答。你的解决方案没有解决问题。在这方面,我看到了一些关于VNet集成的内容。它响了吗?