Find out why your server hangs up on Chrome
ERR_
Where the connection gets closed
During the HTTPS handshake
Chrome sends its first TLS message and the server ends the connection without answering. Whatever handles HTTPS read the message and chose not to go on, which can happen when it has no site or usable certificate for the hostname Chrome asked for.
At a proxy or filter in between
A load balancer, CDN or firewall that inspects traffic can close a connection it decides to block or can't pass on to your server. The close then comes from that layer, and your web server never sees the request.
When the HTTPS process exits
If the program terminating HTTPS restarts or quits after reading Chrome's message, its connections end with it. Because nothing was left unread, the operating system closes them cleanly, and Chrome reports a close rather than a reset.
On the visitor's computer
Antivirus, VPN or proxy software that intercepts HTTPS can hang up before the connection ever reaches your server. Chrome's error page for this code suggests checking firewall and proxy settings.
net_
Check whether the handshake finishes
# subject= means the server sent its certificate; an alert line means it refused the handshake
# "no peer certificate available" with no alert line above it means it hung up first
openssl s_client -connect yoursite.com:443 -servername yoursite.com </dev/null 2>&1 \
| grep -E '^subject=|no peer certificate|unexpected eof|alert'
# Ask the same server for another hostname you serve (www here) and compare
openssl s_client -connect yoursite.com:443 -servername www.yoursite.com </dev/null 2>&1 \
| grep -E '^subject=|no peer certificate|unexpected eof|alert'
Read what openssl prints
A
subject=line means the handshake got as far as the certificate, so the close happens later, after the request; the empty response guide, linked below, covers that stage. No peer certificate available, with no alert line above it, means the server closed the connection before sending a certificate; OpenSSL 3 and later also print unexpected eof while reading. That's the case Chrome reports as ERR_CONNECTION_ CLOSED. If an alert line appears above it, the server refused the handshake with an alert, which Chrome reports with an SSL code instead, such as ERR_ SSL_ UNRECOGNIZED_ NAME_ ALERT for a hostname the server doesn't recognize, as openssl_ ssl_ shows.util.cc If one hostname completes the handshake and the other doesn't, the HTTPS setup on that server is missing a name. If neither completes, read the error log of whatever terminates HTTPS, whether that's your web server, a load balancer or a CDN, while you run the test. OpenSSL's s_
client manual explains-servername, which sets the hostname the server sees during the handshake.
How to fix a connection that closes early
- Find the layer that terminates HTTPSWork out what answers on port 443 for the site: the web server, a load balancer or a CDN. The close comes from that layer or from something in front of it.
- Serve every hostname visitors useGive that layer a site and a valid certificate for each name, including the version with www and the version without it, then test each name with openssl.
- Read that layer's log during a testRun the openssl command while you watch the log. A rejected handshake, a crashed worker or a blocked client address can each leave a line there that names the reason.
- Check rules that drop clientsRate limits, bot filters and firewall rules can close connections from addresses they block. Look for your own address, or the visitor's, in their logs and lists.
Frequently asked questions
Is a stale kept-alive connection to blame?
Not if the error keeps coming back. A server may close an idle connection at any time, as RFC 9112 allows, and Chrome resends a request that failed on a reused connection, as http_
How can I tell if one computer is the cause?
Load the site from another device on the same network. If it works there, the cause is on the first computer, not your server.
What does Chrome show when the server closes after the handshake?
When the handshake finishes and the server then hangs up without sending a byte of the response, Chrome reports ERR_
Compare other early disconnects
- Website reliabilityHear about it when your site goes down, not days later from a customer.
- Connection resetWork out whether your server, a filter on the path or the visitor's setup is cutting connections, then stop it.
- Empty responseFind the crash, timeout or rule that makes your server hang up without answering, then make it respond.
- SSL version or cipher mismatchFind the TLS version or cipher your server and the browser don't share, then offer TLS 1.2 and 1.3.