4

We run a curl command regularly, and suddenly last night it started giving us errors. The error is this:

curl: (35) gnutls_handshake() failed: Error in the pull function.

Our server is Ubuntu 16.04.3 with all the upgrades and a fresh reboot.

The URL we are trying to request is HTTPS. It works if we request it from Chrome, but not from curl.

Any ideas? Thanks.

1 Answer 1

0

This problem may have to do with the fact our Linux was running as a virtual server. But this is how we fixed the problem:

We were requesting URL using the IP address of the server, and then adding a header with the Host: and domain name. Instead of using the IP address, we just used the domain name. That solved it.

2
  • 1
    You need to use the hostname for the SNI protocol to work and let the server find out which website you like. The Host header in HTTP is already too late as inside the TLS stream where the server may need to know which website you want to give back the appropriate certificate to establish the TLS stream. Jan 20, 2018 at 0:22
  • Hi Petrick, How can I still force it if I want to keep debugging?
    – confiq
    Jul 23, 2018 at 10:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .