Skip to content
MtrXTools

curl: (52) Empty reply from server

The server closed the connection without replying

Seen in curl, libcurl (CURLE_GOT_NOTHING)

The TCP connection opened, but the server closed it without sending any HTTP response.

Common causes

  • Sending plain HTTP to a port that expects TLS, such as http://host:443.
  • The application crashed or hit a fatal error before writing a response.
  • A proxy, WAF or rate limiter dropped the request silently.
  • A service in a container listening only on 127.0.0.1, behind a port mapping that accepts the connection but has nothing to forward to.

How to fix it

  1. Check the scheme matches the port: https:// for TLS ports.
  2. Look at the application and proxy logs for crashes at the time of the request.
  3. Run curl -v to confirm the request was sent and nothing came back.
  4. Make services inside containers listen on 0.0.0.0, not 127.0.0.1.
Check the port is open

Got a different message? Paste it into the error explainer.

Related errors

All 34 Command line & code errors