MacOS Catalina 10.15.2 - starting up site services problem


I have installed Local 5.7.4+4876 and I can not create any site.

Any time Local is stacked on "Starting up Site Services.

That is my log file: local-lightning.log (170.6 KB)

Please help

Hey @TataRak13, welcome to the Local Community Forums!

I took a look at the Local log and noticed that there is this error:

Error: Unable to read hosts file at /etc/hosts\n    at Function.p.shouldUpdateHosts (%%appPath%%/main/dns/hostsFileService.js:1:1131)\n    at Function.<anonymous> (%%appPath%%/main/dns/hostsFileService.js:1:755)\n    at Function.flush (%%appPath%%/node_modules/debounce-promise/dist/index.js:54:74)\n    at listOnTimeout (internal/timers.js:531:17)\n    at processTimers (internal/timers.js:475:7)

Usually when Local can’t read the hosts file, that means that there is something blocking it like an antivirus software or a security setting. Can you try disabling anything like that and attempt to create a new site?

Hi Ben,

Thanks for your interest.

I’ve already checked the variant with the disabling of an antivirus software (I use Bitdefender). Without a positive result.

I don’t know what security settings I should check. Can you give me a hint?

In the meantime, I tried to install many previous versions of Local.

The semi-positive result (sites created) was achieved in version 5.2.? (I don’t remember the number exactly now). But the success was only partial because the sites could not be launched. The “Fix it” button did not work.

Any suggestions?

I know that Catalina has a number of additional security settings in place – I wonder if they have locked down the Hosts file?

Can you open a terminal and run this command and let us know what the output is?

stat -x /etc/hosts

For reference, here’s what I see running that command:

$ stat -x /etc/hosts
  File: "/etc/hosts"
  Size: 7025         FileType: Regular File
  Mode: (0644/-rw-r--r--)         Uid: (    0/    root)  Gid: (    0/   wheel)
Device: 1,8   Inode: 26070291    Links: 1
Access: Thu Sep 10 07:00:36 2020
Modify: Thu Sep 10 07:00:36 2020
Change: Thu Sep 10 07:00:36 2020

After running this command:

stat: /etc/hosts: stat: No such file or directory
iMac-MT:~ robert$

The outcome is the same whether or not antivirus protection was enabled.

What does it mean?

That is definitely odd and something that I’ve never come across!

After doing some googling, I wonder if you need to re-create that file?

One thing to verify – do you have that /etc folder? You can check by running this command in the terminal:

ls -alh /etc

Can you post the results of that command here?

For reference, here are a few of the links that I found that talk about the Hosts file on Catalina being in an odd state or corrupted:

Have a look at them, but if you need a little more guidance on re-creating that file, I’m more than happy to help after seeing what’s already in the /etc folder.

For now this is the result of the command:

lrwxr-xr-x@ 1 root  admin    11B  4 gru  2019 /etc -> private/etc
iMac-MT:~ robert$ 

I will of course read those articles but you are speaking with an amateur not developer and any kind of help is very appreciated :slight_smile:

Nice, can you do one more command for me so I understand the underlying structure a bit more?

ls -alh /private/etc

Here you are:

total 1984
drwxr-xr-x  124 root  wheel   3,9K 10 wrz 22:41 .
drwxr-xr-x    6 root  wheel   192B 17 gru  2019 ..
-rw-r--r--    1 root  wheel     0B 18 paź  2019 hosts.equiv
-rw-r--r--    1 root  wheel   213B 17 sie  2018 hosts~orig
iMac-MT:~ robert$

Ok. Looking at that output, I wonder if it’s as easy as copying that hosts~orig file to what it’s supposed to be. Can you give this command a try (it will prompt you for your login password. What you type won’t show on screen, so be sure to be accurate!)

sudo cp '/etc/hosts~orig' '/etc/hosts' && ls -alh /etc/hosts*

Please paste the output from that command here.

Also, after running that command, can you try creating a new site in Local and see if that gets things working for you?


-rw-r--r--  1 root  wheel   213B 11 wrz 21:06 /etc/hosts
-rw-r--r--  1 root  wheel     0B 18 paź  2019 /etc/hosts.equiv
-rw-r--r--  1 root  wheel   213B 17 sie  2018 /etc/hosts~orig
iMac-MT:~ robert$ 

… and the winer is … Ben Turner :smiley:

Now, I can create a site. Everything seems to work perfectly.

Thank you very much!

1 Like

Awesome @TataRak13, I’m glad we got to the bottom of it! Have an awesome day!


This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.