Node.js &引用;插座挂起“/上传到Google云存储时出现EconReset错误
我们使用谷歌云存储来存储用户上传的图片。由于某种原因,它今天停止工作了Node.js &引用;插座挂起“/上传到Google云存储时出现EconReset错误,node.js,google-api,google-cloud-storage,google-api-nodejs-client,Node.js,Google Api,Google Cloud Storage,Google Api Nodejs Client,我们使用谷歌云存储来存储用户上传的图片。由于某种原因,它今天停止工作了 var googleapis = require('googleapis'); var GoogleAuth = require('google-auth-library'); var googleAuth = new GoogleAuth(); var authClient = new googleAuth.JWTClient( accountEmail, keyFile, null, 'https://
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云存储的连接。我使用的是Node v0.12,需要longjohn软件包。当我排除longjohn包(它只适用于较长的堆栈跟踪)时,它就起作用了。我不知道为什么,但也许这对某人有帮助