这种情况发生在来自v4 - v7的各种节点版本中,也发生在AxiosJS和RequestJS中。
典型错误信息:
{ Error: socket hang up
at TLSSocket.onHangUp
...
code: 'ECONNRESET',发布于 2017-03-02 02:20:19
原来它的IIS6使用(现在)淘汰了ssl协议,NodeJS的开发被认为是不安全的,被列为默认ciphers
The connection to this site uses an obsolete protocol (TLS 1.0), andobsolete key exchange (RSA), and an obsolete cipher (3DES_EDE_CBC with HMAC-SHA1).修复/绕过此
在NodeJS中,添加ciphers: 'DES-CBC3-SHA'到request选项。
在Axios中,添加下面的请求选项,
httpsAgent: new https.Agent({
ciphers: 'DES-CBC3-SHA'
})在请求中,添加下面的请求选项,
agentOptions: {
ciphers: 'DES-CBC3-SHA'
}详情见:
https://github.com/nodejs/node/issues/10900#issuecomment-273834289
https://github.com/nodejs/node/issues/9845#issuecomment-264032107
https://stackoverflow.com/questions/42545683
复制相似问题