-1

I am trying to get staff information like name and email using GID but the following Errors appears while trying to send Post request.

Error: write EPROTO 101057795:error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake

at WriteWrap.afterWrite [as oncomplete] (net.js:864:14) code: 'EPROTO', errno: 'EPROTO', syscall: 'write' }

this is how my code looks like

var request = require('request');

// Set the headers
var headers = {
    'User-Agent':       'deprecated',
    'accepted':     'application/json',
    'applicationuser':'deprecated'

}
// Configure the request
var options = {
    url: 'https://***/***/persons/gid=***',
    method: 'POST',
    secureProtocol : "TLSv1_2_method",
    headers: headers
}

// Start the request
request(options, function (error, response, body) {
    if (!error && response.statusCode == 200) {
        // Print out the response body
        console.log(body)
    }
    else{console.log(error)}
})
Alex
  • 267
  • 1
  • 3
  • 18
  • https://github.com/nodejs/node/issues/3692 – James Dec 07 '18 at 15:11
  • 1
    @james what do you think the solution should be? is there any thing to add to the snippet code above ? – Alex Dec 07 '18 at 19:07
  • 1
    It points to a problem with certain versions of openSSL having difficulty downgrading a connection when trying to connect through a load balancer to a group of servers that don't all have the same version of TLS. I don't know if upgrading to a newer openSSL will fix it but I'd give it a go. – James Dec 07 '18 at 19:26
  • 1
    how can i try to upgrade the version of openSSL? i am just new with this topic :( – Alex Dec 07 '18 at 19:31
  • 1
    I've never done it. I would google it. – James Dec 07 '18 at 19:41

1 Answers1

2

The error comes from the response; actually the route function response this. Usually it is because you need a certificate is not the correct one. You can check more about it Solving sslv3 alert handshake failure when trying to use a client certificate

fp007
  • 412
  • 1
  • 4
  • 18
  • what do you think the solution should be? is there any thing to add to the snippet code above ? – Alex Dec 07 '18 at 16:27
  • you need to check the documentation of your client, or the web you're trying to do – fp007 Dec 11 '18 at 14:12