【问题标题】:"Socket Hang Up" / ECONNRESET Error while uploading to Google Cloud Storage上传到 Google 云存储时出现“套接字挂断”/ECONNRESET 错误
【发布时间】:2015-11-07 00:03:31
【问题描述】:

我们正在使用 Google Cloud Storage 来存储用户上传的图片。由于某种原因,它今天停止工作。

var googleapis = require('googleapis');
var GoogleAuth = require('google-auth-library');

var googleAuth = new GoogleAuth();
var authClient = new googleAuth.JWTClient(
    accountEmail, keyFile, null,
    'https://www.googleapis.com/auth/devstorage.read_write'
);

authClient.authorize(function (err) {
    // Error here: { [Error: socket hang up] code: 'ECONNRESET' }
});

看来我无法建立与 Google Cloud Storage 的连接。

【问题讨论】:

    标签: node.js google-api google-cloud-storage google-api-nodejs-client


    【解决方案1】:

    我使用的是 Node v0.12 并且需要 longjohn 包。当我排除 longjohn 包(仅用于更长的堆栈跟踪)时,它可以工作。我不知道为什么,但也许它对某人有帮助。

    【讨论】:

      猜你喜欢
      • 2015-09-19
      • 1970-01-01
      • 1970-01-01
      • 2015-08-27
      • 2018-10-02
      • 2015-06-26
      • 2020-12-28
      • 2014-08-01
      • 1970-01-01
      相关资源
      最近更新 更多