简体   繁体   中英

NODE JS - Client network socket disconnected before secure TLS connection was established

I'm facing an error on running the node script which generates the PayPal invoices using SDK and when it runs from the local server it is working fine but when it runs on production server it is giving below error:

Uncaught Exception  
{
    "errorType": "Error",
    "errorMessage": "Client network socket disconnected before secure TLS connection was established",
    "code": "ECONNRESET",
    "path": null,
    "host": "api.paypal.com",
    "port": 443,
    "stack": [
        "Error: Client network socket disconnected before secure TLS connection was established",
        "    at TLSSocket.onConnectEnd (_tls_wrap.js:1095:19)",
        "    at Object.onceWrapper (events.js:286:20)",
        "    at TLSSocket.emit (events.js:203:15)",
        "    at TLSSocket.EventEmitter.emit (domain.js:448:20)",
        "    at endReadableNT (_stream_readable.js:1145:12)",
        "    at process._tickCallback (internal/process/next_tick.js:63:19)"
    ]
}

Version Details:

Node Js 10.x, TLS: 1.0

Did anybody face such errors?

"host": "api.paypal.com",

TLS: 1.0


PayPal requires TLS 1.2 https://developer.paypal.com/docs/api/info-security-guidelines/#usetls12

If that was a typo in your question and you are actually using 1.2, then you'll have to debug it more deeply.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM