Ticket #361 (new Defect)

Opened 9 months ago

Last modified 8 months ago

Linux hostname is always localhost.localdomain

Reported by: Ageless Assigned to: davea
Priority: Major Milestone: Undetermined
Component: Client - Daemon Version:
Keywords: linux hostname Cc:

Description

Both in client_state.xml and on any project we connect to with (at least) a 5.10 client, the computername is always shown as localhost.localdomain, never as the hostname of the computer.

When I open a terminal window and do hostname -a it shows my hostname correctly. Not with BOINC though.

I understand from Rom that BOINC calls a POSIXs api to get the local computer name, but that doesn't seem to work. Can't BOINC just read /etc/hostname ? Or use gethostname (see also gethostname(2) ?

Change History

08/02/07 17:14:56 changed by KSMarksPsych

It might help to note which distro.

It does work on my install of Ubuntu Feisty Fawn.

08/02/07 23:04:53 changed by JKeck

It does not work on fedora 6 & 7. I have been able change the client_state.xml file with something more appropriate and it stays. But neither host has updated to the actual hostname of the hosts in question.

(follow-up: ↓ 4 ) 08/03/07 00:00:25 changed by MikeMarsUK

Does seem to work OK on my openSUSE 10.2 64-bit (both KDE and Gnome) using 5.10.8 32-bit Boinc.

I've seen other complaints about the same thing though, so not just a one-off. Something to do with the way 127.0.0.1 has been set up on the PC?

(in reply to: ↑ 3 ) 08/03/07 05:06:11 changed by Ageless

Replying to MikeMarsUK:

I've seen other complaints about the same thing though, so not just a one-off. Something to do with the way 127.0.0.1 has been set up on the PC?

I think so. When checking /etc/hosts the first line shows: 127.0.0.1 localhost.localdomain localhost Ruba Ruba.domain.dom

The last part is my computer name, of course. Yet it reads the first part all the time. And I am not so sure if I can just change it there, without breaking my Mepis 6.5.02 (based on Ubuntu, KDE).

08/03/07 11:58:29 changed by MikeMarsUK

Here's mine. It's different to what I expected (this is the first time I've looked at it on a linux system), note that the machine name (linux-rcud.site) is against the machine's local IP (192.168.1.64, I set it up to be static), rather than against localhost.

mike@linux-rcud:/etc> more hosts

# IP-Address  Full-Qualified-Hostname  Short-Hostname
#

127.0.0.1       localhost

# special IPv6 addresses
::1             localhost ipv6-localhost ipv6-loopback

fe00::0         ipv6-localnet

ff00::0         ipv6-mcastprefix
ff02::1         ipv6-allnodes
ff02::2         ipv6-allrouters
ff02::3         ipv6-allhosts
192.168.1.64    linux-rcud.site linux-rcud

09/22/07 23:35:28 changed by Joses

Seems BOINC uses the 1st name in the hosts file. This example should have BOINC report back it's name as COMPUTER

{{{$ cat /etc/hosts 127.0.0.1 COMPUTER localhost computer.mynetwork computer}}}


If this page is incomplete or incorrect, please edit it or add it to the wiki to-do list. To do this, you must be logged in; click Login or Register above.