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:
Try manually changing the config.json status for “hostFIle” to “running” and remove the error so that it looks like this:
"hostFile": {
"status": "running"
},
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.
):
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.
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?
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.
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:
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
I completely closed then restarted DevKinsta. All of my sites were now grey.
How I fixed this:
I completely closed DevKinsta
I added the DEVKINSTA block back with my appropriate host entries.
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 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.
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.
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!