首页 > 解决方案 > 将 WAR 文件部署到 Azure Web 服务时,它未显示在服务器 URL 中,但管道已成功运行

问题描述

我正在将 WAR 文件部署到 Azure 的应用程序服务器中,我的管道构建成功,但我的 Web 应用程序未显示在服务器 URL 中,有人可以告诉我我错过了哪里吗?

2020-04-20T14:01:09.3660179Z ##[section]Starting: Deploy War to Azure App Service
2020-04-20T14:01:09.3766431Z 
==============================================================================
2020-04-20T14:01:09.3766892Z Task         : Azure App Service deploy
2020-04-20T14:01:09.3767548Z Description  : Deploy to Azure App Service a web, mobile, or API app 
using Docker, Java, .NET, .NET Core, Node.js, PHP, Python, or Ruby
2020-04-20T14:01:09.3767944Z Version      : 4.163.5
2020-04-20T14:01:09.3768213Z Author       : Microsoft Corporation
2020-04-20T14:01:09.3768522Z Help         : https://aka.ms/azureappservicetroubleshooting
2020-04-20T14:01:09.3768901Z 
==============================================================================
2020-04-20T14:01:10.5416719Z Got service connection details for Azure App Service:'jpetstore01'
2020-04-20T14:01:13.1232245Z Package deployment using WAR Deploy initiated.
2020-04-20T14:01:28.4292592Z Deploy logs can be viewed at 
https://jpetstore01.scm.azurewebsites.net/api/deployments/9d03f1b9973b489e898d2aedfd5f7129/log
2020-04-20T14:01:28.4294018Z Successfully deployed web package to App Service.
2020-04-20T14:01:34.2874810Z Successfully updated App Service configuration details
2020-04-20T14:01:36.5781456Z Successfully updated deployment History at 
https://jpetstore01.scm.azurewebsites.net/api/deployments/41587391294722
2020-04-20T14:01:38.3127393Z App Service Application URL: http://jpetstore01.azurewebsites.net
2020-04-20T14:01:41.0462523Z ##[section]Finishing: Deploy War to Azure App Service

这是我的管道日志,它说部署成功,但我无法在http://jpetstore01.azurewebsites.net中获取 Web 应用程序。有人可以帮我弄这个吗?

标签: azuredeploymentazure-devopsazure-web-app-serviceweb-deployment

解决方案


我估计war文件可能有问题,应该是解压后路径错误。建议如下图操作。并重命名新的 zip/war 文件。

在此处输入图像描述

然后就可以根据 文档进行操作了。建议登录 URL https://<app_name>.scm.azurewebsites.net/ZipDeployUI,然后拖放 zip/war 文件进行更新。


推荐阅读