roadlabs / alt-f

Automatically exported from code.google.com/p/alt-f
0 stars 1 forks source link

Alt-F should add localhost entry to /etc/hosts #122

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Setup DNS server with AAAA record for localhost
2. Try printing
3. See 'lpq: socket: Address family not supported by protocol' in logs

What is the expected output? What do you see instead?
The document should be printed

What Alt-F version are you using? Have you flashed it?
0.1RC2, yes

Please provide any additional information below.

Turns out this is caused by a configuration change in my home network along 
with some assumptions that Alt-F makes.

I recently changed my DNS setup at my house and now my DNS server has AAAA 
records for the name 'localhost'. This has caused uClibc to prefer using IPv6 
over IPv4 when connecting to localhost.

An argument could be made that this is a bug in uClibc and it should fallback 
gracefully, but a simple workaround in Alt-F can be done.

Adding '127.0.0.1 localhost' to /etc/hosts prevents the problem and everything 
continues working again.

Original issue reported on code.google.com by jerdf...@gmail.com on 5 Nov 2012 at 3:06

GoogleCodeExporter commented 9 years ago
> Adding '127.0.0.1 localhost' to /etc/hosts prevents the problem and 
everything continues working again.

I think that I have that already fixed. The localhost entry is accidentally 
removed by the webgui under certain circumstances.

Can you please use/Apply the webgui Setup->Host and Setup->Hosts to verify 
which one is in fault? And set DHCP and wait/force for a IP lease to happen, to 
see if it is the DHCP update script which is in fault?

Not closing yet to verify that the issue is solved when doing the next release 
tests.

Thanks.

Original comment by whoami.j...@gmail.com on 5 Nov 2012 at 6:42

GoogleCodeExporter commented 9 years ago
I added the localhost line manually to workaround the bug.

Going to Setup->Host and saving the current config rewrites /etc/hosts but 
keeps my localhost line.

Going to Setup->Hosts and saving the current config (which is just the 
localhost according to the web UI), it rewrites /etc/hosts but keeps my 
localhost line as well.

If I add localhost via Setup->Hosts, then it adds it to /etc/hosts and keeps 
the original localhost (so there are now two localhost lines in /etc/hosts). 
Oddly, the entry doesn't show up in the web UI anymore and clicking Save again 
removes the second line, but keeps the line I added by hand.

I don't use DHCP for my NAS and I'm actively using it so I can't test that out 
right now. When the NAS isn't busy, I can test out DHCP and see if that is the 
culprit.

Original comment by jerdf...@gmail.com on 5 Nov 2012 at 8:29

GoogleCodeExporter commented 9 years ago
Closing, hopefully fixed in SVN.

Original comment by whoami.j...@gmail.com on 14 Jan 2013 at 5:46