connect() failed (111: Connection refused) while connecting to upstream, client ….

If you are getting this error suddenly and intermittently, this may be due to issues resolving localhost intermittently, perhaps intermittently when attempting IPv6 vs IPv4.

I was able to solve the problem by changing my references to localhost to 127.0.0.1 in my nginx configs.

3 thoughts on “connect() failed (111: Connection refused) while connecting to upstream, client ….

  1. We just moved to a cluster and got pages of these errors. This fixed it in a flash. Thank you so much.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s