【问题标题】:gcloud is crashing while authenticating service account key with error: gcloud crashed (OperationalError): disk I/O errorgcloud 在验证服务帐户密钥时崩溃并出现错误:gcloud crashed (OperationalError): disk I/O error
【发布时间】:2020-12-03 06:03:24
【问题描述】:

我正在尝试运行以下命令:gcloud auth activate-service-account --key-file service_account_key.json

我得到如下错误输出的帖子:

ERROR: gcloud crashed (OperationalError): disk I/O error

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

运行 gcloud 诊断会得到以下输出:

Network diagnostic detects and fixes local network connection issues.
Checking network connection...done.
Reachability Check passed.
Network diagnostic passed (1/1 checks passed).

Property diagnostic detects issues that may be caused by properties.
Checking hidden properties...done.
Hidden Property Check passed.
Property diagnostic passed (1/1 checks passed).

早期诊断用于给出无法访问 google 服务的错​​误,该错误已通过设置代理修复,然后身份验证开始工作。但现在代理设置失败了(代理工作正常)。

诊断程序都没有提供足够的有关崩溃的信息,也没有提供错误消息本身。

以下是 gcloud 版本信息:

$ gcloud version
Google Cloud SDK 254.0.0
bq 2.0.45
core 2019.07.15
gsutil 4.40
Updates are available for some Cloud SDK components.  To install them,
please run:
  $ gcloud components update

我也试过 --verbose 也没有太大帮助。

【问题讨论】:

  • 你能从另一台主机上试试这个命令吗?这将有助于消除您本地的gcloud 安装问题。您可能希望使用 Cloud Shell 尝试该命令。您可以gcloud alpha cloud-shell scp ...(密钥文件)然后gcloud alpha-cloud-shell ssh 进入 Cloud Shell 以重试该命令。
  • 我尝试从本地和云 shell 运行命令都成功运行。即使安装有问题,考虑到共享主机上的某个人把它搞砸了。由于它之前工作,由于错误消息,我无法深入研究问题。
  • OperationalError 的唯一出现似乎是使用 sqlite (google.com/search?q=OperationalError+disk+I%2FO+error)。我假设(!?)gcloud 使用它来存储配置(~/.config/gcloud)。如果属实,则这些文件之一可能存在损坏,这可能会导致问题。如果您有 Google 支持,那可能是一个不错的下一步。
  • 考虑先更新您的 GCLOUD SDK。你落后了 50 个版本!

标签: google-cloud-platform cloud gcloud


【解决方案1】:

根据@guillaume 的建议,我将 gcloud SDK 更新到了最新版本,并收到了更详细的错误消息,我能够解决这个问题。

WARNING: Could not store access token in cache: disk I/O error
[Step 1/1] ERROR: gcloud crashed (OperationalError): disk I/O error

gcloud 写入配置的默认位置 (/.config/gcloud) 需要清理。我们将 config 目录本身更新为新目录,因为我们对先前指定目录的访问权限有限,否则清理就足够了。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-08-26
    • 1970-01-01
    • 2021-10-29
    • 2019-06-09
    • 1970-01-01
    • 1970-01-01
    • 2020-08-29
    • 1970-01-01
    相关资源
    最近更新 更多