如何解决AzureResponseError:操作返回了无效的状态代码“未授权”
我已将我的应用从 GitHub 克隆到 Azure shell。当我尝试创建和部署 webapp 时,我遇到了一些错误。首先,我尝试了 az webapp up -n newappname
,但出现以下错误
然后我自己在门户中创建了一个 Web 应用程序,并尝试使用命令 az webapp up -n newappname_createdatportal
从 Azure shell 部署它。我收到以下错误
这里的任何建议将不胜感激!
解决方法
这似乎是旧 Azure CLI 版本的错误,运行 az upgrade --yes
并重新启动您的提示为我解决问题。
需要注意以下几点:
-
我的 Azure CLI 版本:2.18.0
-
我使用的命令:
az upgrade --yes #restart session and run this for authorizing az login az webapp up -n webappnamecreated
我尝试按照其他答案的建议更新 PUT my-index-000001
{
"mappings": {
"properties": {
"my_field": {
"type": "search_as_you_type"
}
}
}
}
{
"error": {
"root_cause": [
{
"type": "mapper_parsing_exception","reason": "No handler for type [search_as_you_type] declared on field [my_field]"
}
],"type": "mapper_parsing_exception","reason": "Failed to parse mapping [_doc]: No handler for type [search_as_you_type] declared on field [my_field]","caused_by": {
"type": "mapper_parsing_exception","reason": "No handler for type [search_as_you_type] declared on field [my_field]"
}
},"status": 400
}
命令行,但对我不起作用。
先尝试创建一个应用程序名称为 az
的应用服务计划,而不是执行 az webapp up -n appname
,然后只有在部署后才输入命令 appname
。这对我有用。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。