After clicking start site when I go to open site I’m getting an error on my browser (Chrome) saying “localhost refused to connect”. These sites were ALL working last time I worked on them one specifically today.
What steps can be taken to replicate the issue? Feel free to include screenshots, videos, etc
Security Reminder
Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.
We had a bug with Instant Reload that was causing 502s on that Local release you are on. Are you utilizing that add-on? You can either disable it or if you upgrade to the latest Local release that should resolve the issue!
I’m not using the add-on so that’s not the issue, I also just updated to the latest version but the problem is still persisting. It’s weird because everything was working fine yesterday then all of a sudden, it just stopped working.
How many sites do you have in Local? Is there still plenty of disk space on your device?
Do you run any common security plugins on all your sites like Wordfence?
Are you running other developer applications simultaneously? Apps like MAMP, XAMPP, or Docker for example. I did notice some port conflict errors in the logs. They weren’t recent, but just wanted to check out any conflicts.
30 sites on Local with over 100gbs of free space on the device, I believe some sites have Wordfence but not all but before yesterday even the few with Wordfence were working fine. None of the ones listed but I may have had a Python Flask application running simultaneously with a Local site at the same time in the past.
Since you have so many sites I know it would be too cumbersome to try reimporting all of those. To get them all working again at the same time you might have to try deleting the lightning-services directory. The steps would look like this:
Close Local
Hit Cmd+Space and type ~/Library/Application Support/Local/lightning-services to navigate to this folder on your computer
Delete the entire lightning-services folder
Re-open Local
Trying restarting a site that was having problems.
Sorry @jason_bourne! I can have our team take a look but we might not get back with anything until after the weekend.
For now, if there is a specific site you need to work on since new sites are working fine you could try a reimport. The steps would look like this:
Locate the site files on your machine, and save a copy of them to your desktop. If you click Go to Site Folder under your site name it should take you right to where they are located.
Once you have those copied, completely delete the site from Local
Hi @jason_bourne! Thank you for your patience and communication with us here. Our Local devs were able to take a deeper look into your issue and come up with some replication steps and a fix. I’ll share what they gave me here below:
It looks like there are a number of errors for the various sites that look something like this:
{"class":"Process","level":"warn","message":"nginx: [emerg] open() \"/Users/hassanmomin/Local Sites/efbc-v2/logs/nginx/error.log\" failed (2: No such file or directory)","process":"nginx","thread":"main","timestamp":"2025-01-02T20:50:06.251Z"}
{"class":"Process","code":1,"level":"verbose","message":"PID: 23437 closed with","process":"nginx","signal":null,"thread":"main","timestamp":"2025-01-02T20:50:06.252Z"}
{"class":"Process","level":"warn","message":"[02-Jan-2025 14:50:06] ERROR: failed to open error_log (/Users/hassanmomin/Local Sites/efbc-v2/logs/php/php-fpm.log): No such file or directory (2)","process":"phpFpm","thread":"main","timestamp":"2025-01-02T20:50:06.271Z"}
For some reason, neither php, nor nginx are able to start because of some missing log files.
I think I replicated the error state with:
* Start local and create and/or start a site
* Click the “Go to site folder”
* With the site still running, delete the logs folder
* Quit Local and restart it
* Try starting the site and note that the site appears to start in the Local UI, but when you try to access it in the browser, there are errors. Additionally, those similar entries as above are found in the Local log.
I was able to fix things by quitting Local, then creating the folders again for both nginx and PHP:
~/Local Sites/<sitename>/logs/php
~/Local Sites/<sitename>/logs/nginx
As far as why this happened, it does appear to be a bug that the team has zeroed in on and will work to address in a future release.
If you have any other questions or concerns don’t hesitate to reach back out. We are always happy to help!