【问题标题】:Randomly getting Cloud Storage Error: UNAUTHORIZED随机获取云存储错误:未经授权
【发布时间】:2015-04-22 13:32:54
【问题描述】:

今天,我开始收到此错误消息,据我所知,没有任何原因。这不是一个一致的错误。今天是随机开始的。它昨天运行良好,并且连续数周没有任何错误。

我在文件中只有file_get_contents()

一段时间以来,我一直在为get_image.php 使用相同的代码,但直到现在我才收到此错误。

有谁知道为什么这会随机而不是连续发生?

[20/Feb/2015:10:53:53 -0800] "POST /get_image HTTP/1.1" 200 149 - - "website.com" ms=296 cpu_ms=86 cpm_usd=0.000017 pending_ms=160 instance=<string> app_engine_release=1.9.18

W 13:53:53.815 PHP Warning:  Cloud Storage Error: UNAUTHORIZED in /base/data/home/runtimes/php/sdk/google/appengine/ext/cloud_storage_streams/CloudStorageReadClient.php on line 310
W 13:53:53.815 PHP Warning:  file_get_contents(gs://bucket/image/page_1.png): failed to open stream: "\google\appengine\ext\cloud_storage_streams\CloudStorageStreamWrapper::stream_open" call failed in /base/data/home/apps/..../get_image.php on line 10

编辑:对于寻找此问题更新的任何人,go to this bug report

根据 Stuart Langley 的帖子,暂时将此添加到您的代码中作为临时修复。

apc_delete('_ah_app_identity_:https://www.googleapis.com/auth/devstorage.read_only');
apc_delete('_ah_app_identity_:https://www.googleapis.com/auth/devstorage.read_write');

【问题讨论】:

  • 自昨天部署 1.9.18 以来,我一直遇到同样的问题 - 我已经能够通过终止所有正在运行的实例并让 GAE 启动新实例来暂时解决它,但问题会返回几个几小时后。
  • 我也遇到了这个问题。但这不是随机的。它适用于所有文件请求。
  • 我已经做过@StuartLangley code.google.com/p/googleappengine/issues/…
  • 这里有同样的问题。在 2 月 19 日开始出现这些错误之前,我的应用程序运行了好几个月都没有问题。

标签: php google-app-engine google-cloud-storage


【解决方案1】:

据 Stuart 所说,该错误已得到修复。您不应该再无缘无故地随机收到此错误。

【讨论】:

    猜你喜欢
    • 2022-01-18
    • 1970-01-01
    • 2023-03-27
    • 2011-08-14
    • 1970-01-01
    • 2019-10-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多