Skip to content

HTTPS connection gets socket hang up #22945

Closed

Description

@ousiri
  • Version: v8.12.0
  • Platform: mac os. Darwin 17.5.0 Darwin Kernel Version 17.5.0: Mon Mar 5 22:24:32 PST 2018; root:xnu-4570.51.1~1/RELEASE_X86_64 x86_64
  • Subsystem: https

With the following code:

const https = require("https");

const req = https.get({
  hostname: 'g0agw.nie.netease.com',
  path: '/',
}, (res) => {
  console.log('done')
})
req.on('error', (e) => {
  console.error(e);
});
req.end()

And I am getting this error. The website doesn't support SSL3, but supports TLS 1.0 1.1 1.2

{ Error: socket hang up
    at createHangUpError (_http_client.js:335:15)
    at TLSSocket.socketOnEnd (_http_client.js:428:23)
    at TLSSocket.emit (events.js:132:15)
    at endReadableNT (_stream_readable.js:1101:12)
    at process._tickCallback (internal/process/next_tick.js:152:19) code: 'ECONNRESET' }
Error: 140735554880384:error:140943FC:SSL routines:ssl3_read_bytes:sslv3 alert bad record mac:../deps/openssl/openssl/ssl/s3_pkt.c:1500:SSL alert number 20

Setting ecdhCurve: 'auto' does't work. But nodejs v10.10 works fine.

Activity

  1. changed the title [-]HTTPS get[/-] [+]HTTPS connection gets socket hang up[/+] on Sep 19, 2018
  2. oyyd commented on Sep 22, 2018

    @oyyd
    Contributor

    @ousiri Can't reproduce this on my Mac. #20833 might be related.

    You can try to specify the secureProtocol.

  3. added
    cryptoIssues and PRs related to the crypto subsystem.
    httpsIssues and PRs related to the https subsystem.
    on Oct 4, 2018
  4. Trott commented on Oct 4, 2018

    @Trott
    Member

    The error in #23261 seems very similar. @nodejs/crypto

  5. ousiri commented on Oct 9, 2018

    @ousiri
    Author

    I cannot reproduce it now. closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    cryptoIssues and PRs related to the crypto subsystem.httpsIssues and PRs related to the https subsystem.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions