【问题标题】:ERROR: gcloud crashed (AttributeError): 'Thread' object has no attribute 'isAlive'错误:gcloud 崩溃(AttributeError):“线程”对象没有属性“isAlive”
【发布时间】:2020-11-27 08:56:32
【问题描述】:

当尝试通过 iap 连接到 VM 时,macO 会出现问题。相同的命令可以在具有相同凭据的另一个系统上运行,因此必须与我的本地环境有关。

这是我要运行的命令:

gcloud compute ssh **** --project=**** --zone=europe-west4-a --tunnel-through-iap

它失败并出现此错误:

ERROR: gcloud crashed (AttributeError): 'Thread' object has no attribute 'isAlive'

If you would like to report this issue, please run the following command:
  gcloud feedback

To check gcloud for common problems, please run the following command:
  gcloud info --run-diagnostics
kex_exchange_identification: Connection closed by remote host
ERROR: (gcloud.compute.ssh) [/usr/bin/ssh] exited with return code [255].

Google 没有给我任何答案

【问题讨论】:

    标签: macos gcloud


    【解决方案1】:

    这似乎是一个 python 问题。我猜你使用的 Python3 太新了。请使用 Python 3.5 - 3.8 或 Python 2.7.9 或更高版本。

    这里是文档: https://cloud.google.com/sdk/docs/install#mac

    【讨论】:

    • 这解决了问题!正在使用 Python 3.9
    • 文档不准确地指出支持所有 python 3 版本 - 它仅在 python 3.5 和 3.8 之间“推荐”。应该更新了
    【解决方案2】:

    gcloud 包装了主机的 ssh 二进制文件,当您使用 gcloud compute ssh ... 时,您正在运行 ssh(根据错误 /usr/bin/ssh),其中一些 args 由 gcloud 为您生成。

    该错误表明您的主机无法连接到远程计算机并使用ssh 访问它。

    一种方法是通过gcloud compute ssh .... --log-http 获取gcloud 以输出完整的ssh 命令。然后,您可以尝试直接重现 ssh 命令以确定错误。

    或者,您可以添加 gcloud ... --verbosity=debug 以获得更广泛的日志记录。

    确认实例正在运行,您可以访问它,并且您可以ssh 访问它。你可以试试telnet [[host IP]] 22

    【讨论】:

      猜你喜欢
      • 2020-08-24
      • 1970-01-01
      • 2019-11-23
      • 2021-07-31
      • 1970-01-01
      • 1970-01-01
      • 2020-07-31
      • 2021-03-18
      • 1970-01-01
      相关资源
      最近更新 更多