gethostname failed

Odysseus
Odysseus
Joined: 17 Dec 05
Posts: 372
Credit: 19629108
RAC: 4312

RE: I suspect that you (and

Message 60218 in response to message 60215

Quote:
I suspect that you (and Odysseus) will be able to get rid of these messages by putting appropriate entries in your hosts file.


AFAICT the etc/hosts files are absolutely identical between the system on which BOINC says “gethostbyname failed� and another on the same LAN that reports its name correctly. The content of the files seems very generic; it certainly makes no reference to the systems’ actual IP addresses or names:
[pre]##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
[/pre]
This was copy-&-pasted from the system I’m on now, which AFAIK has always shown its name on project sites and has never logged the “gethostbyname failed� error.

Jord
Joined: 26 Jan 05
Posts: 2952
Credit: 5779100
RAC: 0

Not sure if this person's

Not sure if this person's salvation helps?

obsidian
obsidian
Joined: 8 May 05
Posts: 55
Credit: 2250121
RAC: 0

my computer is not on a

Message 60220 in response to message 60217

my computer is not on a LAN.

i understand about seeing the compter that i no longer use on the "Your computers" page. the point that i tried to make was that BOINCManager could get the host name of that computer and it did not have two seperate ip addresses. it displayed the host's name and only the external ip address. BOINCManager did originally perform gethostbyname successfully for this computer, but now it can't, and it displays two ip addresses instead of one.

where can i find the /etc/hosts file?

i did turn on the computer's firewall in "System Preferences", but later turned it off and shut down then started up again without it, but that did not correct the error. if i shut down and start up again then might that correct the problem? i have entered my service provider's DNS server's ip addresses in "System Preferences" again.

incidentally, how long could i safely have my computer on running einstein@home? should i have something extra to keep it cool?

obsidian
obsidian
Joined: 8 May 05
Posts: 55
Credit: 2250121
RAC: 0

http://docs.info.apple.com

Message 60221 in response to message 60220
Gary Roberts
Gary Roberts
Moderator
Joined: 9 Feb 05
Posts: 5845
Credit: 109970989717
RAC: 30111341

RE: my computer is not on a

Message 60222 in response to message 60220

Quote:
my computer is not on a LAN.

Sorry, but it is. Your LAN consists of two devices - your computer and your DSL modem/router. Both these items of hardware contain ethernet interfaces identifiable by their MAC addresses. Both these devices have non-routable IP addresses assigned to their ethernet interfaces to which they respond when they communicate with each other.

Quote:
i understand about seeing the compter that i no longer use on the "Your computers" page.

OK, fine.

Quote:
the point that i tried to make was that BOINCManager could get the host name of that computer and it did not have two seperate ip addresses. it displayed the host's name and only the external ip address.

I don't really understand your meaning here. When you say "that computer" are you talking about the old computer or the new computer? At any stage were the two computers running simultaneously and were they networked together? At any stage were you trying to get BOINC Manager running on one computer to link to the BOINC daemon running on the other computer? BOINC Manager doesn't display the hostname or the IP address of the machine on which it is running (well at least not in Windoze). In the window titlebar it simply shows (localhost). If BOINC Manager is communicating with a BOINC daemon running on a different machine on the network, it will show the name of the machine as you entered it in the "Select computer..." dialog box, either the proper computer name or the computer's internal IP address - whatever you used to search for it. So I don't understand your statement at all about BOINC Manager showing "only the external IP address" since I've only ever seen BOINC Manager displaying either hostnames or internal IP addresses in the titlebar. I also don't understand your statement, "it did not have two IP addresses". Do you mean "There were not two IP addresses visible on the website"???

Actually, I'm beginning to wonder if we are talking about entirely different things. Please realise that BOINC Manager is the local display of local information about the BOINC daemon running on your computer. The information on the website is something totally different. If you are actually trying to get information about something you can see on the "Your Computers" page on the website please don't call this "BOINC Manager".

Quote:
BOINCManager did originally perform gethostbyname successfully for this computer, but now it can't, and it displays two ip addresses instead of one.

Once again BOINC Manager doesn't do gethostbyname calls. gethostbyname() is a library routine (part of DNS within the OS really) that is called by the BOINC daemon to do hostname IP address resolution. BOINC Manager reports the message when gethostbyname() fails. Its failure is a sign of misconfiguration within DNS on the OS side of things and is nothing to do with BOINC. You will not be able to get rid of this failure without correcting the configuration of DNS within your OS. The easiest way will probably involve editing of /etc/hosts. I've been trying to get this point across to you for quite a while now :).

Quote:
where can i find the /etc/hosts file?

That's the standard Unix pathname - just like C:\\Program Files\\BOINC\\boinc.exe is the default Windoze pathname for the BOINC daemon. Where it is on your Mac OS you will have to determine for yourself. According to the link that you posted in your next message, it looks like it would be /private/etc/hosts.

Quote:
i did turn on the computer's firewall in "System Preferences", but later turned it off and shut down then started up again without it, but that did not correct the error. if i shut down and start up again then might that correct the problem?

I very much doubt it.

Quote:
i have entered my service provider's DNS server's ip addresses in "System Preferences" again.

I'm wondering if this might be your problem??? By entering nameserver details into your systems details, you might actually be telling your OS to try to get local DNS information from those remote servers rather than consulting local configuration files like /etc/hosts. Of course, your ISPs nameservers will know nothing about the details of the LAN on the inside of your modem so will not be able to handle hostname IP address resolution for your computer.

To put it as simply as I can, the remote DNS servers allow your modem to work out the next hop (or route) for any packet your modem wants to send out into internet-land. Your computer only needs to know the route to your modem. Your computer doesn't care after that - it's the modems responsibility to take care of the onforwarding of the packet.

Each time you start up your machine, the hostname is read from a configuration file. Then a dhcp client program will look for a DHCP server (on your LAN that you don't have :).) to give it the internal IP address to use. It will very likely be the same one as it got last time. Then the ethernet interface has to be configured with various details including this non-routable IP address obtained by dhclient. In standard Unix the system program that configures the interface is called "ifconfig" which is short for "interface configuration". Then a program called "route" sets up the default or static route between your computer's ethernet interface and that of your modem. The reason for telling you all this is because somewhere in those various steps is the reason why you are getting "gethostbyname failed"

Let me ask you a simple question. Do you know how to check (and edit if necessary) the configuration information stored inside your modem? Checking your modems configuration and then removing the ISP's DNS server information from your computer might just do the trick for this problem.

Quote:
incidentally, how long could i safely have my computer on running einstein@home? should i have something extra to keep it cool?

How long is a piece of string? Some people run notebooks 24/7 at full power and some people take all sorts of measures to throttle the CPU or restrict the hours or CPU % used. The basic precaution is to elevate the computer to allow free flow of cool air underneath and to make sure cooling vents are not impeded in any way. All computers will tend to give you early warning signs of heat stress by "locking up" when they get too warm. If you can run BOINC projects continuously on a machine for a week with no lockups, there shouldn't be much problem with that machine's ability to handle full load. YMMV and CAVEAT EMPTOR!!

Cheers,
Gary.

Gary Roberts
Gary Roberts
Moderator
Joined: 9 Feb 05
Posts: 5845
Credit: 109970989717
RAC: 30111341

RE: http://docs.info.apple.

Message 60223 in response to message 60221

This looks exactly like the info you need to research to get DNS working correctly on your system.

Cheers,
Gary.

obsidian
obsidian
Joined: 8 May 05
Posts: 55
Credit: 2250121
RAC: 0

my mistake, i did not know my

Message 60224 in response to message 60222

my mistake, i did not know my dsl modem/router and computer contstiuted a LAN.

actually, those remarks i made about comparing einstein@home's ip addresses and names for "that computer" (old) and "this computer" (new) are probably superflous.

i remarked earlier that i thought i had changed something. i had looked thru the folders on the hard disc and mistakenly deleted two folders. one was the "private" folder. i have since replaced them and now i need einstein@home's internet address, official host name, and aliases for the "hosts" file. i know you have been telling me to edit the "hosts" file for some time, and i did look for the file but could not find it, and i was unaware that i had deleted it so i did not know what to do.

i did not intend to call enistein@home BOINCManager. the "Computer summary" page at einstein@home shows one ip address and the computer's name for that old computer but two ip addresses and no name for this new computer. little wonder, right?

Quote:
At any stage were the two computers running simultaneously and were they networked together?


no

Quote:
At any stage were you trying to get BOINC Manager running on one computer to link to the BOINC daemon running on the other computer?


no

Quote:
BOINC Manager doesn't do gethostbyname() calls.


ok, i did not know that, but i assumed that either BOINCManager did it or if BOINCManager did not do it then it at least requested my computer to do it. i did not know about the BOINC daemon. i have seen the einstein@home server send requests to delete specific files on the hard disc.

Quote:
Do you know how to check (and edit if necessary) the configuration information stored inside your modem?


no

thank you for your patience.

Einstein@Home is the only project i run. i used to run SETI@Home, but that was anteBOINC. i heard about Einstein@Home and decided that i was more interested in it because gravitational radiation is predicted, and we should look for it. i did not know about BOINCManager until i went to the Einstein@Home site and saw that i would have to use it to manage Einstein@Home.

Gary Roberts
Gary Roberts
Moderator
Joined: 9 Feb 05
Posts: 5845
Credit: 109970989717
RAC: 30111341

RE: i had looked thru the

Message 60225 in response to message 60224

Quote:
i had looked thru the folders on the hard disc and mistakenly deleted two folders. one was the "private" folder.

Ahhh.... That explains your sudden DNS problems :). Good on you for working that out!!

Quote:
i have since replaced them

OK, good, but where did you get the replacements from and has this solved the problem? Are you sure that the replaced /private/etc/hosts file now contains the same information as the one you deleted?

Quote:
and now i need einstein@home's internet address, official host name, and aliases for the "hosts" file.

No, I don't believe you need any of those three items for the EAH servers. Your ISPs DNS servers will handle those details quite transparently. All you really need in your own "hosts" file is entries for what is on your LAN, ie your computer's hostname and internal IP address and that of your modem which is acting as a gateway to the internet.

Quote:
Quote:
BOINC Manager doesn't do gethostbyname() calls.

ok, i did not know that, but i assumed that either BOINCManager did it or if BOINCManager did not do it then it at least requested my computer to do it. i did not know about the BOINC daemon. i have seen the einstein@home server send requests to delete specific files on the hard disc.

BOINC is an "Infrastructure" consisting of several interacting component parts. Part of BOINC runs on the project servers (the server part) and part of BOINC runs on your machine (the client part). The BOINC client or daemon (boinc.exe on Windows or boinc_client on Unix) handles your machine's interaction with what is running on the project servers. One of the tasks of the BOINC daemon is to keep your science app properly nurtured so that all the science app has to worry about is data crunching. The word "daemon" in Unix (or "service" in Windoze) simply refers to those programs which do important low level, background tasks which usually don't involve any direct user interaction. In fact the BOINC infrastructure, once started, is designed to totally look after itself so that user interaction is rarely needed. You do not need a BOINC Manager running for BOINC to work.

A Manager is provided (boincmgr.exe on Windoze) simply to allow a user to be able to interact with the daemon if the user wants to. For instance, the manager allows you to view what tasks are currently in the cache and the day to day messages that the daemon produces. You can examine log files to see these messages without running the Manager if you so desire. The Manager adds a level of convenience for the user but does not get its hands dirty with actually doing any of the grunt work of fetching and dispatching results. The daemon itself does all that. So as not to complicate the daemon program, the daemon takes advantage (where it can) of routines in system libraries that know how to do OS related tasks - like the gethostbyname() call for example.

You referred to a server request to delete data files that been completely used up. You see the message in BOINC Manager but that's the only part the Manager plays - it lists the message. The message has come from the daemon and the daemon will call upon a system routine to do the deletion in its own good time. The deletion will happen irrespective of whether or not the Manager is running.

Quote:
Quote:
Do you know how to check (and edit if necessary) the configuration information stored inside your modem?

no

It would be worthwhile to work this out (by reference to the user guide that should have come with your modem) as one day you might need to make changes. Modems are usually accessed using a web interface, eg you type something like "http://192.168.0.1/" or "http://10.0.0.1/" into your browser. The 192.168.0.x or 10.0.0.x series are the two most commonly used non-routable IP address ranges that might be the default configured into your modem. Try either of those and see if you get a login prompt back from your modem. You will need the admin username and password to be able to change settings, so find your user guide.

You shouldn't need to change anything since if the ISPs DNS settings weren't correctly set already, you wouldn't be surfing the net.

Quote:
thank you for your patience.

No problem.

Quote:
Einstein@Home is the only project i run....

OK, and thank you for supporting EAH. Hopefully you can soon get things running correctly and please communicate back if you need more help.

EDIT: I've just noticed that your computer has 4 CPUs and you now have a RAC of over 1600. Boy, that's a helluva beast you've got there :). I see you are already at #42 in the Top Computers list and probably rising fast!! Way to go!! :).

Cheers,
Gary.

obsidian
obsidian
Joined: 8 May 05
Posts: 55
Credit: 2250121
RAC: 0

RE: OK, good, but where did

Message 60226 in response to message 60225

Quote:
OK, good, but where did you get the replacements from and has this solved the problem? Are you sure that the replaced /private/etc/hosts file now contains the same information as the one you deleted?


no, it has not solved the problem. i got the folders from one of the OS CDs that came with the computer. if i could get rid of all the BOINC software, reinstalled it, and attached to einstein@home again then would it work right? it used to work right.

Gary Roberts
Gary Roberts
Moderator
Joined: 9 Feb 05
Posts: 5845
Credit: 109970989717
RAC: 30111341

RE: i got the folders from

Message 60227 in response to message 60226

Quote:
i got the folders from one of the OS CDs that came with the computer.

OK, I would assume that the hosts file on the OS CD would be simply a template into which further information gets inserted during installation and initial setup. You are going to have to simulate that configuration process by editing your hosts file.

Quote:
if i could get rid of all the BOINC software, reinstalled it, and attached to einstein@home again then would it work right? it used to work right.

Use your common sense and basic logic. The problem is nothing to do with BOINC. BOINC doesn't care about what names and IP addresses are configured into your local network. BOINC expects and is entitled to find a correctly configured local network. Even if you wipe every last trace of BOINC from your system and completely reinstall it, do you honestly expect that to fix the fact that your hosts file got deleted? :).

Your hosts file is just a text file. Cut and paste a copy of it in a message here and I'll look at what it says. Also start up a command prompt and run the following list of commands (each one separately) and cut and paste the output into the same message.

  • *hostname
    *netstat -rn
    *ifconfig
    *ping -c 1 localhost
    *ping -c 1 w.x.y.z - where this is the actual IP address of your modem.

You have worked out the IP address of your modem haven't you? :).

One final question, you mentioned earlier that you deleted the /private directory. Do you happen to recall if you found any other files under /private other than /private/etc/hosts? My guess is that there would have been other files stored there from the time your OS was first installed and without these you may still be stuffed.

Cheers,
Gary.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.