Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/41.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js &引用;插座挂起“/上传到Google云存储时出现EconReset错误_Node.js_Google Api_Google Cloud Storage_Google Api Nodejs Client - Fatal编程技术网

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包(它只适用于较长的堆栈跟踪)时,它就起作用了。我不知道为什么,但也许这对某人有帮助