我检查了 Google Cloud MySQL 日志,发现了以下日志。这种情况每 15 分钟发生一次。这是什么?我可以忽略它吗?MySQL 版本是 8.0.31。
[注意] [MY-000000] [服务器] 长度为 0,策略为 1
我尝试搜索但找不到任何文档。
我检查了 Google Cloud MySQL 日志,发现了以下日志。这种情况每 15 分钟发生一次。这是什么?我可以忽略它吗?MySQL 版本是 8.0.31。
[注意] [MY-000000] [服务器] 长度为 0,策略为 1
我尝试搜索但找不到任何文档。
我正在尝试使用 gcloud 命令行客户端在 Google Cloud Platform 中创建正常运行时间检查。这是一个示例:
gcloud monitoring uptime create 'example uptime check' --resource-labels=host=...,project_id=... --resource-type=uptime-url --protocol=https --port=443 "--path=..." --request-method=get --validate-ssl=true --status-codes=200 --matcher-type=contains-string "--matcher-content=..." --period=5 --timeout=30 --user-labels=instance-group=production,instance-type=authentication,monitoring-type=uptime
这通常有效,即创建了正常运行时间检查并且没有报告任何错误。但是,我的用户标签被默默忽略了。
我相信我正确地遵循了文档(https://cloud.google.com/sdk/gcloud/reference/monitoring/uptime/create):
--user-labels=[KEY=VALUE,…]
List of label KEY=VALUE pairs to add.
Keys must start with a lowercase character and contain only hyphens (-),
underscores (_), lowercase characters, and numbers. Values must contain only
hyphens (-), underscores (_), lowercase characters, and numbers.
我已成功向计算实例、磁盘等添加了非常相似的用户标签。
我也尝试通过 向现有的正常运行时间检查中添加用户标签gcloud monitoring uptime update
,但这也没有用。
更新:我已按照 Daniel t. 的建议创建了一个错误报告:https://issuetracker.google.com/issues/393989630
我正在测试在 BigQuery 上创建计划查询所需的权限。
[email protected]
计划查询将通过我可以模拟的服务帐户 ( ) 以编程方式创建。计划查询将以另一个服务帐户 ( [email protected]
) 的身份运行。
我已授予以下角色:
[email protected]
开启project1
[email protected]
帐户用户[email protected]
[email protected]
目标数据集 ( test_dataset
)[email protected]
作业用户project1
[email protected]
组织(因为查询正在使用该region-us.INFORMATION_SCHEMA.JOBS_BY_ORGANIZATION
视图)我在连接到(目标数据集在此项目中)时运行以下命令project1
。我也尝试使用 terraform 实现相同功能,但出现相同的错误消息。
gcloud config set auth/impersonate_service_account [email protected]
bq mk \
--transfer_config \
--target_dataset=test_dataset \
--display_name='test bq scheduled query' \
--params='{"destination_table_template":"test_jobs", "write_disposition":"WRITE_APPEND", "query":"SELECT job_id FROM `region-us.INFORMATION_SCHEMA.JOBS_BY_ORGANIZATION` WHERE DATE_TRUNC(creation_time, DAY) = '2025-01-22'"}' \
--data_source=scheduled_query \
[email protected]
我得到以下输出:
Updated property [auth/impersonate_service_account].
WARNING: This command is using service account impersonation. All API
calls will be executed as [[email protected]].
BigQuery error in mk operation:
Requesting user [email protected] does not have
iam.serviceAccounts.actAs permission to act as service account
[email protected]
该错误是谎言,因为[email protected]
已启用服务帐户用户角色[email protected]
,并且该角色包含iam.serviceAccounts.actAs
权限。
我是不是漏掉了什么?GCP 支持让我抓狂,一点帮助都没有。
(服务帐户、数据集和项目名称已更改)
我正在用 Python 部署一个简单的仪表板 Web 应用程序。有关部署的所有内容与以前有效的部署大致相同。(相同的 YAML、相同的身份验证代码等)
然而,当我部署下一个应用程序时,google cloud CLI 会抛出上述错误gcloud app create
。
ERROR: (gcloud.app.create) INVALID_ARGUMENT: The project must have a billing account attached
除了“稍后再试”之外,我在各个论坛上都找不到解决方案。据说这个方法有效。但仍然好奇为什么会出现这个错误/有没有更有经验的建议。
我正在通过 Google Cloud 中的安全指挥中心,发现以下安全问题:
后续步骤Next steps
请访问此 Google Cloud Platform 页面,它将帮助您解决影响 google.compute.Subnetwork 资源默认值的位置冲突问题。
请删除此资源以解决与“gcp.resourceLocations”组织政策相关的资源违规问题。
删除
当我去的时候VPC networks
我看到很多default
网络,但它们无法被删除。
我怎样才能删除它们?
我正在 COS(容器操作系统)实例上部署容器。非常简单。
我希望它每天重启。最好的方法是什么?我可以在虚拟机上设置一个简单的 CRON 选项卡吗?问题是每次重新部署虚拟机时都需要重新执行此操作。
遵循 GCP 提供的文档:https ://cloud.google.com/artifact-registry/docs/repositories/cleanup-policy
我在我的工件存储库上设置了清理策略,并启用了试运行选项,但无法使用该命令输出任何审计日志。
gcloud logging read 'protoPayload.serviceName="artifactregistry.googleapis.com" AND protoPayload.request.parent:"projects/gift-service-app-jm/locations/australia-southeast1/repositories/gcf-artifacts" AND protoPayload.request.validateOnly=true' \
--resource-names="projects/gift-service-app-jm" \
--project=gift-service-app-jm
我能够确认策略已设置,并且使用命令启用了试运行gcloud artifacts repositories describe gcf-artifacts
选项
{
"cleanupPolicies": {
"Delete Previous Versions": {
"action": "DELETE",
"condition": {
"olderThan": "864000s",
"tagState": "UNTAGGED"
},
"id": "Delete Previous Versions"
}
},
"cleanupPolicyDryRun": true,
"createTime": "2023-09-27T05:07:31.256470Z",
"description": "This repository is created and used by Cloud Functions",
"format": "DOCKER",
"labels": {
"goog-managed-by": "cloudfunctions"
},
"mode": "STANDARD_REPOSITORY",
"name": "projects/gift-service-app-jm/locations/australia-southeast1/repositories/gcf-artifacts",
"updateTime": "2024-07-10T05:39:56.088672Z"
}
以前有人遇到过这个问题吗?我已将所有者角色应用于我的 IAM 主体,但也尝试明确添加日志查看器和私有日志查看器角色。
我有一个带有启动脚本的 Google Cloud Compute Engine 实例模板。
在启动脚本中,服务器会生成证书。生成证书后,它会向 API 发送一条消息,告知中央系统有关证书的信息。请求如下所示:
curl --location 'https://my-side.com/hello?hostname=$hostname' \
--header 'Authorization: SUPER_SECRET_API_KEY'
API 密钥以原始文本形式存储在启动脚本中。这样可以吗,还是应该将其移至示例密钥存储?如果可以,那么我该如何读取启动脚本中的 API 密钥?
我在 GKE Autopilot 上运行的 Kubernetes 集群有一个不健康的节点。该节点有一个Ready
状态,但在其上运行的所有 Pod 都有一个CreateContainerError
状态,并且似乎在轮询容器映像时陷入困境。
例子:
(正常拉取 101 秒(x1326 超过 4 小时 49 分钟)kubelet 容器映像“gke.gcr.io/cluster-proportional-autoscaler:v1.8.10-gke.3@sha256:274afbfd520aef0933f1fefabddbb33144700982965f9e3632caabb055e912c6 “已经存在于机器上)。
kubernetes 升级时出现问题,因为我的帐户超出了配额(显然 1TB 的计算存储对于小型集群来说是不够的)。我获得了更多配额,但自动驾驶仪集群无法自行修复。
我“封锁”了该节点,将其标记为不可调度,并手动从中删除了我的 pod。新的 Pod 被安排在更健康的节点上,所以还不错。
现在我想打扫卫生。旧的 Pod 被困在Terminating
状态中,但强制删除它们会使它们消失。
我无法对kube-system
和gke-gmp-system
命名空间执行相同的操作。我看到“托管”pod 具有CreateContainerError
状态,并且它们正在循环中拉取容器映像。一个人也被某种Terminating
地位所困。
我想删除这个节点,显然你需要耗尽该节点并忽略名称空间中的错误kube-system
。我耗尽了节点,但它仍然存在。
如何删除不健康的节点?
我正在git clone
我的 Google Cloud Run 作业中克隆多个存储库(使用 ),其中之一使 Google Cloud 通过 exit 1 杀死容器。请参阅日志:
{
insertId: "xxx",
labels: {
instanceId: "xxx"
run.googleapis.com/execution_name: "xxx",
run.googleapis.com/task_attempt: "0",
run.googleapis.com/task_index: "0"
},
logName: "xxx/run.googleapis.com%2Fstderr",
receiveTimestamp: "2024-03-13T09:05:28.686787232Z",
resource: {
labels: {
job_name: "xxx",
location: "xxx",
project_id: "xxx"
},
type: "cloud_run_job"
},
textPayload: "Killed",
timestamp: "2024-03-13T09:05:28.685133Z"
}
克隆的存储库有 10.828 个文件,大小为 1.8 GB。内存和CPU使用率均未超过50%。它发生在 期间。git clone [email protected]:usr/bad_repo.git
我认为这与限制有关,但我没有找到任何东西。
重现步骤:
git clone -q --depth 1 --no-tags --filter=blob:limit=100k [email protected]:supabase/supabase.git
所有日志: