[Spacewalk-list] Client hostname resolution
Adrián Márques
amarques at geocom.com.uy
Fri Sep 5 15:22:26 UTC 2008
Thank you all for your answers.
The thing is (maybe I wasn't clear on this on my first mail), the
clients all have a hostname configured. On each client, the 'hostname'
command returns 'centosclientX.DOMAIN' where X is a number and DOMAIN my
domain, and so does the gethostname() python function Jesus kindly
points out.
The explanation I assumed for the problem was that maybe the server did
not receive the hostname from the client but instead tried to resolve it
from it's IP address (which gets registered correctly on the server).
I'm not at all sure if this is the case. Is it?
I thought that the advice to add the hostname to /etc/hosts meant adding
the client's hostnames to the server's /etc/hosts so the latter could
resolve these hostnames. Should I be looking for the cause of the
problem on the server or on the clients?
I'm not resolving hostnames through DNS but WINS, I assume this is part
of the problem, but don't quite see how, or how to solve it.
I'll be looking some more into it and post back if I get to fix it.
Meanwhile, I'd be very grateful if anyone could answer my last questions.
Many thanks for the kind feedback.
Adrián.
Jesus M. Rodriguez escribió:
> On Thu, Sep 4, 2008 at 4:40 PM, Adrián Márques <amarques at geocom.com.uy> wrote:
>
>> Hello there.
>>
>> I'm trying out spacewalk on CentOs 5.2 and all my clients' hostnames and
>> system names are being registered as 'unknown' on the server. What could be
>> the reason? How does the server determine the client's hostname?
>>
>> I suppose this is part of the problem: my systems are connected through a
>> windows network and I can't resolve their hostnames. Well, actually I can
>> now, but it took configuring samba to publish the netbios name, doing
>> hostname resolution through WINS and even then I'm not resolving the FQDNs
>> (clientname.domainname) but the netbios names (clientname).
>>
>> I'd appreciate any comments on this.
>>
>> Thanks for you attention.
>>
>> Best regards.
>>
>> Adrián.
>>
>
>
> The client uses whatever is returned by gethostname() from the socket,
> so you could check
> out what that returns with this little snippet of code:
>
> [jmrodri at firebird ~]$ python
>
>>>> from socket import gethostname
>>>> gethostname()
>>>>
> 'firebird.home.net'
>
>
> Like others have stated, easiest way is to edit /etc/hosts. There are
> probably other
> more "appropriate" ways of doing hostnames. :)
>
> jesus
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/spacewalk-list/attachments/20080905/27f05cfa/attachment.htm>
More information about the Spacewalk-list
mailing list