在Azure上部署mulicontainer webapp

2024-05-23 08:06:08 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图在Azure云服务上部署多容器webapp,但无法运行该应用程序。我不知道问题出在哪里

我的项目由两个Docker映像组成:一个专用于应用程序(My_app),另一个专用于PostgreSQL DB(My_DB)。以下是与创建这些图像相对应的Docker文件:

my_应用程序的Dockerfile:

FROM ubuntu:20.04
RUN apt-get update && apt-get install -y python3 python3-pip
RUN apt-get install -y python3-psycopg2
RUN pip3 install streamlit && pip3 install cython
RUN pip3 install openpyxl
COPY requirements.txt .
RUN pip3 install -r requirements.txt
EXPOSE 8501
COPY ./ /streamlit-docker/
WORKDIR /streamlit-docker/
CMD export STREAMLIT_SERVER_PORT=$PORT ; streamlit run main_app.py

my_db的Dockerfile:

FROM postgres:latest
ENV POSTGRES_PASSWORD=my_password
ENV POSTGRES_DB=my_db
ENV POSTGRES_USER=my_user
EXPOSE 5432
COPY db_rh.sql /docker-entrypoint-initdb.d/

和我的docker-compose.yml文件:

version: "2.0"

services:
        db:
                image: my_cr.azurecr.io/my_db

        app:
                image: my_cr.azurecr.io/my_app
                ports:
                        - '80:8501'
                depends_on:
                        - db

此应用程序在本地使用这些图像时运行良好。然后,为了在Azure上部署此应用程序,我遵循以下步骤:

  • 创建资源组
  • 使用图像my_app和my_db创建容器注册表
  • 创建应用程序服务计划
  • 创建具有以下配置的web应用程序:Docker容器(发布)、Linux(操作系统)、Azure容器注册表(图像源)、Docker compose(选项)、Azure容器注册表(图像源)、Docker-compose.yml(配置文件)

此应用程序服务的创建工作正常,但在尝试通过URL访问应用程序时,出现以下服务器错误:

“502-Web服务器在充当网关或代理服务器时收到无效响应。 您正在查找的页面有问题,无法显示。当Web服务器(作为网关或代理)联系上游内容服务器时,它收到来自内容服务器的无效响应。“

以下是我的容器日志的完整内容:

2021-08-05T07:54:34.720Z INFO  - Starting multi-container app..
2021-08-05T07:54:35.179Z INFO  - Pulling image: my_cr.azurecr.io/my_db
2021-08-05T07:54:35.498Z INFO  - latest Pulling from my_db
2021-08-05T07:54:35.499Z INFO  -  Digest: sha256:74d3869cb2f42dca24421efb98b7509069920bbbd0f2f865a5e64ba30557961f
2021-08-05T07:54:35.499Z INFO  -  Status: Image is up to date for my_cr.azurecr.io/my_db:latest
2021-08-05T07:54:35.501Z INFO  - Pull Image successful, Time taken: 0 Minutes and 0 Seconds
2021-08-05T07:54:35.512Z INFO  - Starting container for site
2021-08-05T07:54:35.512Z INFO  - docker run -d -p 6022:5432 --name my_app_db_0_08f8304d -e WEBSITES_ENABLE_APP_SERVICE_STORAGE=false -e WEBSITE_SITE_NAME=my_app -e WEBSITE_AUTH_ENABLED=False -e WEBSITE_ROLE_INSTANCE_ID=0 -e WEBSITE_HOSTNAME=my_app.azurewebsites.net -e WEBSITE_INSTANCE_ID=64bc73e3a7abb411766354d386a7f0c2b2478449abedacd9a87a34854de7a75a my_cr.azurecr.io/my_db  

2021-08-05T07:54:35.512Z INFO  - Logging is not enabled for this container.
Please use https://aka.ms/linux-diagnostics to enable logging to see container logs here.
2021-08-05T07:54:35.991Z INFO  - Pulling image: my_cr.azurecr.io/my_app
2021-08-05T07:54:36.264Z INFO  - latest Pulling from my_app
2021-08-05T07:54:36.264Z INFO  -  Digest: sha256:cd06507e2d55f131d2dd04a56647617b22aeb26d23a3b1001bda39fa6c2027ec
2021-08-05T07:54:36.264Z INFO  -  Status: Image is up to date for my_cr.azurecr.io/my_app:latest
2021-08-05T07:54:36.266Z INFO  - Pull Image successful, Time taken: 0 Minutes and 0 Seconds
2021-08-05T07:54:36.273Z INFO  - Starting container for site
2021-08-05T07:54:36.273Z INFO  - docker run -d -p 0:8501 --name my_app_app_0_08f8304d -e WEBSITES_ENABLE_APP_SERVICE_STORAGE=false -e WEBSITE_SITE_NAME=my_app -e WEBSITE_AUTH_ENABLED=False -e WEBSITE_ROLE_INSTANCE_ID=0 -e WEBSITE_HOSTNAME=my_app.azurewebsites.net -e WEBSITE_INSTANCE_ID=64bc73e3a7abb411766354d386a7f0c2b2478449abedacd9a87a34854de7a75a my_cr.azurecr.io/my_app  

2021-08-05T07:54:36.273Z INFO  - Logging is not enabled for this container.
Please use https://aka.ms/linux-diagnostics to enable logging to see container logs here.
2021-08-05T07:58:27.330Z ERROR - multi-container unit was not started successfully
2021-08-05T07:58:27.356Z INFO  - Container logs from my_app_db_0_08f8304d = 2021-08-05T07:54:39.624400605Z The files belonging to this database system will be owned by user "postgres".
2021-08-05T07:54:39.625150532Z This user must also own the server process.
2021-08-05T07:54:39.625163232Z 
2021-08-05T07:54:39.626103466Z The database cluster will be initialized with locale "en_US.utf8".
2021-08-05T07:54:39.626877394Z The default database encoding has accordingly been set to "UTF8".
2021-08-05T07:54:39.626889795Z The default text search configuration will be set to "english".
2021-08-05T07:54:39.626894195Z 
2021-08-05T07:54:39.626897695Z Data page checksums are disabled.
2021-08-05T07:54:39.626901295Z 
2021-08-05T07:54:39.628892567Z fixing permissions on existing directory /var/lib/postgresql/data ... ok
2021-08-05T07:54:39.628906968Z creating subdirectories ... ok
2021-08-05T07:54:39.629589593Z selecting dynamic shared memory implementation ... posix
2021-08-05T07:54:39.656824379Z selecting default max_connections ... 100
2021-08-05T07:54:39.687252281Z selecting default shared_buffers ... 128MB
2021-08-05T07:54:39.740016291Z selecting default time zone ... Etc/UTC
2021-08-05T07:54:39.741740954Z creating configuration files ... ok
2021-08-05T07:54:40.068593789Z running bootstrap script ... ok
2021-08-05T07:54:41.004087061Z performing post-bootstrap initialization ... ok
2021-08-05T07:54:42.230641572Z syncing data to disk ... ok
2021-08-05T07:54:42.231317196Z 
2021-08-05T07:54:42.231897217Z initdb: warning: enabling "trust" authentication for local connections
2021-08-05T07:54:42.232095325Z You can change this by editing pg_hba.conf or using the option -A, or
2021-08-05T07:54:42.232116725Z --auth-local and --auth-host, the next time you run initdb.
2021-08-05T07:54:42.232300832Z 
2021-08-05T07:54:42.232334933Z Success. You can now start the database server using:
2021-08-05T07:54:42.232340533Z 
2021-08-05T07:54:42.232343934Z     pg_ctl -D /var/lib/postgresql/data -l logfile start
2021-08-05T07:54:42.232347534Z 
2021-08-05T07:54:42.456194139Z waiting for server to start....2021-08-05 07:54:42.456 UTC [44] LOG:  starting PostgreSQL 13.3 (Debian 13.3-1.pgdg100+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit
2021-08-05T07:54:42.496248289Z 2021-08-05 07:54:42.496 UTC [44] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2021-08-05T07:54:42.654349413Z 2021-08-05 07:54:42.654 UTC [45] LOG:  database system was shut down at 2021-08-05 07:54:40 UTC
2021-08-05T07:54:42.746823961Z 2021-08-05 07:54:42.746 UTC [44] LOG:  database system is ready to accept connections
2021-08-05T07:54:42.783035373Z  done
2021-08-05T07:54:42.783885303Z server started
2021-08-05T07:54:44.054632713Z CREATE DATABASE
2021-08-05T07:54:44.056384276Z 
2021-08-05T07:54:44.056973898Z 
2021-08-05T07:54:44.057666823Z /usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/db_rh.sql
2021-08-05T07:54:44.221355749Z SET
2021-08-05T07:54:44.222769601Z SET
2021-08-05T07:54:44.223381423Z SET
2021-08-05T07:54:44.224206353Z SET
2021-08-05T07:54:44.225258591Z SET
2021-08-05T07:54:44.227164960Z  set_config 
2021-08-05T07:54:44.227179460Z ------------
2021-08-05T07:54:44.227184260Z  
2021-08-05T07:54:44.227187861Z (1 row)
2021-08-05T07:54:44.227191561Z 
2021-08-05T07:54:44.228905423Z SET
2021-08-05T07:54:44.229617648Z SET
2021-08-05T07:54:44.230499680Z SET
2021-08-05T07:54:44.230512781Z SET
2021-08-05T07:54:44.230971197Z SET
2021-08-05T07:54:44.232521654Z SET
2021-08-05T07:54:44.277558484Z CREATE TABLE
2021-08-05T07:54:44.315623762Z ALTER TABLE
2021-08-05T07:54:44.335845295Z CREATE TABLE
2021-08-05T07:54:44.356854955Z ALTER TABLE
2021-08-05T07:54:44.377606507Z CREATE TABLE
2021-08-05T07:54:44.398614267Z ALTER TABLE
2021-08-05T07:54:44.438168299Z CREATE TABLE
2021-08-05T07:54:44.457002081Z ALTER TABLE
2021-08-05T07:54:44.477301216Z CREATE TABLE
2021-08-05T07:54:44.498951400Z ALTER TABLE
2021-08-05T07:54:44.499750529Z COPY 0
2021-08-05T07:54:44.500445354Z COPY 0
2021-08-05T07:54:44.502041812Z COPY 0
2021-08-05T07:54:44.502772838Z COPY 0
2021-08-05T07:54:44.503399861Z COPY 0
2021-08-05T07:54:44.600390873Z ALTER TABLE
2021-08-05T07:54:44.679034324Z ALTER TABLE
2021-08-05T07:54:44.760520588Z ALTER TABLE
2021-08-05T07:54:44.820774680Z ALTER TABLE
2021-08-05T07:54:44.882028508Z ALTER TABLE
2021-08-05T07:54:44.962060520Z CREATE INDEX
2021-08-05T07:54:44.982679670Z ALTER TABLE
2021-08-05T07:54:45.003139914Z ALTER TABLE
2021-08-05T07:54:45.022835530Z ALTER TABLE
2021-08-05T07:54:45.042545347Z ALTER TABLE
2021-08-05T07:54:45.043895697Z 
2021-08-05T07:54:45.044546920Z 
2021-08-05T07:54:45.054186771Z waiting for server to shut down...2021-08-05 07:54:45.054 UTC [44] LOG:  received fast shutdown request
2021-08-05T07:54:45.104737810Z .2021-08-05 07:54:45.104 UTC [44] LOG:  aborting any active transactions
2021-08-05T07:54:45.113094314Z 2021-08-05 07:54:45.113 UTC [44] LOG:  background worker "logical replication launcher" (PID 51) exited with exit code 1
2021-08-05T07:54:45.115152089Z 2021-08-05 07:54:45.115 UTC [46] LOG:  shutting down
2021-08-05T07:54:45.555569909Z 2021-08-05 07:54:45.554 UTC [44] LOG:  database system is shut down
2021-08-05T07:54:45.559094037Z  done
2021-08-05T07:54:45.559820164Z server stopped
2021-08-05T07:54:45.560410685Z 
2021-08-05T07:54:45.560950305Z PostgreSQL init process complete; ready for start up.
2021-08-05T07:54:45.560963205Z 
2021-08-05T07:54:45.684720007Z 2021-08-05 07:54:45.684 UTC [1] LOG:  starting PostgreSQL 13.3 (Debian 13.3-1.pgdg100+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit
2021-08-05T07:54:45.691463352Z 2021-08-05 07:54:45.691 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2021-08-05T07:54:45.701926133Z 2021-08-05 07:54:45.692 UTC [1] LOG:  listening on IPv6 address "::", port 5432
2021-08-05T07:54:45.797674616Z 2021-08-05 07:54:45.797 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2021-08-05T07:54:45.894399334Z 2021-08-05 07:54:45.894 UTC [81] LOG:  database system was shut down at 2021-08-05 07:54:45 UTC
2021-08-05T07:54:45.908581650Z 2021-08-05 07:54:45.908 UTC [82] LOG:  invalid length of startup packet
2021-08-05T07:54:45.960868752Z 2021-08-05 07:54:45.960 UTC [1] LOG:  database system is ready to accept connections
2021-08-05T07:54:46.923208257Z 2021-08-05 07:54:46.922 UTC [89] LOG:  invalid length of startup packet
2021-08-05T07:54:47.935920894Z 2021-08-05 07:54:47.935 UTC [90] LOG:  invalid length of startup packet
2021-08-05T07:54:48.956866030Z 2021-08-05 07:54:48.956 UTC [91] LOG:  invalid length of startup packet
2021-08-05T07:54:49.971780246Z 2021-08-05 07:54:49.971 UTC [92] LOG:  invalid length of startup packet
2021-08-05T07:54:50.981966990Z 2021-08-05 07:54:50.981 UTC [94] LOG:  invalid length of startup packet
2021-08-05T07:54:51.990014754Z 2021-08-05 07:54:51.989 UTC [95] LOG:  invalid length of startup packet
2021-08-05T07:54:52.998793493Z 2021-08-05 07:54:52.998 UTC [96] LOG:  invalid length of startup packet
2021-08-05T07:54:54.009655500Z 2021-08-05 07:54:54.009 UTC [97] LOG:  invalid length of startup packet
2021-08-05T07:54:55.017764808Z 2021-08-05 07:54:55.017 UTC [98] LOG:  invalid length of startup packet
2021-08-05T07:54:56.027214763Z 2021-08-05 07:54:56.027 UTC [99] LOG:  invalid length of startup packet
2021-08-05T07:54:57.039281012Z 2021-08-05 07:54:57.036 UTC [100] LOG:  invalid length of startup packet
2021-08-05T07:54:58.053551741Z 2021-08-05 07:54:58.053 UTC [101] LOG:  invalid length of startup packet
2021-08-05T07:54:59.062191265Z 2021-08-05 07:54:59.062 UTC [102] LOG:  invalid length of startup packet
2021-08-05T07:55:00.073771695Z 2021-08-05 07:55:00.073 UTC [103] LOG:  invalid length of startup packet
2021-08-05T07:55:01.082230724Z 2021-08-05 07:55:01.082 UTC [104] LOG:  invalid length of startup packet
2021-08-05T07:55:02.092564548Z 2021-08-05 07:55:02.092 UTC [105] LOG:  invalid length of startup packet
2021-08-05T07:55:03.104064712Z 2021-08-05 07:55:03.103 UTC [106] LOG:  invalid length of startup packet
2021-08-05T07:55:04.112175958Z 2021-08-05 07:55:04.111 UTC [107] LOG:  invalid length of startup packet
2021-08-05T07:55:05.120723018Z 2021-08-05 07:55:05.120 UTC [108] LOG:  invalid length of startup packet
2021-08-05T07:55:06.128742159Z 2021-08-05 07:55:06.128 UTC [109] LOG:  invalid length of startup packet
2021-08-05T07:55:07.137263517Z 2021-08-05 07:55:07.137 UTC [110] LOG:  invalid length of startup packet
2021-08-05T07:55:08.148442867Z 2021-08-05 07:55:08.148 UTC [111] LOG:  invalid length of startup packet
2021-08-05T07:55:09.169346810Z 2021-08-05 07:55:09.161 UTC [112] LOG:  invalid length of startup packet
2021-08-05T07:55:10.172877800Z 2021-08-05 07:55:10.172 UTC [113] LOG:  invalid length of startup packet
2021-08-05T07:55:11.181602066Z 2021-08-05 07:55:11.181 UTC [114] LOG:  invalid length of startup packet
2021-08-05T07:55:12.189966019Z 2021-08-05 07:55:12.189 UTC [115] LOG:  invalid length of startup packet
2021-08-05T07:55:13.200831156Z 2021-08-05 07:55:13.200 UTC [116] LOG:  invalid length of startup packet
2021-08-05T07:55:14.209124505Z 2021-08-05 07:55:14.208 UTC [117] LOG:  invalid length of startup packet
2021-08-05T07:55:15.218337785Z 2021-08-05 07:55:15.218 UTC [118] LOG:  invalid length of startup packet
2021-08-05T07:55:16.226075387Z 2021-08-05 07:55:16.225 UTC [120] LOG:  invalid length of startup packet
2021-08-05T07:55:17.234564848Z 2021-08-05 07:55:17.234 UTC [121] LOG:  invalid length of startup packet
2021-08-05T07:55:18.245693074Z 2021-08-05 07:55:18.245 UTC [122] LOG:  invalid length of startup packet
2021-08-05T07:55:19.255450228Z 2021-08-05 07:55:19.255 UTC [123] LOG:  invalid length of startup packet
2021-08-05T07:55:20.270511372Z 2021-08-05 07:55:20.264 UTC [124] LOG:  invalid length of startup packet
2021-08-05T07:55:21.273793492Z 2021-08-05 07:55:21.273 UTC [125] LOG:  invalid length of startup packet
2021-08-05T07:55:22.282482606Z 2021-08-05 07:55:22.282 UTC [126] LOG:  invalid length of startup packet
2021-08-05T07:55:23.292355263Z 2021-08-05 07:55:23.292 UTC [127] LOG:  invalid length of startup packet
2021-08-05T07:55:24.301818803Z 2021-08-05 07:55:24.301 UTC [128] LOG:  invalid length of startup packet
2021-08-05T07:55:25.310154158Z 2021-08-05 07:55:25.310 UTC [129] LOG:  invalid length of startup packet
2021-08-05T07:55:26.321577717Z 2021-08-05 07:55:26.321 UTC [130] LOG:  invalid length of startup packet
2021-08-05T07:55:27.338986845Z 2021-08-05 07:55:27.331 UTC [131] LOG:  invalid length of startup packet
2021-08-05T07:55:28.369406547Z 2021-08-05 07:55:28.361 UTC [132] LOG:  invalid length of startup packet
2021-08-05T07:55:29.375026698Z 2021-08-05 07:55:29.374 UTC [133] LOG:  invalid length of startup packet
2021-08-05T07:55:30.385248609Z 2021-08-05 07:55:30.384 UTC [134] LOG:  invalid length of startup packet
2021-08-05T07:55:31.402910678Z 2021-08-05 07:55:31.402 UTC [135] LOG:  invalid length of startup packet
2021-08-05T07:55:32.419738718Z 2021-08-05 07:55:32.419 UTC [136] LOG:  invalid length of startup packet
2021-08-05T07:55:33.441062540Z 2021-08-05 07:55:33.437 UTC [137] LOG:  invalid length of startup packet
2021-08-05T07:55:34.463932369Z 2021-08-05 07:55:34.463 UTC [138] LOG:  invalid length of startup packet
2021-08-05T07:55:35.477585383Z 2021-08-05 07:55:35.477 UTC [139] LOG:  invalid length of startup packet
2021-08-05T07:55:36.486166422Z 2021-08-05 07:55:36.486 UTC [140] LOG:  invalid length of startup packet
2021-08-05T07:55:37.494644457Z 2021-08-05 07:55:37.494 UTC [141] LOG:  invalid length of startup packet
2021-08-05T07:55:38.509526210Z 2021-08-05 07:55:38.509 UTC [142] LOG:  invalid length of startup packet
2021-08-05T07:55:39.521249455Z 2021-08-05 07:55:39.520 UTC [143] LOG:  invalid length of startup packet
2021-08-05T07:55:40.531927864Z 2021-08-05 07:55:40.528 UTC [144] LOG:  invalid length of startup packet
2021-08-05T07:55:41.537468399Z 2021-08-05 07:55:41.537 UTC [145] LOG:  invalid length of startup packet
2021-08-05T07:55:42.546186210Z 2021-08-05 07:55:42.546 UTC [146] LOG:  invalid length of startup packet
2021-08-05T07:55:43.555275734Z 2021-08-05 07:55:43.555 UTC [147] LOG:  invalid length of startup packet
2021-08-05T07:55:44.562742499Z 2021-08-05 07:55:44.562 UTC [148] LOG:  invalid length of startup packet
2021-08-05T07:55:45.571263301Z 2021-08-05 07:55:45.571 UTC [149] LOG:  invalid length of startup packet
2021-08-05T07:55:46.580387325Z 2021-08-05 07:55:46.580 UTC [151] LOG:  invalid length of startup packet
2021-08-05T07:55:47.589074832Z 2021-08-05 07:55:47.588 UTC [152] LOG:  invalid length of startup packet
2021-08-05T07:55:48.603082433Z 2021-08-05 07:55:48.597 UTC [153] LOG:  invalid length of startup packet
2021-08-05T07:55:49.607446299Z 2021-08-05 07:55:49.607 UTC [154] LOG:  invalid length of startup packet
2021-08-05T07:55:50.619281079Z 2021-08-05 07:55:50.615 UTC [155] LOG:  invalid length of startup packet
2021-08-05T07:55:51.625251846Z 2021-08-05 07:55:51.623 UTC [156] LOG:  invalid length of startup packet
2021-08-05T07:55:52.632862471Z 2021-08-05 07:55:52.632 UTC [157] LOG:  invalid length of startup packet
2021-08-05T07:55:53.641866947Z 2021-08-05 07:55:53.641 UTC [158] LOG:  invalid length of startup packet
2021-08-05T07:55:54.653580021Z 2021-08-05 07:55:54.653 UTC [159] LOG:  invalid length of startup packet
2021-08-05T07:55:55.661719164Z 2021-08-05 07:55:55.661 UTC [160] LOG:  invalid length of startup packet
2021-08-05T07:55:56.669939482Z 2021-08-05 07:55:56.669 UTC [161] LOG:  invalid length of startup packet
2021-08-05T07:55:57.678812352Z 2021-08-05 07:55:57.678 UTC [162] LOG:  invalid length of startup packet
2021-08-05T07:55:58.687793838Z 2021-08-05 07:55:58.687 UTC [163] LOG:  invalid length of startup packet
2021-08-05T07:55:59.699769122Z 2021-08-05 07:55:59.699 UTC [164] LOG:  invalid length of startup packet
2021-08-05T07:56:00.716650167Z 2021-08-05 07:56:00.716 UTC [165] LOG:  invalid length of startup packet
2021-08-05T07:56:01.725577950Z 2021-08-05 07:56:01.725 UTC [166] LOG:  invalid length of startup packet
2021-08-05T07:56:02.747925473Z 2021-08-05 07:56:02.747 UTC [167] LOG:  invalid length of startup packet
2021-08-05T07:56:03.759682548Z 2021-08-05 07:56:03.759 UTC [168] LOG:  invalid length of startup packet
2021-08-05T07:56:04.771765433Z 2021-08-05 07:56:04.771 UTC [169] LOG:  invalid length of startup packet
2021-08-05T07:56:05.784807652Z 2021-08-05 07:56:05.784 UTC [170] LOG:  invalid length of startup packet
2021-08-05T07:56:06.803539504Z 2021-08-05 07:56:06.794 UTC [171] LOG:  invalid length of startup packet
2021-08-05T07:56:07.807353350Z 2021-08-05 07:56:07.807 UTC [172] LOG:  invalid length of startup packet
2021-08-05T07:56:08.817336104Z 2021-08-05 07:56:08.817 UTC [173] LOG:  invalid length of startup packet
2021-08-05T07:56:09.824894676Z 2021-08-05 07:56:09.824 UTC [174] LOG:  invalid length of startup packet
2021-08-05T07:56:10.833040967Z 2021-08-05 07:56:10.832 UTC [175] LOG:  invalid length of startup packet
2021-08-05T07:56:11.842120489Z 2021-08-05 07:56:11.841 UTC [176] LOG:  invalid length of startup packet
2021-08-05T07:56:12.855950672Z 2021-08-05 07:56:12.850 UTC [177] LOG:  invalid length of startup packet
2021-08-05T07:56:13.860347575Z 2021-08-05 07:56:13.860 UTC [178] LOG:  invalid length of startup packet
2021-08-05T07:56:14.868976169Z 2021-08-05 07:56:14.868 UTC [179] LOG:  invalid length of startup packet
2021-08-05T07:56:15.877357555Z 2021-08-05 07:56:15.877 UTC [180] LOG:  invalid length of startup packet
2021-08-05T07:56:16.885764041Z 2021-08-05 07:56:16.885 UTC [182] LOG:  invalid length of startup packet
2021-08-05T07:56:17.894124324Z 2021-08-05 07:56:17.893 UTC [183] LOG:  invalid length of startup packet
2021-08-05T07:56:18.909025945Z 2021-08-05 07:56:18.908 UTC [184] LOG:  invalid length of startup packet
2021-08-05T07:56:19.916682502Z 2021-08-05 07:56:19.916 UTC [185] LOG:  invalid length of startup packet
2021-08-05T07:56:20.925094086Z 2021-08-05 07:56:20.924 UTC [186] LOG:  invalid length of startup packet
2021-08-05T07:56:21.933015990Z 2021-08-05 07:56:21.932 UTC [187] LOG:  invalid length of startup packet
2021-08-05T07:56:22.940664917Z 2021-08-05 07:56:22.940 UTC [188] LOG:  invalid length of startup packet
2021-08-05T07:56:23.952057472Z 2021-08-05 07:56:23.951 UTC [189] LOG:  invalid length of startup packet
2021-08-05T07:56:24.962597097Z 2021-08-05 07:56:24.962 UTC [190] LOG:  invalid length of startup packet
2021-08-05T07:56:25.971645871Z 2021-08-05 07:56:25.971 UTC [191] LOG:  invalid length of startup packet
2021-08-05T07:56:26.981238163Z 2021-08-05 07:56:26.980 UTC [192] LOG:  invalid length of startup packet
2021-08-05T07:56:27.993425043Z 2021-08-05 07:56:27.993 UTC [193] LOG:  invalid length of startup packet
2021-08-05T07:56:29.002914331Z 2021-08-05 07:56:29.002 UTC [194] LOG:  invalid length of startup packet
2021-08-05T07:56:30.011207268Z 2021-08-05 07:56:30.010 UTC [195] LOG:  invalid length of startup packet
2021-08-05T07:56:31.025278976Z 2021-08-05 07:56:31.018 UTC [196] LOG:  invalid length of startup packet
2021-08-05T07:56:32.216948573Z 2021-08-05 07:56:32.216 UTC [197] LOG:  invalid length of startup packet
2021-08-05T07:56:33.228487181Z 2021-08-05 07:56:33.228 UTC [198] LOG:  invalid length of startup packet
2021-08-05T07:56:34.237630694Z 2021-08-05 07:56:34.237 UTC [199] LOG:  invalid length of startup packet
2021-08-05T07:56:35.252393227Z 2021-08-05 07:56:35.252 UTC [200] LOG:  invalid length of startup packet
2021-08-05T07:56:36.266005461Z 2021-08-05 07:56:36.265 UTC [201] LOG:  invalid length of startup packet
2021-08-05T07:56:37.274159443Z 2021-08-05 07:56:37.274 UTC [202] LOG:  invalid length of startup packet
2021-08-05T07:56:38.282400220Z 2021-08-05 07:56:38.282 UTC [203] LOG:  invalid length of startup packet
2021-08-05T07:56:39.290373288Z 2021-08-05 07:56:39.290 UTC [204] LOG:  invalid length of startup packet
2021-08-05T07:56:40.299752804Z 2021-08-05 07:56:40.299 UTC [205] LOG:  invalid length of startup packet
2021-08-05T07:56:41.308719006Z 2021-08-05 07:56:41.308 UTC [206] LOG:  invalid length of startup packet
2021-08-05T07:56:42.317175889Z 2021-08-05 07:56:42.316 UTC [207] LOG:  invalid length of startup packet
2021-08-05T07:56:43.326289595Z 2021-08-05 07:56:43.326 UTC [208] LOG:  invalid length of startup packet
2021-08-05T07:56:44.340279974Z 2021-08-05 07:56:44.340 UTC [209] LOG:  invalid length of startup packet
2021-08-05T07:56:45.353474420Z 2021-08-05 07:56:45.353 UTC [210] LOG:  invalid length of startup packet
2021-08-05T07:56:46.362194374Z 2021-08-05 07:56:46.361 UTC [212] LOG:  invalid length of startup packet
2021-08-05T07:56:47.371297641Z 2021-08-05 07:56:47.371 UTC [213] LOG:  invalid length of startup packet
2021-08-05T07:56:48.380459110Z 2021-08-05 07:56:48.380 UTC [214] LOG:  invalid length of startup packet
2021-08-05T07:56:49.389660180Z 2021-08-05 07:56:49.389 UTC [215] LOG:  invalid length of startup packet
2021-08-05T07:56:50.411080182Z 2021-08-05 07:56:50.400 UTC [216] LOG:  invalid length of startup packet
2021-08-05T07:56:51.413900925Z 2021-08-05 07:56:51.413 UTC [217] LOG:  invalid length of startup packet
2021-08-05T07:56:52.421513037Z 2021-08-05 07:56:52.421 UTC [218] LOG:  invalid length of startup packet
2021-08-05T07:56:53.429621963Z 2021-08-05 07:56:53.429 UTC [219] LOG:  invalid length of startup packet
2021-08-05T07:56:54.440013566Z 2021-08-05 07:56:54.439 UTC [220] LOG:  invalid length of startup packet
2021-08-05T07:56:55.447874578Z 2021-08-05 07:56:55.447 UTC [221] LOG:  invalid length of startup packet
2021-08-05T07:56:56.465305134Z 2021-08-05 07:56:56.455 UTC [222] LOG:  invalid length of startup packet
2021-08-05T07:56:57.475737737Z 2021-08-05 07:56:57.471 UTC [223] LOG:  invalid length of startup packet
2021-08-05T07:56:58.485066601Z 2021-08-05 07:56:58.484 UTC [224] LOG:  invalid length of startup packet
2021-08-05T07:56:59.507571938Z 2021-08-05 07:56:59.507 UTC [225] LOG:  invalid length of startup packet
2021-08-05T07:57:00.516233176Z 2021-08-05 07:57:00.515 UTC [226] LOG:  invalid length of startup packet
2021-08-05T07:57:01.524555070Z 2021-08-05 07:57:01.524 UTC [227] LOG:  invalid length of startup packet
2021-08-05T07:57:02.536118582Z 2021-08-05 07:57:02.532 UTC [228] LOG:  invalid length of startup packet
2021-08-05T07:57:03.540761345Z 2021-08-05 07:57:03.540 UTC [229] LOG:  invalid length of startup packet
2021-08-05T07:57:04.550800001Z 2021-08-05 07:57:04.550 UTC [230] LOG:  invalid length of startup packet
2021-08-05T07:57:05.559268400Z 2021-08-05 07:57:05.559 UTC [231] LOG:  invalid length of startup packet
2021-08-05T07:57:06.567084876Z 2021-08-05 07:57:06.566 UTC [232] LOG:  invalid length of startup packet
2021-08-05T07:57:07.576160396Z 2021-08-05 07:57:07.576 UTC [233] LOG:  invalid length of startup packet
2021-08-05T07:57:08.587247688Z 2021-08-05 07:57:08.587 UTC [234] LOG:  invalid length of startup packet
2021-08-05T07:57:09.604397733Z 2021-08-05 07:57:09.604 UTC [235] LOG:  invalid length of startup packet
2021-08-05T07:57:10.614805949Z 2021-08-05 07:57:10.614 UTC [236] LOG:  invalid length of startup packet
2021-08-05T07:57:11.624866650Z 2021-08-05 07:57:11.624 UTC [237] LOG:  invalid length of startup packet
2021-08-05T07:57:12.635468272Z 2021-08-05 07:57:12.635 UTC [238] LOG:  invalid length of startup packet
2021-08-05T07:57:13.644411631Z 2021-08-05 07:57:13.644 UTC [239] LOG:  invalid length of startup packet
2021-08-05T07:57:14.662676945Z 2021-08-05 07:57:14.654 UTC [240] LOG:  invalid length of startup packet
2021-08-05T07:57:15.671643703Z 2021-08-05 07:57:15.671 UTC [241] LOG:  invalid length of startup packet
2021-08-05T07:57:16.680187744Z 2021-08-05 07:57:16.679 UTC [243] LOG:  invalid length of startup packet
2021-08-05T07:57:17.688120645Z 2021-08-05 07:57:17.687 UTC [244] LOG:  invalid length of startup packet
2021-08-05T07:57:18.696144687Z 2021-08-05 07:57:18.696 UTC [245] LOG:  invalid length of startup packet
2021-08-05T07:57:19.705499276Z 2021-08-05 07:57:19.705 UTC [246] LOG:  invalid length of startup packet
2021-08-05T07:57:20.719966148Z 2021-08-05 07:57:20.715 UTC [247] LOG:  invalid length of startup packet
...
2021-08-05T07:58:25.317360209Z 2021-08-05 07:58:25.317 UTC [313] LOG:  invalid length of startup packet
2021-08-05T07:58:26.325240470Z 2021-08-05 07:58:26.324 UTC [314] LOG:  invalid length of startup packet

2021-08-05T07:58:29.497Z INFO  - Container logs from my_app_app_0_08f8304d = 2021-08-05T07:54:46.838562178Z 2021-08-05 07:54:46.838 INFO    matplotlib.font_manager: generated new fontManager
2021-08-05T07:54:47.814484977Z 
2021-08-05T07:54:47.825676884Z   You can now view your Streamlit app in your browser.
2021-08-05T07:54:47.826413011Z 
2021-08-05T07:54:47.827449249Z   Network URL: http://172.16.69.3:8501
2021-08-05T07:54:47.827983168Z   External URL: http://20.74.4.82:8501
2021-08-05T07:54:47.828572390Z 

2021-08-05T07:58:32.246Z INFO  - Stopping site my_app because it failed during startup.

我已经搜索了几个小时,试图多次更改配置,但都没有成功

任何帮助都将不胜感激

最好的

叮当声


Tags: oftoinfologappdbpacketmy
1条回答
网友
1楼 · 发布于 2024-05-23 08:06:08

从Compose文件中删除Build部分,因为documentation声明不支持Build命令。您的容器已经在ACR中构建和部署,因此不需要这样做

Unsupported options

  • build (not allowed)
  • depends_on (ignored)
  • networks (ignored)
  • secrets (ignored)
  • ports other than 80 and 8080 (ignored)

您正在端口8501上公开应用程序。确保使用门户或CLI创建应用程序设置以映射该端口

az webapp config appsettings set  resource-group <group-name>  name <app-name>  settings WEBSITES_PORT=8501

您还可以编辑撰写文件,将端口80映射到8501

ports:
  - '80:8501'

相关问题 更多 >

    热门问题