使用Azure cli部署Webapp进行部署时出错

时间:2019-11-14 23:18:10

标签: azure azure-web-sites

尝试部署到Azure Web应用程序时出现此错误。我已经更新到最新版本的Azure Cli,并且此过程可以正常工作。我不确定下一步该怎么做。

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)

2 个答案:

答案 0 :(得分:0)

要对此进行详细说明,有两种类型的错误:验证错误和部署错误。两种类型的错误都出现在activity log中。验证错误是由于模板中的语法错误或试图部署超出预订配额的资源而引起的,但是当操作通过验证且在部署过程中失败时,可能会遇到部署错误 若要使用Azure CLI查看部署错误代码和消息,可以使用以下命令:

az组部署操作列表--name exampledeployment -g examplegroup --query“ [*]。properties.statusMessage”

您可以参考以下文档链接: 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

答案 1 :(得分:0)

问题最终出在SCM掉线了。我们扩大了应用程序的规模,从而为我们创建了新实例。之后,我可以进行部署。 Azure显示无法通过KUDU提供服务