Local site greyed out

I haven’t worked on my local devkinsta site for about one month.

When I started devkinsta moments ago, everything is greyed out.

I am not able to open my site.

I’m keeping my fingers crossed as this is a new site I’m working on - how can I resolve this, please?

Thank you!

When I started DevKinsta, there was a message about missing some host file.

But before I could take note of it, DevKinsta closed that window because it was in the process of being updated to version 2.6.0

After the update, I reset my PC. The screenshot above is what I saw after that.

DK0027 - could it be due to this?

But I don’t see any “Fix This” button and it no longer shows me the message about the host file.

This is how my hosts file looks like currently

Added by Docker Desktop

192.168.68.61 host.docker.internal
192.168.68.61 gateway.docker.internal

To allow the same kube context to work on the host and the container:

127.0.0.1 kubernetes.docker.internal

End of section

Hi @jacksheo, thanks for reaching out. So the greyed out state is what you see now after the update?

Can you please share your main.log file? That will mention the errors that may be occurring.

Yes, it is still greyed out.

Where can I find this main.log file please?

Thanks for sending that over @jacksheo. Can you please view your config.json for me and check to see if there are any running operations? On Windows think will be somewhere like C:\Users\username\AppData\Roaming\DevKinsta\config.json (The AppData folder is hidden)

I’ve gone over how to clear running operations here but do you see anything there? You can also send that file to me privately so I can share with our Developers.

Thanks for sharing that @jacksheo! So here’s what our devs recommend:

  1. Try manually changing the config.json status for “hostFIle” to “running” and remove the error so that it looks like this:
			"hostFile": {
				"status": "running"
			},
  1. Try manually adding the host record to your hosts file with admin permissions like this (you should at least be able to view your site if you add the host records.
    ):
127.0.0.1 yoursite.local
127.0.0.1 www.yoursite.local
::1 yoursite.local
::1 www.yoursite.local

With those changes, try restarting your PC and running DevKinsta as an Administrator. Hopefully that gets you past the error but please let us know if it does not work.

When I first opened up the host record for editing, it was blank.

After changing both config.json and the host file, it (Devkinsta still grey) still didn’t work.

Sorry, I take that back.

I can access the site directly by entering the URL into the browser.

But Devkinsta still shows the site as greyed out - can’t access from Devkinsta.

This is really odd because it would have to be something in your config.json locking things up.
And restarting your PC didn’t work either?

Are you able to create a brand new site within DevKinsta? Also, if you go to the sites overview, are the other options at the very right grayed out as well?

For example, is the option to rename the site still available?

My test today:

  1. Restarting the PC didn’t help - everything is greyed out.

  2. If I click on the 3 dots, there is only “Delete” option.

  3. I could create a new site - everything works properly.

  4. I noticed that after creating the new site, the host file got changed to the following:

START DEVKINSTA entries

127.0.0.1 test-site.local
127.0.0.1 www.test-site.local
::1 test-site.local
::1 www.test-site.local

END DEVKINSTA entries

  1. config.json has 2 “hostFile” entries

The first one is for jack-sheo (the one I’m having problem with) with status “running”

The second one is for test-site with status “waiting”


I’m not able to access jack-sheo.local when I enter this into the browser now.

I think it is because this site’s entries have been deleted from the hosts file?

Odd, it’s as if it just won’t detect that site for some reason. Can you change that running to “waiting” as well for jack-sheo? That might not fix it either, though.

I was thinking you could just create a new WordPress site in DevKinsta then migrate jack-sheo’s database and files to it since you’re still able to access the actual site when you update your hosts file.

We couldn’t see anything in your config.json that would explain why everything is still greyed out.

These are the steps I took today.

  1. Opened up config.json.

a) Changed status of hostFile (for jack-sheo) from “running” to “waiting”.

b) I noticed that status of hostFile (for test-site) was “waiting”.

  1. Started DevKinsta

a) In DevKinsta, test-site is now greyed out just like jack-sheo

  1. Opened up config.json again

a) Status of hostFile (for jack-sheo) is still “waiting”.

b) But status of hostFile (for test-site) has been changed to:

“hostFile”: {
“status”: “installFailed”,
“error”: {
“name”: “HOST_FILE_MISSING_ENTRY”,
“code”: “DK0027”
}
},

  1. I went to open up the file “hosts”. But it is empty.

Looks like something is making changes to “hosts”?

test-site is now suffering the same fate as jack-sheo

Is there something else I should be looking for?

Even if I migrate (not sure exactly how to do it), the problem will come back.

I have sent the current copy of config.json to you.

Odd, thanks @jacksheo, I will have our developers review this again. And you are definitely running DevKinsta as the administrator, correct?
image

Hi @jacksheo, I’ve finally been able to reproduce this issue/fix it on my end and here is my theory:

Something on your PC keeps reverting the host file changes that DevKinsta makes. It could be a security application or something malicious, I do not know. You would have to find a way to track when the file is changed/what is changing it. Here’s a relevant question. We can keeep troubleshooting if it turns out it’s DevKinsta deleting the entries for some reason.

How I Reproduced This:

  1. I opened my hosts file then deleted the DEVKINSTA entries block(including the commented lines)
#### START DEVKINSTA entries
all my domains here
#### END DEVKINSTA entries
  1. I completely closed then restarted DevKinsta. All of my sites were now grey.

How I fixed this:

  1. I completely closed DevKinsta
  2. I added the DEVKINSTA block back with my appropriate host entries.
#### START DEVKINSTA entries
127.0.0.1 site.local
127.0.0.1 www.site.local
::1 site.local
::1 www.site.local
#### END DEVKINSTA entries
  1. I opened config.json and changed any host related errors to “running” and deleted the error. There are two places where this change needs to be made for each site. I’ve screenshotted a before and after:
    before


    after

  2. After restarting DevKinsta, I’m able to view the sites like normal again.

So fixing the issue is relatively easy, the hard part is figuring out what process is deleting the host file in the first place. I unfortunately can’t reproduce the randomness of it, that’s why I believe it’s something on your PC that is doing it.

I’m going to discuss a possible built-in solution for DevKinsta to just restore entries on restart with our developers, though. That would at least save you from having to do this manually.

Please let me know if these steps do not work for you or if you figure out what is resetting your hosts file.

Hey Kevin

Yes, your suggested steps allowed me to work on the site again. Thanks!

I tried to read up on process monitor but couldn’t quite figure out how to use it to monitor hosts file.

One thing I noticed:

After I corrected the entries in config.json, the next time I started DevKinsta, config.json would be changed again to what you’ve shown in step 3 (the before) above.

During my 20 mins or so of fiddling, I noticed that the following lines were added into hosts file.

Added by Docker Desktop

169.254.87.133 host.docker.internal
169.254.87.133 gateway.docker.internal

To allow the same kube context to work on the host and the container:

127.0.0.1 kubernetes.docker.internal

End of section

That’s what I’ve observed thus far.

1 Like

Very odd. So yes, I believe you have to edit the hosts file and config.json before starting DevKinsta or else it fails again/rewrites config.json.

I have those same lines added by Docker Desktop in my hosts file as well. but Docker usually only adds those when you initially install it.

No worries about tracking what is doing it, though. Our developers are aware of how we are having to fix this manually and will work on a way to automate this. At least we have a temporary fix for now! Please let me know if anything new develops with this issue!

Hi Kevin!

Hope you have been well.

I just resumed working on the site again today (after a 3 months break).

I’m having the same issues - my site is greyed out in Devkinsta.

Following the steps you listed on 3 Jun (changing config.json, adding entries in hosts file) didn’t work.

After changing config.json, I would get the following error message when I started devkinsta.

How can I fix this pls?

Thanks!