502 Request Error: prematurely closed connection while reading response header from upstream

Hi.
I can install a ‘preferred’ site and it fires up fine. But i want to use xdebug so have tried to start a ‘custom’ install but it fails every time with a 502 Request Error. When i look at the Local Routers Logs there are numerous messages relating to the same issue…

*14 upstream prematurely closed connection while reading response header from upstream, client: 192.168.95.1, server: austguide.local, request: “GET / HTTP/1.1”, upstream: “http://192.168.95.100:4004/”, host: “austguide.local”

I have tried refreshing, rebooting, reinstalling all fail - but again only on custom installs.
I am on Windows 7 64 bit.

Can someone please help?
Thanks
Wayne

Hi Wayne,

Sorry for the trouble with Custom and Xdebug! Is this with Local 2.3.2?

Hi Clay,

Thanks for the swift response.
Yes i’m using Local v2.3.2

Cheers
Wayne

I’ve got the exact same issue. Just upgraded to 2.3.2 on Windows 7 and now cannot load any of my existing custom sites (using the 1.2 or 1.3 Local environment), or a new custom site I created after the upgrade. The error and logs show the same as WayneD. The only thing that does load on the container is MailHog.

Launching a Preferred site works as expected, but that’s not ideal as I make heavy use of Xdebug. Switching to “Dev” mode on the Preferred site also causes the 502 error.

@WayneD @jakejackson1,

Are you guys using Apache or Nginx on the Custom environment? If Apache, can you try switching to Nginx?

Hi Clay

I used Nginx environment: PHP 7.03, MySql 5.5.60

But note Apache fails as well.

So both Custom web server configs, Nginx & Apache, fail with 502 errors

I want to use multisite but tried single site too and they both fail.

Cheers
Wayne

Got it.

Does the Preferred environment work?

Hi Clay

Any ‘Custom’ install fails. ‘Preferred’ works ok.

This is the configuration that results in error:
Custom install

Local v2.3.2

Nginx or Apache (both fail)

PHP 7.03 (but probably any version)

MySQL 5.5.60
(but probably any version)

Windows 7 64-bit professional

Result in browser:

502 Request Error

Local Routers Logs:

*14 upstream prematurely closed connection while reading response header from upstream, client: 192.168.99.1, server: mywebsite

.local, request: “GET / HTTP/1.1”, upstream: “http://192.168.99.100:4004/”, host: “mywebsite.local”

Cheers
Wayne

1 Like

Same issue. After upgrading from v2.3.1 to Local v2.3.2 all sites get 502 errors now.

Tried switching from custom to Preferred, but still get 502 errors. :frowning:

Windows 10
nginx

I just upgraded to the latest and am now having this issue as well on all my sites, preferred and custom. I’ve restarted sites and my computer as well with no luck. Currently can’t access anything. Do we have a resolution on this or any hints?

Hi,
I have similar issue with 502 Error when trying to start site on Preffered 1.3.2 Envirement.

router-logs file :
error.log (7.2 KB)

Hi, I’ve solved this problem going to SSL tab and clicking on TRUST the certificate just in case this is any help.