Device Name

Message boards : BOINC Manager : Device Name
Message board moderation

To post messages, you must log in.

AuthorMessage
kyle.arnone

Send message
Joined: 19 Mar 07
Posts: 1
Message 8898 - Posted: 19 Mar 2007, 18:51:07 UTC

In regards to the computer "device" name, "domain" name, host, etc. Using the Windows or Mac client, if I change the computer name, the next time I load Boinc, it updates the client_state.xml file with the new name, and then that gets updated to the World Community Grid project I am doing. However, I am having an issue with the changing of the Boinc Linux client. I've tried many different methods, but it still just says localhost.localdomain in the client_state.xml, and reading 127.0.0.1 as the ip. If anyone knows how I can change the hostname properly on Linux so Boinc will read it, let me know. Thank you!
ID: 8898 · Report as offensive
River~~
Avatar

Send message
Joined: 12 Mar 07
Posts: 59
Message 8915 - Posted: 20 Mar 2007, 11:31:58 UTC - in response to Message 8898.  
Last modified: 20 Mar 2007, 11:36:52 UTC

In regards to the computer "device" name, "domain" name, host, etc. Using the Windows or Mac client, if I change the computer name, the next time I load Boinc, it updates the client_state.xml file with the new name, and then that gets updated to the World Community Grid project I am doing. However, I am having an issue with the changing of the Boinc Linux client. I've tried many different methods, but it still just says localhost.localdomain in the client_state.xml, and reading 127.0.0.1 as the ip. If anyone knows how I can change the hostname properly on Linux so Boinc will read it, let me know. Thank you!


There are two different issues here. I spent hours on this last autumn.

1. Why does your boinc client pick up the loopback ip rather than the external ip?

2. Given that it does, is there a workaround that will at least show the desired name?

1. I never got to the bottom of it. It seems to be something to do with how you set up the network cards, I mean not the settings but the exact order you set them up. It went on reporting 127.0.0.1 as the ip till I reinstalled the OS from scratch... then it never happened again and I lost interest in chasing it ;-)

I concluded however that it is not a BOINC issue but something deep inside linux. BOINC asks the os for its own ip address and can't do anything but believe what it is told.

2. If I remember rightly, the workaround that got the name right for me was to put the preferred name in the /etc/hosts file.

If the file has these lines in it

127.0.0.1 foo localhost.localdomain localhost
10.4.2.1 bar burble.mydomain burble

then when boinc thinks its ip is 127.0.0.1 it also thinks its name is foo.

When it thinks its ip is 10.4.2.1 then it thinks its name is bar.

When you edit /etc/localhost, don't remove any names unless you really know what you are doing. And especially don't remove the localhost names or a lot of things will break that you really need and that have nothing to do with boinc...

It is OK to add new names to a line, and in particular I found no adverse effects from squeezing in a 'foo' as the first name on the 127... line. How unix interprets this is that any of the names on the line resolve to the ip, but the ip reverse-resolves only to the first name on the line.

I never tried making foo the same as bar - my guess is that it would work but that is only a guess.

Don't forget to restart boinc before expecting to see the results of your edit!

Not a complete solution, but at least it gets the right name onto the web pages when you look at them.

By the way, this is only for your own benefit - nobody else gets to see your ip or your host names even if you allow your hosts to be visible.

In my case, I did want the machine name to show on my own listings as I had several of the same hardware - had they all gone 'localhost' at once I wouldn't have known which was which.

River~~
ID: 8915 · Report as offensive
River~~
Avatar

Send message
Joined: 12 Mar 07
Posts: 59
Message 8955 - Posted: 21 Mar 2007, 12:17:41 UTC - in response to Message 8926.  

one comment was to not meddle with the localhost.localdomain name giving of 127.0.0.1. Not delved into why or why not.


The names localhost and localhost.localdomain must both resolve to 127.0.0.1 unless you really really know what you are doing. Many *nix programs connect to localhost meaning the local machine, rather fewer automatically append a domain name which defaults to localdomain.

For example, you might discover if you use a gui for Linux, KDE of gnome, it may tell X to draw the window on localhost - change the value of localhost in the hosts file and your window will come up on some other machine, if the other machine knows what to do with the request... Even if that is what you wanted, changing localhost is not the way to do it.

Certainly BoincMgr assumes localhost by default.

Adding more aliases to that ip address is no problem, as in the example I gave before. Taking away the two assumed ones is strictly for experts.

R~~
ID: 8955 · Report as offensive
Nicolas

Send message
Joined: 19 Jan 07
Posts: 1179
Argentina
Message 8959 - Posted: 21 Mar 2007, 15:01:16 UTC - in response to Message 8955.  

Taking away the two assumed ones is strictly for experts.

Experts looking for trouble, I might add.
ID: 8959 · Report as offensive
mki

Send message
Joined: 13 Apr 08
Posts: 1
Message 16639 - Posted: 13 Apr 2008, 18:28:43 UTC - in response to Message 8959.  

I had the same problem.
I noticed that boinc takes the first hostname from /etc/hosts for the 127.0.0.1 ip, so the solution is to put your hostname before localhost.

For example:

127.0.0.1 myhostname localhost
ID: 16639 · Report as offensive
Profile KSMarksPsych
Avatar

Send message
Joined: 30 Oct 05
Posts: 1239
United States
Message 16645 - Posted: 13 Apr 2008, 23:03:43 UTC

Crud...

I wonder how bad I'd break things if I tried this.
Kathryn :o)
ID: 16645 · Report as offensive
Profile KSMarksPsych
Avatar

Send message
Joined: 30 Oct 05
Posts: 1239
United States
Message 16649 - Posted: 14 Apr 2008, 3:07:24 UTC - in response to Message 16647.  

Crud...

I wonder how bad I'd break things if I tried this.


It's pretty much goof proof. I know because I tried it last year and it works. Dang, I thought everybody was doing it.



You underestimate my ability to seriously screw things up :-)
Kathryn :o)
ID: 16649 · Report as offensive

Message boards : BOINC Manager : Device Name

Copyright © 2024 University of California.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.