Questions and Answers :
Unix/Linux :
PCs named localhost.localdomain
Message board moderation
Author | Message |
---|---|
Jason Dravet Send message Joined: 6 Jul 99 Posts: 2 Credit: 14,406 RAC: 0 ![]() |
Several of my registered PCs have the name of localhost.localdomain. I think the boinc client just looks for the first string after 127.0.0.1 in the /etc/hosts file. Either an option to rename the PCs needs to be added or the client needs to skip localhost, localhost.localdomain, and 127.0.0.1 when reading the /etc/hosts file. Just my $0.02. |
Darren ![]() Send message Joined: 2 Jul 99 Posts: 259 Credit: 280,503 RAC: 0 ![]() |
Not sure where it comes from, but it's not taking the first line of /etc/hosts. None of my hosts are identified as localhost, but that's the first entry in /etc/hosts. As an example, my primary system has /etc/hosts of: 127.0.0.1 localhost 192.168.1.19 platinum But boinc identifies the systym as "platinum" and IP as "192.168.1.19". The data for the identity is transmitted to the seti server by ping, so however your system is identifying itself in a ping is how it will show on the seti servers. As a side note, this is only visible to you. The host name and ip does not show on a regular view of someone's hosts. It only shows for an account that you are logged in to. |
![]() ![]() Send message Joined: 18 May 99 Posts: 378 Credit: 7,041 RAC: 0 ![]() |
The way the IP is *currently* obtained is essentially with gethostname() and gethostbyname(). It looks like this is going to change by M2, though... since you can't statically link gethostbyname() with freakin' glibc issues. :-) You really should set up some proper hostnames for your systems. localhost.localdomain will cause problems with many software programs available for linux. Rob |
Jason Dravet Send message Joined: 6 Jul 99 Posts: 2 Credit: 14,406 RAC: 0 ![]() |
my /etc/hosts has the following line: 127.0.0.1 localhost.localdomain cc1 localhost that is it. I am pretty sure I have proper hostnames. I can ping the PC using ping cc1 and the ip 192.168.8.212 is returned and the ping is successful. So how can I make sure I have proper hostnames? The client uses dhcp to get it IP address, and domain name (networktest.local). Thanks, Jason > Not sure where it comes from, but it's not taking the first line of > /etc/hosts. None of my hosts are identified as localhost, but that's the > first entry in /etc/hosts. > > As an example, my primary system has /etc/hosts of: > > 127.0.0.1 localhost > 192.168.1.19 platinum > > But boinc identifies the systym as "platinum" and IP as "192.168.1.19". > > The data for the identity is transmitted to the seti server by ping, so > however your system is identifying itself in a ping is how it will show on the > seti servers. > > As a side note, this is only visible to you. The host name and ip does not > show on a regular view of someone's hosts. It only shows for an account that > you are logged in to. > > > <a> href="http://www.boinc.dk/index.php?page=user_statistics&userid=24497"> > > |
fifieldt Send message Joined: 6 Jun 02 Posts: 2 Credit: 203,091 RAC: 0 ![]() |
It certainly is a weird problem. I have 2 linux hosts. One was Identified correctly as gummoBox - 192.168.1.9, the other was shown as localhost. gummoBox 127.0.0.1 localhost 192.168.1.9 gummoBox Frogstar_A 127.0.0.1 localhost 192.168.1.13 Frogstar_A What is the link for reoccurance, or is it completely random ? |
fifieldt Send message Joined: 6 Jun 02 Posts: 2 Credit: 203,091 RAC: 0 ![]() |
It seems it just worked out, localhost has magically become Frogstar_A. Rejoice! |
![]() ![]() Send message Joined: 27 Feb 00 Posts: 13 Credit: 11,042,103 RAC: 0 ![]() |
IMHO this is a bug. 127.0.0.1 should NEVER be named with the name of the machine. Also, whatever is causing this is not consistent. Out of 20 computers with the /etc/hosts file set correctly, only two appear as 'localhost' in my SETI/BOINC account 'Your Computers' list. By trial and error, on those two computers, I have discovered that a work-around is to not list the 127.0.0.1 entry first. So instead of: -----clip----- # For loopbacking. 127.0.0.1 localhost 192.168.0.8 neoslak neoslak.dynetx.org -----clip----- use: -----clip----- 192.168.0.8 neoslak neoslak.dynetx.org # For loopbacking. 127.0.0.1 localhost -----clip----- Hope this helps. Chuck Bell We Listen and Compute! |/ ( q p ) ------oOOo-(_)-oOOo------- http://www.dianetics.org |
![]() Send message Joined: 18 Jun 99 Posts: 221 Credit: 122,319 RAC: 0 ![]() |
> I am pretty sure I have proper hostnames. Definitely not. Your PC name must not be the same as the name used for the loopback device. Give your machines proper names and you're set. |
Knahrvorn Send message Joined: 29 Nov 05 Posts: 2 Credit: 16,263 RAC: 0 ![]() |
Out of curiosity: How do you set up a proper hostname if your (internal) IP address isn't static? I have a laptop with a wireless network card, and sometimes I'm 192.168.0.2, sometimes 10.0.0.5, pepending on where I connect. |
Knahrvorn Send message Joined: 29 Nov 05 Posts: 2 Credit: 16,263 RAC: 0 ![]() |
127.0.0.1 should NEVER be named with the name of the machine. You have to take that up with several distro guys, I guess. I've only looked for this in Fedora and Ubuntu, and they both seem to assign the name of the machine to 127.0.0.1 -- Fedora as the first name on the line, Ubuntu as the last one. BTW, what is the problem about doing this? It certainly solves problems about having non-static LAN IP, and I can't recall that it has ever made any trouble for me. |
![]() ![]() Send message Joined: 15 Mar 01 Posts: 1011 Credit: 230,314,058 RAC: 0 ![]() |
Ok, i confused. how should hosts be setup? can i have examples for static and dynamic. it seems some know, but just say it is wrong.... ![]() ![]() |
Dotsch ![]() Send message Joined: 9 Jun 99 Posts: 2422 Credit: 919,393 RAC: 0 ![]() |
Ok, i confused. how should hosts be setup? can i have examples for static and dynamic. it seems some know, but just say it is wrong.... Please look at the example from Chuck R. Bell or in the thread http://setiathome.berkeley.edu/forum_thread.php?id=35495, it is exatcly the right example you need |
©2025 University of California
SETI@home and Astropulse are funded by grants from the National Science Foundation, NASA, and donations from SETI@home volunteers. AstroPulse is funded in part by the NSF through grant AST-0307956.