hosts file problem

  • Thread starter Thread starter -
  • Start date Start date
?

-

Every 2-3 times I boot my machine I seem to get a problem with start up
(crashing half way along the blue bars during the win 2k splash screen) .
Once I tried manually starting a service (squid) which returned an error
that my hosts file could not be read, which I believe is probably the
reason. I tried opening it with notepad and it was fine. I have scanned the
hard disk for errors, tried it also with active smart disk hard disk utility
all returned that there was no problem with the HD.

I'm guessing that the hosts file is some how getting corrupted, I have
replaced it several times, but the problem persists. So, any clues how I
could resolve this? Does the hosts file get dynamically generated at boot?
Is there something getting screwed up during the creation?

Many thanks for any help.
 
- said:
Every 2-3 times I boot my machine I seem to get a problem with start
up (crashing half way along the blue bars during the win 2k splash
screen) . Once I tried manually starting a service (squid) which
returned an error that my hosts file could not be read, which I
believe is probably the reason. I tried opening it with notepad and
it was fine. I have scanned the hard disk for errors, tried it also
with active smart disk hard disk utility all returned that there was
no problem with the HD.

I'm guessing that the hosts file is some how getting corrupted, I have
replaced it several times, but the problem persists. So, any clues
how I could resolve this?

Does the hosts file get dynamically
generated at boot? Is there something getting screwed up during the
creation?

no


whats this squid service for? can you not obtain an alternative or an updated version.
 
whats this squid service for? can you not obtain an alternative or an
updated version.

Squid is a web proxy cache server for my network - its only messing up
because of the hosts file issue, not because its buggy or outdated. This
whole posts really concerns the hosts file not squid because the machine
gets problems during boot and squid is a manual service, hence my analysis
that its the hosts file.
 
- said:
updated version.

Squid is a web proxy cache server for my network - its only messing up
because of the hosts file issue, not because its buggy or outdated. This
whole posts really concerns the hosts file not squid because the machine
gets problems during boot and squid is a manual service, hence my analysis
that its the hosts file.
Many services like squid work by using the hosts file to redirect URL's
to cached copies. For example, the first time someone views
www.page1.org the page is fetched & cached, then the line
127.0.0.1 www.page1.org
is added to the hosts file. Further 'views' of www.page1.org are then
fectched from the cache on localhost.

Perhaps squid is corrupting the hosts file when it tries to modify it? I
assume that squid reads the hosts file into memory at boot up & uses it
from there, so any corruption of the actual file would only be seen 1)
after it modified it and 2) at the next boot. This would give the
intermittent problem you describe.

Speculation of course, but it does explain your symptoms.
 
from there, so any corruption of the actual file would only be seen 1)
after it modified it and 2) at the next boot. This would give the
intermittent problem you describe.

Speculation of course, but it does explain your symptoms.

Hmm, that's very incisive logic, well done, I think that is very plausible.
Perhaps the squid service isn't finished shutting down when shutdown /
restart happens, which then corrupts the file because it stops during the
last few remaining cached write instructions... Well in theory this
shouldn't happen, especially since I have all the windows fixes for HD
related issues and the OS should ensure everything is properly terminated
before powering off, but with windows, it wouldn't suprise me. I think I
will test out shutting the service down manually a few minutes before I shut
the machine down.

Cheers.
 
Back
Top