Running the command curl -v https://myhost
, curl shows the error curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to IP:PORT
What might be the root issue?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Sign up to join this communityIn 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