Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creates too many comments #66

Open
taythebot opened this issue Dec 16, 2021 · 6 comments
Open

Creates too many comments #66

taythebot opened this issue Dec 16, 2021 · 6 comments

Comments

@taythebot
Copy link

So I have Glasswire installed and it tells me whenever the hosts file is changed. Every hour I will get a notification that it has been modified by this program. The IP addresses don't seem to change at all, but it's commenting out the old entries and creating new ones. At the end of each day, I'll have around 20-30 commented out lines.

Is there some way to prevent this behavior?

@OgulcanCelik
Copy link

I'm having exactly the same problem, hosts get filled up with the same IP and hostname over and over again, hundreds of times.

@OgulcanCelik
Copy link

image
here is the example

@stephanesoares
Copy link

Anyone have a fix for this?

@Rragen
Copy link

Rragen commented Jan 23, 2022

I had the same problem, and it was because the service is looking for your hosts in the /etc/hosts file on the vm, not on the Windows file.
And for some reason, my VM /etc/hosts file wasn't updated automatically, so it was adding again and again new lines.

I had to create / add content to this file on the VM : /etc/wsl.conf

[network]
generateHosts = true

You have to restart your linux instance after adding the fil. In powershell :
Restart-Service LxssManager

It did the trick for me.

Edit : Well no, I still have duplicate entries coming :(

@OgulcanCelik
Copy link

Yes I tried it but it's still happening :/

@mverkerk-godaddy
Copy link

mverkerk-godaddy commented Oct 14, 2022

same problem here, numerous entries in my hosts file except mine looks like this:

 wsl.local    # alias: Ubuntu; managed by wsl2-host
 custom.domain    # alias: Ubuntu; managed by wsl2-host
 wsl.local    # alias: Ubuntu; managed by wsl2-host
 custom.domain    # alias: Ubuntu; managed by wsl2-host
 wsl.local    # alias: Ubuntu; managed by wsl2-host
 custom.domain    # alias: Ubuntu; managed by wsl2-host
 wsl.local    # alias: Ubuntu; managed by wsl2-host
 custom.domain    # alias: Ubuntu; managed by wsl2-host
 wsl.local    # alias: Ubuntu; managed by wsl2-host
 custom.domain    # alias: Ubuntu; managed by wsl2-host
 ... and so on ...

Also, it's not consistent in adding entries from the ~/.wsl2hosts file (like "custom.domain" in my example above) - sometimes it's there, next time it's commented out ...

I'm running Windows 11 with WSL2 (Kernel version: 5.10.102.1)
In Event Viewer I see the following:

  • many failed to get IP for distro "Ubuntu": exit status 1 info messages
  • occasional failed to get IP for distro "Ubuntu-22.04": exit status 1 info messages
  • occasional GetDefaultDistro failed: exit status 1 error messages

I have two different Ubuntu distros & Ubuntu-22.04 is the default - not sure if that messes things up
lmk if you need more troubleshooting data...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants