java - App Engine Flexible - Java SDK 的问题理解安装错误?
问题描述
我目前正在尝试一个简单的 App Engine Flexible 应用程序并努力解决我认为的设置和权限问题。我尝试了各种不同的安装方法 - 使用 gcloud 和 Maven,以及添加了应用程序引擎的 IntelliJ,但它们都失败了。
下面是控制台的输出:
ERROR: (gcloud.app.deploy) Error Response: [13] Flex operation projects/n*********/regions/us-central1/operations/6360c25d-5d39-4035-a5d9-fa11cff89d1c error [INTERNAL]: An internal error occurred while processing task /appengine-flex-v1/insert_flex_deployment/flex_create_resources>2020-06-23T21:37:26.966Z10514.ow.2: Deployment Manager operation n**********/operation-1592948248075-5a8c72a78db77-432a52c5-14b80019 errors: [code: "RESOURCE_ERROR"
location: "/deployments/aef-default-20200623t223343/resources/aef-default-20200623t223343"
message: "{\"ResourceType\":\"compute.beta.regionAutoscaler\",\"ResourceErrorCode\":\"403\",\"ResourceErrorMessage\":{\"code\":403,\"message\":\"The caller does not have permission\",\"status\":\"PERMISSION_DENIED\",\"statusMessage\":\"Forbidden\",\"requestPath\":\"https://compute.googleapis.com/compute/beta/projects/n**********/regions/us-central1/autoscalers\",\"httpMethod\":\"POST\"}}"
]
Failed to deploy '[2020-06-23 22:33:38] test2.jar. Project: n********. Version: auto': Deployment failed with exit code: 1
Please make sure that you are using the latest version of the Google Cloud SDK.
Run ''gcloud components update'' to update the SDK. (See: https://cloud.google.com/sdk/gcloud/reference/components/update.)
当我打开状态消息时,内部出现以下错误:
"error": {
"code": 401,
"message": "Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.",
"errors": [
{
"message": "Login Required.",
"domain": "global",
"reason": "required",
"location": "Authorization",
"locationType": "header"
}
],
"status": "UNAUTHENTICATED"
}
遵循 Google 快速入门和其他一些示例后,我很难理解出了什么问题以及我需要做些什么来解决这个问题。任何见解将不胜感激。
解决方案
我有同样的问题。然后我找到了这个线程。是俄语的。您可能需要翻译该页面。'flex' 术语有点伪 btw。
它说您可以为用于您的 Google App Engine 的实例设置一个介于 1 和 2 之间的范围,或者将其固定为 2 个实例。
您可以在 app.yaml 中进行设置:
自动缩放(范围)
runtime: custom
env: flex
automatic_scaling:
min_num_instances: 1
max_num_instances: 2
手动缩放(固定)
runtime: custom
env: flex
manual_scaling:
instances: 2
推荐阅读
- php - 从 Laravel 中的 .env 返回数据类型
- c# - 在 nopCommerce 插件中覆盖视图时,当前上下文中不存在名称“T”
- ios - AVPlayer 支持 2.35:1 电影比例
- xamarin.android - Square:如何将 Square 应用内支付 api 与 Xamarin.iOS 和 Android 集成?
- scala - 如何在 Scala 中向上转换集合?
- c# - IoT 中心 RegistryManager - 如何从后端更改设备的主键?
- c# - HttpResponseMessage PostAsync 没有响应
- reactjs - Create-React-App 构建文件夹缺少文件
- html - Html暗模式切换2层
- java - 用 JPA 标准替换休眠创建标准时的问题