Opened 9 years ago

Closed 9 years ago

#12260 closed bug (fixed)

system/settings/network/hosts missing resulting in non-resolving localhost

Reported by: waddlesplash Owned by: axeld
Priority: normal Milestone: Unscheduled
Component: Servers/net_server Version: R1/Development
Keywords: Cc:
Blocked By: Blocking: #12364
Platform: All

Description (last modified by kallisti5)

NetResolv assumes that "localhost" actually exists, but in some instances it doesn't (it can't be resolved -- 127.0.0.1 exists, though).

This could be part of the issue with our DHCP issues in #12208, however it isn't the sole reason as adding a localhost line to hosts doesn't fix the DHCP issue.

Change History (11)

comment:1 by waddlesplash, 9 years ago

Strike that. In some instances, localhost isn't even created at all -- it doesn't exist on my system (!)

comment:2 by waddlesplash, 9 years ago

Description: modified (diff)

comment:3 by waddlesplash, 9 years ago

Description: modified (diff)

comment:4 by kallisti5, 9 years ago

Description: modified (diff)
Summary: [net_server?] "localhost" is not garunteed to be created before some servicessystem/settings/network/hosts missing resulting in non-resolving localhost

comment:5 by axeld, 9 years ago

I might be dumb, but netresolv should be the one to provide "localhost" in the first place, no? It's the only name resolution entity out there (in Haiku) after all.

How about reverting the netresolv change, and go with FreeBSD's solution next time?

comment:6 by pulkomandy, 9 years ago

localhost and the loopback interface are working fine here, without the need for an "hosts" file.

comment:7 by kallisti5, 9 years ago

Blocking: 12364 added

(In #12364) This looks like a duplicate of #12260... I need to confirm #12260 is still an issue though.

comment:8 by kallisti5, 9 years ago

I did some digging, netresolv does provide localhost... by parsing the /etc/hosts like on most platforms :-). There could be edge cases of users wanting to modify where localhost points so setting it in a static way is really not ideal. As all the platforms I know of define localhost in some etc-hosts way, i'm going that route.

Fix on it's way.

comment:9 by axeld, 9 years ago

As with the services, I could imagine that I hard-coded that into the former libbind solution in case there was no /etc/hosts file. It would probably make sense to look into that.

comment:10 by kallisti5, 9 years ago

that's fair. #12368 was opened to track.

comment:11 by kallisti5, 9 years ago

Resolution: fixed
Status: newclosed

resolved in hrev49626

Note: See TracTickets for help on using tickets.