-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Labels
P2High priorityHigh priority
Description
Describe the bug
In the python/agent-framework sample, after successfully set up things by running:
- a365 config init
- a365 setup all
- a365 publish
The a365 deploy fails due to "[ERR] The deployment failed because the site did not start within the expected time."
a365.deploy.log:
[2026-01-22 10:06:42.435] [INF] Azure CLI is using 64-bit Python (optimal)
[2026-01-22 10:06:42.446] [INF] Validating Azure Web App exists...
[2026-01-22 10:06:51.014] [INF] Confirmed Azure Web App 'shileiagent0121-webapp' exists
[2026-01-22 10:06:51.019] [INF] Starting multi-platform deployment...
[2026-01-22 10:06:51.020] [INF] [1/7] Detecting environment...
[2026-01-22 10:06:51.021] [INF] Detecting platform in: D:\git\Agent365-Samples\python\agent-framework\sample-agent
[2026-01-22 10:06:51.025] [INF] Detected Python project
[2026-01-22 10:06:51.026] [INF] Detected platform: Python
[2026-01-22 10:06:51.027] [INF] [2/7] Getting appropriate builder for Python environment...
[2026-01-22 10:06:51.028] [INF] [3/7] Validating Python environment...
[2026-01-22 10:06:51.030] [INF] Validating Python environment...
[2026-01-22 10:06:52.350] [INF] Python version: Python 3.14.0
[2026-01-22 10:06:52.351] [INF] pip version: pip 25.2 from D:\git\Agent365-Samples\python\agent-framework\sample-agent\.venv\Lib\site-packages\pip (python 3.14)
[2026-01-22 10:06:52.352] [INF] [4/7] Building Python application...
[2026-01-22 10:06:52.354] [INF] Removing old publish directory...
[2026-01-22 10:06:52.422] [INF] Building Python project...
[2026-01-22 10:06:54.179] [INF] Copying project files...
[2026-01-22 10:06:54.653] [INF] No local packages found in publish/dist, running uv build in publish directory...
[2026-01-22 10:07:02.370] [INF] Successfully built 1 local packages in publish directory
[2026-01-22 10:07:02.373] [INF] Created requirements.txt for Azure deployment
[2026-01-22 10:07:02.376] [INF] Created .deployment file to force Oryx build
[2026-01-22 10:07:02.378] [INF] Copied .env.template file
[2026-01-22 10:07:02.379] [INF] Excluded .env file from deployment package for security
[2026-01-22 10:07:02.380] [INF] Environment variables should be set as Azure App Settings
[2026-01-22 10:07:02.381] [INF] Python project prepared for Azure deployment
[2026-01-22 10:07:02.382] [INF] Azure will handle dependency installation during deployment
[2026-01-22 10:07:02.383] [INF] Build output: D:\git\Agent365-Samples\python\agent-framework\sample-agent\publish
[2026-01-22 10:07:02.384] [INF] [5/7] Creating Oryx manifest...
[2026-01-22 10:07:02.387] [INF] Creating Oryx manifest for Python...
[2026-01-22 10:07:02.391] [INF] Created runtime.txt for Python version detection
[2026-01-22 10:07:02.459] [INF] Detected Python version: 3.14
[2026-01-22 10:07:02.481] [INF] Selected best Microsoft Agent 365 entry point: start_with_generic_host.py (priority: 45, hasMain: True)
[2026-01-22 10:07:02.488] [INF] Detected Microsoft Agent 365 entry point: start_with_generic_host.py, using command: python start_with_generic_host.py
[2026-01-22 10:07:02.492] [INF] Manifest command: python start_with_generic_host.py
[2026-01-22 10:07:02.493] [INF] [6/7] Converting .env to Azure App Settings...
[2026-01-22 10:07:02.498] [INF] Converting .env file to Azure App Settings...
[2026-01-22 10:07:02.504] [INF] Setting 27 environment variables as Azure App Settings...
[2026-01-22 10:07:10.980] [INF] Successfully converted 27 environment variables to Azure App Settings
[2026-01-22 10:07:10.981] [INF] [7/7] Setting Python startup command...
[2026-01-22 10:07:10.985] [INF] Selected best Microsoft Agent 365 entry point: start_with_generic_host.py (priority: 45, hasMain: True)
[2026-01-22 10:07:10.985] [INF] Detected Microsoft Agent 365 entry point: start_with_generic_host.py, using command: python start_with_generic_host.py
[2026-01-22 10:07:10.986] [INF] Setting Azure Web App startup command: python start_with_generic_host.py
[2026-01-22 10:07:19.918] [INF] Successfully set startup command for Azure Web App
[2026-01-22 10:07:19.919] [INF] Waiting for Azure configuration to stabilize...
[2026-01-22 10:07:24.943] [INF] [6/7] Creating deployment package: D:\git\Agent365-Samples\python\agent-framework\sample-agent\app.zip
[2026-01-22 10:07:24.954] [INF] Compressing 28 files from D:\git\Agent365-Samples\python\agent-framework\sample-agent\publish...
[2026-01-22 10:07:25.096] [INF] Package created in 0.1s - Size: 1.26 MB
[2026-01-22 10:07:25.099] [INF] [7/7] Deploying to Azure Web App...
[2026-01-22 10:07:25.099] [INF] Resource Group: rg-lsl-agent365-eastus
[2026-01-22 10:07:25.100] [INF] App Name: shileiagent0121-webapp
[2026-01-22 10:07:25.101] [INF] Deployment typically takes 2-5 minutes to complete
[2026-01-22 10:07:25.101] [INF] Monitor progress: https://shileiagent0121-webapp.scm.azurewebsites.net/api/deployments/latest
[2026-01-22 10:07:25.102] [INF] Uploading deployment package...
[2026-01-22 10:21:40.625] [ERR] Command failed with exit code 1
[2026-01-22 10:21:40.627] [ERR] Deployment upload failed with exit code 1
[2026-01-22 10:21:40.630] [ERR] Deployment error: WARNING: Initiating deployment
WARNING: Deploying from local path: D:\git\Agent365-Samples\python\agent-framework\sample-agent\app.zip
WARNING: Warming up Kudu before deployment.
WARNING: Warmed up Kudu instance successfully.
WARNING: Polling the status of async deployment. Start Time: 2026-01-22 02:07:49.199565+00:00 UTC
WARNING: Status: Building the app... Time: 2(s)
WARNING: Status: Building the app... Time: 19(s)
WARNING: Status: Building the app... Time: 36(s)
WARNING: Status: Building the app... Time: 53(s)
WARNING: Status: Building the app... Time: 69(s)
WARNING: Status: Building the app... Time: 86(s)
WARNING: Status: Building the app... Time: 102(s)
WARNING: Status: Building the app... Time: 119(s)
WARNING: Status: Building the app... Time: 136(s)
WARNING: Status: Building the app... Time: 152(s)
WARNING: Status: Building the app... Time: 168(s)
WARNING: Status: Building the app... Time: 185(s)
WARNING: Status: Build successful. Time: 201(s)
WARNING: Status: Starting the site... Time: 217(s)
WARNING: Status: Starting the site... Time: 233(s)
WARNING: Status: Starting the site... Time: 249(s)
WARNING: Status: Starting the site... Time: 265(s)
WARNING: Status: Starting the site... Time: 281(s)
WARNING: Status: Starting the site... Time: 297(s)
WARNING: Status: Starting the site... Time: 312(s)
WARNING: Status: Starting the site... Time: 328(s)
WARNING: Status: Starting the site... Time: 344(s)
WARNING: Status: Starting the site... Time: 360(s)
WARNING: Status: Starting the site... Time: 376(s)
WARNING: Status: Starting the site... Time: 392(s)
WARNING: Status: Starting the site... Time: 409(s)
WARNING: Status: Starting the site... Time: 425(s)
WARNING: Status: Starting the site... Time: 441(s)
WARNING: Status: Starting the site... Time: 457(s)
WARNING: Status: Starting the site... Time: 473(s)
WARNING: Status: Starting the site... Time: 490(s)
WARNING: Status: Starting the site... Time: 507(s)
WARNING: Status: Starting the site... Time: 526(s)
WARNING: Status: Starting the site... Time: 542(s)
WARNING: Status: Starting the site... Time: 559(s)
WARNING: Status: Starting the site... Time: 576(s)
WARNING: Status: Starting the site... Time: 592(s)
WARNING: Status: Starting the site... Time: 609(s)
WARNING: Status: Starting the site... Time: 625(s)
WARNING: Status: Starting the site... Time: 640(s)
WARNING: Status: Starting the site... Time: 656(s)
WARNING: Status: Starting the site... Time: 673(s)
WARNING: Status: Starting the site... Time: 690(s)
WARNING: Status: Starting the site... Time: 706(s)
WARNING: Status: Starting the site... Time: 724(s)
WARNING: Status: Starting the site... Time: 740(s)
WARNING: Status: Starting the site... Time: 756(s)
WARNING: Status: Starting the site... Time: 772(s)
WARNING: Status: Starting the site... Time: 788(s)
WARNING: Status: Starting the site... Time: 804(s)
WARNING: Status: Site failed to start. Time: 820(s)
ERROR: Deployment failed because the site failed to start within 10 mins.
InprogressInstances: 0, SuccessfulInstances: 0, FailedInstances: 1
Error: Deployment for site 'shileiagent0121-webapp' with DeploymentId '6449d676-c36e-4030-a328-9e70abfd94eb' failed because the worker proccess failed to start within the allotted time.
Please check the runtime logs for more info: https://shileiagent0121-webapp.scm.azurewebsites.net/api/logs/docker
The log from https://shileiagent0121-webapp.scm.azurewebsites.net/api/vfs/LogFiles/2026_01_21_lw1sdlwk000A23_docker.log:
2026-01-21T12:43:13.6789555Z Container start method called.
2026-01-21T12:43:13.6797544Z Establishing network.
2026-01-21T12:43:13.6983221Z Pulling image: appsvc/python:3.11_20251017.5.tuxprod.
2026-01-21T12:43:16.1705796Z Image appsvc/python:3.11_20251017.5.tuxprod is pulled from registry 10.1.0.4:13209
2026-01-21T12:43:16.1707536Z Container is starting.
2026-01-21T12:43:16.1710340Z Establishing user namespace if not established already.
2026-01-21T12:43:16.1711829Z Establishing network if not established already.
2026-01-21T12:43:16.1989429Z Mounting volumes.
2026-01-21T12:43:16.2006775Z Nested mountpoint
2026-01-21T12:43:16.2480722Z Nested mountpoint volatile/logs
2026-01-21T12:43:16.2606122Z Nested mountpoint
2026-01-21T12:43:16.3888877Z Nested mountpoint
2026-01-21T12:43:16.4175939Z Nested mountpoint
2026-01-21T12:43:17.6614693Z Creating container.
2026-01-21T12:43:17.6620820Z Creating pipes for streaming container io.
2026-01-21T12:43:17.6627709Z Creating stdout named pipe at /podr/container/pipe/e441855b391f_shileiagent0121-webapp/stdout_c3f6bc474d1c4c29bc8d9ff94028704b.
2026-01-21T12:43:17.6918644Z Successfully created stdout named pipe at: /podr/container/pipe/e441855b391f_shileiagent0121-webapp/stdout_c3f6bc474d1c4c29bc8d9ff94028704b.
2026-01-21T12:43:17.6991952Z Opening named pipe /podr/container/pipe/e441855b391f_shileiagent0121-webapp/stdout_c3f6bc474d1c4c29bc8d9ff94028704b for reading in non-blocking mode.
2026-01-21T12:43:17.6998709Z Successfully opened named pipe: /podr/container/pipe/e441855b391f_shileiagent0121-webapp/stdout_c3f6bc474d1c4c29bc8d9ff94028704b.
2026-01-21T12:43:17.7005384Z Successfully removed non-blocking flag from /podr/container/pipe/e441855b391f_shileiagent0121-webapp/stdout_c3f6bc474d1c4c29bc8d9ff94028704b.
2026-01-21T12:43:17.7010009Z Creating stderr named pipe at /podr/container/pipe/e441855b391f_shileiagent0121-webapp/stderr_0ceadc27e900456ea233f667ff983f23.
2026-01-21T12:43:17.7514320Z Successfully created stderr named pipe at: /podr/container/pipe/e441855b391f_shileiagent0121-webapp/stderr_0ceadc27e900456ea233f667ff983f23.
2026-01-21T12:43:17.7517854Z Opening named pipe /podr/container/pipe/e441855b391f_shileiagent0121-webapp/stderr_0ceadc27e900456ea233f667ff983f23 for reading in non-blocking mode.
2026-01-21T12:43:17.7528690Z Successfully opened named pipe: /podr/container/pipe/e441855b391f_shileiagent0121-webapp/stderr_0ceadc27e900456ea233f667ff983f23.
2026-01-21T12:43:17.7536172Z Successfully removed non-blocking flag from /podr/container/pipe/e441855b391f_shileiagent0121-webapp/stderr_0ceadc27e900456ea233f667ff983f23.
2026-01-21T12:43:17.7579624Z Creating container with image: appsvc/python:3.11_20251017.5.tuxprod from registry: 10.1.0.4:13209 and fully qualified image name: 10.1.0.4:13209/appsvc/python:3.11_20251017.5.tuxprod
2026-01-21T12:43:18.4886328Z Starting container: e441855b391f_shileiagent0121-webapp.
2026-01-21T12:43:18.6086573Z Starting watchers and probes.
2026-01-21T12:43:18.6156091Z Starting metrics collection.
2026-01-21T12:43:18.6159059Z Container is running.
2026-01-21T12:43:19.7356525Z Container start method finished after 6056 ms.
2026-01-21T12:47:10.0693361Z Site startup probe failed after 230.1241714 seconds.
2026-01-21T12:47:10.7193540Z Failed to start site. Revert by stopping site.
2026-01-21T12:47:10.8879836Z Container is terminating. Grace period: 5 seconds.
2026-01-21T12:47:11.0575506Z Stop and delete container. Retry count = 0
2026-01-21T12:47:11.0587405Z Stopping container: e441855b391f_shileiagent0121-webapp.
2026-01-21T12:47:16.9710752Z Deleting container: e441855b391f_shileiagent0121-webapp. Retry count = 0
2026-01-21T12:47:21.2935405Z Container spec TerminationMessagePolicy path
2026-01-21T12:47:21.3055619Z Container is terminated. Total time elapsed: 10416 ms.
2026-01-21T12:47:21.3334876Z Site container: shileiagent0121-webapp terminated during site startup.
2026-01-21T12:47:21.5112499Z Site: shileiagent0121-webapp stopped.
2026-01-21T12:47:24.2415230Z Site container: shileiagent0121-webapp_managedIdentity terminated during site startup.
2026-01-21T12:47:53.5794083Z Container start method called.
2026-01-21T12:47:53.5797253Z Establishing network.
2026-01-21T12:47:53.5799136Z Pulling image: appsvc/python:3.11_20251017.5.tuxprod.
2026-01-21T12:47:54.2813713Z Container is starting.
2026-01-21T12:47:54.2815558Z Establishing user namespace if not established already.
2026-01-21T12:47:54.2816682Z Establishing network if not established already.
2026-01-21T12:47:54.2817811Z Mounting volumes.
2026-01-21T12:47:54.3016190Z Nested mountpoint
2026-01-21T12:47:54.4323931Z Nested mountpoint volatile/logs
2026-01-21T12:47:54.4908642Z Nested mountpoint
2026-01-21T12:47:54.5217079Z Nested mountpoint
2026-01-21T12:47:54.5409742Z Nested mountpoint
2026-01-21T12:47:56.3667154Z Creating container.
2026-01-21T12:47:56.3770277Z Creating pipes for streaming container io.
2026-01-21T12:47:56.5777158Z Creating stdout named pipe at /podr/container/pipe/5cc463e4262b_shileiagent0121-webapp/stdout_29f52dedc57b4491b47d359d426e15bb.
2026-01-21T12:47:56.5969155Z Successfully created stdout named pipe at: /podr/container/pipe/5cc463e4262b_shileiagent0121-webapp/stdout_29f52dedc57b4491b47d359d426e15bb.
2026-01-21T12:47:56.5989690Z Opening named pipe /podr/container/pipe/5cc463e4262b_shileiagent0121-webapp/stdout_29f52dedc57b4491b47d359d426e15bb for reading in non-blocking mode.
2026-01-21T12:47:56.6067448Z Successfully opened named pipe: /podr/container/pipe/5cc463e4262b_shileiagent0121-webapp/stdout_29f52dedc57b4491b47d359d426e15bb.
2026-01-21T12:47:56.6081990Z Successfully removed non-blocking flag from /podr/container/pipe/5cc463e4262b_shileiagent0121-webapp/stdout_29f52dedc57b4491b47d359d426e15bb.
2026-01-21T12:47:56.6084101Z Creating stderr named pipe at /podr/container/pipe/5cc463e4262b_shileiagent0121-webapp/stderr_ab02263b0d694d759e9aef38b5fc0e01.
2026-01-21T12:47:56.6572851Z Successfully created stderr named pipe at: /podr/container/pipe/5cc463e4262b_shileiagent0121-webapp/stderr_ab02263b0d694d759e9aef38b5fc0e01.
2026-01-21T12:47:56.6575522Z Opening named pipe /podr/container/pipe/5cc463e4262b_shileiagent0121-webapp/stderr_ab02263b0d694d759e9aef38b5fc0e01 for reading in non-blocking mode.
2026-01-21T12:47:56.6659409Z Successfully opened named pipe: /podr/container/pipe/5cc463e4262b_shileiagent0121-webapp/stderr_ab02263b0d694d759e9aef38b5fc0e01.
2026-01-21T12:47:56.6662888Z Successfully removed non-blocking flag from /podr/container/pipe/5cc463e4262b_shileiagent0121-webapp/stderr_ab02263b0d694d759e9aef38b5fc0e01.
2026-01-21T12:47:56.6665058Z Creating container with image: appsvc/python:3.11_20251017.5.tuxprod from registry: 10.1.0.4:13209 and fully qualified image name: 10.1.0.4:13209/appsvc/python:3.11_20251017.5.tuxprod
2026-01-21T12:47:59.5686634Z Starting container: 5cc463e4262b_shileiagent0121-webapp.
2026-01-21T12:47:59.8913633Z Starting watchers and probes.
2026-01-21T12:47:59.8917863Z Starting metrics collection.
2026-01-21T12:47:59.8919190Z Container is running.
2026-01-21T12:48:00.2152001Z Container start method finished after 6605 ms.
2026-01-21T12:51:50.2815037Z Site startup probe failed after 230.0178137 seconds.
2026-01-21T12:51:50.4605879Z Failed to start site. Revert by stopping site.
2026-01-21T12:51:50.4705673Z Container is terminating. Grace period: 5 seconds.
2026-01-21T12:51:50.5261809Z Stop and delete container. Retry count = 0
2026-01-21T12:51:50.5268743Z Stopping container: 5cc463e4262b_shileiagent0121-webapp.
2026-01-21T12:51:55.6824470Z Deleting container: 5cc463e4262b_shileiagent0121-webapp. Retry count = 0
2026-01-21T12:51:57.0721351Z Container spec TerminationMessagePolicy path
2026-01-21T12:51:57.0723050Z Container is terminated. Total time elapsed: 6601 ms.
2026-01-21T12:51:57.0724157Z Site container: shileiagent0121-webapp terminated during site startup.
2026-01-21T12:51:57.0727441Z Site: shileiagent0121-webapp stopped.
To Reproduce
Steps to reproduce the behavior:
- Go to 'python\agent-framework\sample-agent', set up things according to the Configure Agent Testing
- Run
a365 config init,a365 setup all,a365 publishsuccessfully. - Run
a365 deploy. - See error.
Expected behavior
a365 deploy will deploy app and mcp successfully.
Screenshots
Attached above.
Environment (please complete the following information):
- OS: Windows 11 25H2
- SDK Version: A365 CLI (1.1.40-preview+4c5eb33773); UV (0.9.24 (0fda1525e 2026-01-09)); Python 3.14.0
Additional context
Add any other context about the problem here.
Reactions are currently unavailable
Metadata
Metadata
Labels
P2High priorityHigh priority