Connection to site refused

I have deployed a react application on netlify but often when I try to access the website or the preview deploy I get ERR_CONNECTION_CLOSED
saying “The server closed the connection unexpectedly”.

Please help with the issue.

hi @jsparmani and welcome to our community!

That’s not a usual symptom on our service - could you tell me the URL you access your site at when you get these errors (something like https://yoursite.netlify.com or https://yourcustomdomain.com), so I can take a look at its config and see if I can help you figure out what is wrong?

I am seeing this as well with a new manually deployed site.

The APP-ID url is working correctly https://3347deac-3d86-419a-a40c-085f2fca0b53.netlify.com/, but the custom site name isn’t resolving https://garden-v7.netlify.com/.

The custom name was resolving correctly when the site was first created, but started to fail within a few minutes.

Hi, @austin94, the custom domain is resolving for all tested locations here:

Would it be possible for you to install dig locally? If so, the output of the following command might tell us why the DNS lookup isn’t working for you locally:

dig garden-v7.netlify.com +trace

Here are the last few lines when I test (and it works for me):

$ dig garden-v7.netlify.com +trace | tail -n 4

garden-v7.netlify.com.	20	IN	A	104.248.78.24
;; Received 66 bytes from 45.54.30.65#53(ns02.netlifydns.com) in 31 ms

That IP address above is for one of our CDN nodes near San Francisco (the closest one to me) and the DNS server that answered was one we control. I would be curious to see the output from your local system to see what it returns.

It looks the issue has resolved itself. I can now view https://garden-v7.netlify.com locally.

Here is the dig output:


; <<>> DiG 9.10.6 <<>> garden-v7.netlify.com +trace
;; global options: +cmd
.			518400	IN	NS	a.root-servers.net.
.			518400	IN	NS	b.root-servers.net.
.			518400	IN	NS	c.root-servers.net.
.			518400	IN	NS	d.root-servers.net.
.			518400	IN	NS	e.root-servers.net.
.			518400	IN	NS	f.root-servers.net.
.			518400	IN	NS	g.root-servers.net.
.			518400	IN	NS	h.root-servers.net.
.			518400	IN	NS	i.root-servers.net.
.			518400	IN	NS	j.root-servers.net.
.			518400	IN	NS	k.root-servers.net.
.			518400	IN	NS	l.root-servers.net.
.			518400	IN	NS	m.root-servers.net.
;; Received 420 bytes from 127.0.0.1#53(127.0.0.1) in 9 ms

com.			172800	IN	NS	a.gtld-servers.net.
com.			172800	IN	NS	b.gtld-servers.net.
com.			172800	IN	NS	c.gtld-servers.net.
com.			172800	IN	NS	d.gtld-servers.net.
com.			172800	IN	NS	e.gtld-servers.net.
com.			172800	IN	NS	f.gtld-servers.net.
com.			172800	IN	NS	g.gtld-servers.net.
com.			172800	IN	NS	h.gtld-servers.net.
com.			172800	IN	NS	i.gtld-servers.net.
com.			172800	IN	NS	j.gtld-servers.net.
com.			172800	IN	NS	k.gtld-servers.net.
com.			172800	IN	NS	l.gtld-servers.net.
com.			172800	IN	NS	m.gtld-servers.net.
com.			86400	IN	DS	30909 8 2 E2D3C916F6DEEAC73294E8268FB5885044A833FC5459588F4A9184CF C41A5766
com.			86400	IN	RRSIG	DS 8 1 86400 20200304050000 20200220040000 33853 . iNQCz+w0KzFRSOLDC6Om9LqGiYRu3QQLsDS8+ADaOehpMGTnYCFTPWuw b2M9etAuhQ9sUGIE4IZtS/3LwhgRMWSOx+yWcyWNk39sXi/RbUHQ50hr NfiMUQ9CjCb5Gg1qEKtxOD+qT1qI4SLlZyrwkqwW90j4izBsjrzp8WEN 2YV8qDVqzT6WRbAodOzbxlitZNWRuy//b/CwZBtz0OINfcXCdGj91hFq yiMrv+Gfgs/tPgIEkwn6loUXQhFEv4tHZlbXaX6/6poussxCPEuP/BYW fAF7114ed4R1PPP74wYdIXuVAHX3g8L3fTlcFYDvvqAlYA+lNlkzstc7 KmzfAw==
;; Received 1181 bytes from 192.203.230.10#53(e.root-servers.net) in 10 ms

netlify.com.		172800	IN	NS	dns1.p04.nsone.net.
netlify.com.		172800	IN	NS	dns2.p04.nsone.net.
netlify.com.		172800	IN	NS	dns3.p04.nsone.net.
netlify.com.		172800	IN	NS	dns4.p04.nsone.net.
netlify.com.		172800	IN	NS	ns01.netlifydns.com.
netlify.com.		172800	IN	NS	ns02.netlifydns.com.
netlify.com.		172800	IN	NS	ns03.netlifydns.com.
netlify.com.		172800	IN	NS	ns04.netlifydns.com.
CK0POJMG874LJREF7EFN8430QVIT8BSM.com. 86400 IN NSEC3 1 1 0 - CK0Q1GIN43N1ARRC9OSM6QPQR81H5M9A  NS SOA RRSIG DNSKEY NSEC3PARAM
CK0POJMG874LJREF7EFN8430QVIT8BSM.com. 86400 IN RRSIG NSEC3 8 2 86400 20200227054927 20200220043927 56311 com. A7zRR2FLhyIgXRnCDNNvgAx2rJS8Rmn1XVVobuXfiDuGSvok2VpUPFfq cSN1rspiJJxCuU1z0IP5QL6zVUroFJ6JEghztjdP+P8l0rpE28/MEJz6 XHIagMgIVeUQfmDgzvBvk8ufccBKbrMJ6CWsmtJZYIjp+5Bar5qx7Ekr +QfZbnhvW2bmnLuUxK57EhVDcdpllDVYBxxjye0EU60l5Q==
LA5ACD74Q7TDCU969L726O890292GGPA.com. 86400 IN NSEC3 1 1 0 - LA5AUQJFNLG7JC1EK63FGRAK8HJ7P78I  NS DS RRSIG
LA5ACD74Q7TDCU969L726O890292GGPA.com. 86400 IN RRSIG NSEC3 8 2 86400 20200226063702 20200219052702 56311 com. PYgOvlx7BiI5LtUccYJLtLMN0ixKdFhx1y4QnY2ugXce/Npu0mMDSjcV LTju/cZNlCmcKO+kRX8dxPTdvp+UrhAxRwZCEu1azCNRVYsxIKE+bt6e rOG6PGIFV7+3TPi0zGOmwaOzZdEKxXmfE5pam2OUr1ERYuyRY8KNrrUL 0mTh+uetOQCa1yqLLWfUTXa3/ecqyz5dD0wk0q270/gx1A==
;; Received 951 bytes from 192.43.172.30#53(i.gtld-servers.net) in 16 ms

garden-v7.netlify.com.	20	IN	A	165.227.0.164
;; Received 66 bytes from 198.51.45.4#53(dns2.p04.nsone.net) in 23 ms

This issue first came to my attention from users located in San Francisco and Copenhagen. So it was originally happening across at least 3 region nodes.

Thanks, @austin94, that dig output is exactly what I was hoping for. As it is working now, this output doesn’t show what was happening before.

I’m glad it is working now though. If this issue does happen again, the output of the same command above should show exactly where the issue is occurring and give us more information to research the issue to determine a root cause.

As always, if there are other questions, we’re happy to answer.