首页 文章

GAE因401而刷新(尝试1/2)

提问于
浏览
5

我使用gcloud app deploy部署应用程序 . 它运行良好几个小时,然后工作陷入以下信息日志:

03:54:59.748 Refreshing due to a 401 (attempt 1/2)
03:58:44.816 Refreshing due to a 401 (attempt 1/2)
03:58:55.781 Refreshing due to a 401 (attempt 1/2)
03:58:56.317 Refreshing due to a 401 (attempt 1/2)

好像它是从内部serviceName记录的:“appengine.googleapis.com”

部署的应用程序从GCS读取一些文件,并使用google pubsub发布一些计算的指标 . 我使用谷歌客户端API库,它使用凭据进行身份验证 .

credentials = GoogleCredentials.get_application_default()
    if credentials.create_scoped_required():
        credentials = credentials.create_scoped(['https://www.googleapis.com/auth/devstorage.read_only)
    http = httplib2.Http()
    credentials.authorize(http)
    return discovery.build('storage', 'v1', http=http)

pubsub的类似片段也是如此 . 有任何人遇到类似的问题,其中请求似乎永远停留在显示401状态代码的信息日志 . 不确定为什么请求不会超时并导致失败 . 任何变通方法?

1 回答

相关问题