curl error SSL_ERROR_SYSCALL

Running the command curl -v , curl shows the error curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to IP:PORT

What might be the root issue?

2 Answers

In my case the issue was not with curl or the host curl was running on, but with the webserver, nginx which I was curling.

TLS was not properly configured in the web server, which resulted in the curl error. The fix for my server was to add the required lines ssl_certificate and ssl_certificate_key.

In nginx.conf:

server { listen 80; listen 443 ssl; ssl_certificate /path/to/fullchain.pem; # <-- this line was missing ssl_certificate_key /path/to/privkey.pem; # <-- this line was missing
}

for me the problem was with my router. I have a PPPoE Internet connection and the MTU size is less then the default 1500. So what I had to do is set a firewall rule about mss clamping in ther router:

# iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu

more info about this issue here

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like