You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

无法访问Google Cloud实例:串口/SSH/外部IP失效,元数据网络错误

Google Cloud实例网络异常问题(无法访问元数据服务器、SSH/外部IP连接失败,需避免重启)

我在使用串口连接Google Cloud实例时遇到问题,执行命令:

gcloud compute connect-to-serial-port instance-1

返回如下错误信息:

Sep 20 14:28:35 instance-1 OSConfigAgent[670]: 2022-09-20T14:28:35.5396Z OSConfigAgent Error main.go:196: network error when requesting metadata, make sure your instance has an active network and can reach the metadata server: Get http://169.254.169.254/computeMetadata/v1/?recursive=true&alt=json&wait_for_change=true&last_etag=b6d33d232458e45a&timeout_sec=60: dial tcp 169.254.169.254:80: connect: network is unreachable
Sep 20 14:29:33 instance-1 OSConfigAgent[670]: 2022-09-20T14:29:33.5432Z OSConfigAgent Warning: Error waiting for task (attempt 10 of 10): error fetching Instance IDToken: error getting token from metadata: Get http://169.254.169.254/computeMetadata/v1/instance/service-accounts/default/identity?audience=osconfig.googleapis.com&format=full: dial tcp 169.254.169.254:80: connect: network is unreachable

除此之外,该实例还存在以下问题:

  • 无法通过外部IP访问
  • SSH连接失败(对应错误截图:SSH连接失败提示)

当前实例的网络规则配置显示为:允许相关流量的基础规则配置状态

由于Jenkins正在运行长时间任务,重启实例会导致全天运行时长丢失,因此需要寻求无需重启实例的解决办法。


内容的提问来源于stack exchange,提问作者JAMSHAID

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.19 00:05:22