简体   繁体   English

使用 Azure cli 部署 webapp 时出错

[英]Error deploying using Azure cli to deploy webapp

I'm getting this error when trying to deploy to Azure Web app.尝试部署到 Azure Web 应用程序时出现此错误。 I've updated to the newest version of Azure Cli and this process used to work.我已经更新到最新版本的 Azure Cli 并且这个过程曾经有效。 I'm not sure what to do next.我不确定下一步该怎么做。

az webapp deployment source config-zip --resource-group $azure_resourcegroup --name $azure_webapp_name --src $package_filepath --timeout 3600


+     & az webapp deployment source config-zip --resource-group $azure_ ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (WARNING: Gettin... zip deployment:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError

WARNING: Starting zip deployment. This operation can take a while to complete ...
ERROR: The command failed with an unexpected error. Here is the traceback:
ERROR: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
  File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-xo02umyl\knack\knack\cli.py", line 206, in invoke
  File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-xo02umyl\azure-cli-core\azure\cli\core\commands\__init__.py", line 603, in execute
  File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-xo02umyl\azure-cli-core\azure\cli\core\commands\__init__.py", line 661, in _run_jobs_serially
  File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-xo02umyl\azure-cli-core\azure\cli\core\commands\__init__.py", line 654, in _run_job
  File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-xo02umyl\six\six.py", line 693, in reraise
  File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-xo02umyl\azure-cli-core\azure\cli\core\commands\__init__.py", line 631, in _run_job
  File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-xo02umyl\azure-cli-core\azure\cli\core\commands\__init__.py", line 305, in __call__
  File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-xo02umyl\azure-cli-core\azure\cli\core\__init__.py", line 485, in default_command_handler
  File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-xo02umyl\azure-cli\azure\cli\command_modules\appservice\custom.py", line 328, in enable_zip_deploy
  File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-xo02umyl\azure-cli\azure\cli\command_modules\appservice\custom.py", line 2332, in _check_zip_deployment_status
  File "C:\Users\VSSADM~1\AppData\Local\Temp\pip-install-xo02umyl\requests\requests\models.py", line 889, in json
  File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\json\__init__.py", line 354, in loads
    return _default_decoder.decode(s)
  File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\json\decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\lib\json\decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

The problem ended up being that the SCM was down.问题最终是 SCM 出现故障。 We scaled our apps up that that created new instances for us.我们扩展了为我们创建新实例的应用程序。 I was able to deploy after that.之后我就可以部署了。 Azure was showing service not available via KUDU Azure 显示无法通过 KUDU 提供服务

To elaborate on this there are two types of error Validation error and Deployment error.为了详细说明这一点,有两种类型的错误验证错误和部署错误。 Both types of errors appear in the activity log .这两种类型的错误都会出现在活动日志中。 Validation error arise due to syntax errors in your template or trying to deploy resources that would exceed your subscription quotas but when operation passes validation, and fails during deployment, you may get a deployment error To see deployment error codes and messages with Azure CLI, you may use below command:由于模板中的语法错误或尝试部署超出订阅配额的资源而出现验证错误,但当操作通过验证并在部署期间失败时,您可能会收到部署错误要使用 Azure CLI 查看部署错误代码和消息,您可以使用以下命令:

az group deployment operation list --name exampledeployment -g examplegroup --query "[*].properties.statusMessage"

You may refer to below doc links: https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-common-deployment-errors#azure-cli您可以参考以下文档链接: https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-common-deployment-errors#azure-cli

https://docs.microsoft.com/en-us/cli/azure/webapp/deployment/source?view=azure-cli-latest#az-webapp-deployment-source-config-zip https://docs.microsoft.com/en-us/cli/azure/webapp/deployment/source?view=azure-cli-latest#az-webapp-deployment-source-config-zip

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM