FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 02-08-2012, 08:37 PM
Tony Schreiner
 
Default fqdn hostname fails after reboot

On Feb 8, 2012, at 4:22 PM, Chris wrote:

> Hi,
>
> I have several machines running CentOS 6.2 and a strange problem with
> the hostname of one machine... After every reboot it loses the fqdn
> hostname.
>
> Here is my confguration:
>
> ifconfig | grep "inet addr"
> inet addr:10.0.0.12 Bcast:10.0.0.255 Mask:255.255.255.0
> inet addr:127.0.0.1 Mask:255.0.0.0
>
> /etc/sysconfig/network
>
> NETWORKING=yes
> HOSTNAME=x800.mydomain.local
> GATEWAY=10.0.0.1
>
> 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
> ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
> 10.0.0.12 x800.mydomain.local x800
>
> ... after a reboot:
>
> hostname
> x800.mydomain.local < OK
>
> hostname -f
> hostname: Unknown host < NOT OK
>
> dnsdomainname
> dnsdomainname: Unknown host < NOT OK
>
> If I set the hostname manually:
>
> hostname x800.mydomain.local
>
> hostname -f
> x800.mydomain.local < OK
>
> dnsdomainname
> mydomain.local < OK
>
> Everything is okay ...
>
> Something I've never experienced before. Does anyone have an idea?
>
> thx
>
> --
> Chris

When I strace hostname -f I see it checking with my name server.
Are your 2 systems set up differently with respect to name resolution and/or DNS?

Tony

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 02-08-2012, 08:52 PM
Chris
 
Default fqdn hostname fails after reboot

2012/2/8 Tony Schreiner <anthony.schreiner@bc.edu>:
>
> On Feb 8, 2012, at 4:22 PM, Chris wrote:
>
>> Hi,
>>
>> I have several machines running CentOS 6.2 and a strange problem with
>> the hostname of one machine... After every reboot it loses the fqdn
>> hostname.
>>
>> Here is my confguration:
>>
>> ifconfig | grep "inet addr"
>> * * * * *inet addr:10.0.0.12 *Bcast:10.0.0.255 *Mask:255.255.255.0
>> * * * * *inet addr:127.0.0.1 *Mask:255.0.0.0
>>
>> /etc/sysconfig/network
>>
>> NETWORKING=yes
>> HOSTNAME=x800.mydomain.local
>> GATEWAY=10.0.0.1
>>
>> 127.0.0.1 * localhost localhost.localdomain localhost4 localhost4.localdomain4
>> ::1 * * * * localhost localhost.localdomain localhost6 localhost6.localdomain6
>> 10.0.0.12 * x800.mydomain.local * x800
>>
>> ... after a reboot:
>>
>> hostname
>> x800.mydomain.local * * * * * * < OK
>>
>> hostname -f
>> hostname: Unknown host * * * < NOT OK
>>
>> dnsdomainname
>> dnsdomainname: Unknown host * * *< NOT OK
>>
>> If I set the hostname manually:
>>
>> hostname x800.mydomain.local
>>
>> hostname -f
>> x800.mydomain.local * *< OK
>>
>> dnsdomainname
>> mydomain.local * *< OK
>>
>> Everything is okay ...
>>
>> Something I've never experienced before. Does anyone have an idea?
>>
>> thx
>>
>> --
>> Chris
>
> When I strace hostname -f *I see it checking with my name server.
> Are your 2 systems set up differently with respect to name resolution and/or DNS?

I have 5 systems with the same DNS configuration. (name servers in
/etc/resolv.conf)

It seems that /etc/hosts is ignored.. on this system only. But I do
not know why

--
Chris
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 02-08-2012, 09:00 PM
Earl Ramirez
 
Default fqdn hostname fails after reboot

On Wed, Feb 8, 2012 at 5:52 PM, Chris <xchris89x@googlemail.com> wrote:

> 2012/2/8 Tony Schreiner <anthony.schreiner@bc.edu>:
> >
> > On Feb 8, 2012, at 4:22 PM, Chris wrote:
> >
> >> Hi,
> >>
> >> I have several machines running CentOS 6.2 and a strange problem with
> >> the hostname of one machine... After every reboot it loses the fqdn
> >> hostname.
> >>
> >> Here is my confguration:
> >>
> >> ifconfig | grep "inet addr"
> >> inet addr:10.0.0.12 Bcast:10.0.0.255 Mask:255.255.255.0
> >> inet addr:127.0.0.1 Mask:255.0.0.0
> >>
> >> /etc/sysconfig/network
> >>
> >> NETWORKING=yes
> >> HOSTNAME=x800.mydomain.local
> >> GATEWAY=10.0.0.1
> >>
> >> 127.0.0.1 localhost localhost.localdomain localhost4
> localhost4.localdomain4
> >> ::1 localhost localhost.localdomain localhost6
> localhost6.localdomain6
> >> 10.0.0.12 x800.mydomain.local x800
> >>
> >> ... after a reboot:
> >>
> >> hostname
> >> x800.mydomain.local < OK
> >>
> >> hostname -f
> >> hostname: Unknown host < NOT OK
> >>
> >> dnsdomainname
> >> dnsdomainname: Unknown host < NOT OK
> >>
> >> If I set the hostname manually:
> >>
> >> hostname x800.mydomain.local
> >>
> >> hostname -f
> >> x800.mydomain.local < OK
> >>
> >> dnsdomainname
> >> mydomain.local < OK
> >>
> >> Everything is okay ...
> >>
> >> Something I've never experienced before. Does anyone have an idea?
> >>
> >> thx
> >>
> >> --
> >> Chris
> >
> > When I strace hostname -f I see it checking with my name server.
> > Are your 2 systems set up differently with respect to name resolution
> and/or DNS?
>
> I have 5 systems with the same DNS configuration. (name servers in
> /etc/resolv.conf)
>
> It seems that /etc/hosts is ignored.. on this system only. But I do
> not know why
>
> --
> Chris
> _______________________________________________
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
>

Chris,

verify the config in your /etc/nsswitch.conf

--
Kind Regards
Earl Ramirez
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 02-08-2012, 09:03 PM
 
Default fqdn hostname fails after reboot

Chris wrote:
> 2012/2/8 Tony Schreiner <anthony.schreiner@bc.edu>:
>> On Feb 8, 2012, at 4:22 PM, Chris wrote:
>>>
>>> I have several machines running CentOS 6.2 and a strange problem with
>>> the hostname of one machine... After every reboot it loses the fqdn
>>> hostname.
<snip>
>>> Everything is okay ...
>>>
>>> Something I've never experienced before. Does anyone have an idea?
<snip>
> I have 5 systems with the same DNS configuration. (name servers in
> /etc/resolv.conf)
>
> It seems that /etc/hosts is ignored.. on this system only. But I do
> not know why

AH! A light may be dawning. What's the hosts line in /etc/nsswitch.conf?

mark

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 02-08-2012, 09:03 PM
Chris
 
Default fqdn hostname fails after reboot

2012/2/8 Earl Ramirez <earlaramirez@gmail.com>:
> On Wed, Feb 8, 2012 at 5:52 PM, Chris <xchris89x@googlemail.com> wrote:
>
>> 2012/2/8 Tony Schreiner <anthony.schreiner@bc.edu>:
>> >
>> > On Feb 8, 2012, at 4:22 PM, Chris wrote:
>> >
>> >> Hi,
>> >>
>> >> I have several machines running CentOS 6.2 and a strange problem with
>> >> the hostname of one machine... After every reboot it loses the fqdn
>> >> hostname.
>> >>
>> >> Here is my confguration:
>> >>
>> >> ifconfig | grep "inet addr"
>> >> * * * * *inet addr:10.0.0.12 *Bcast:10.0.0.255 *Mask:255.255.255.0
>> >> * * * * *inet addr:127.0.0.1 *Mask:255.0.0.0
>> >>
>> >> /etc/sysconfig/network
>> >>
>> >> NETWORKING=yes
>> >> HOSTNAME=x800.mydomain.local
>> >> GATEWAY=10.0.0.1
>> >>
>> >> 127.0.0.1 * localhost localhost.localdomain localhost4
>> localhost4.localdomain4
>> >> ::1 * * * * localhost localhost.localdomain localhost6
>> localhost6.localdomain6
>> >> 10.0.0.12 * x800.mydomain.local * x800
>> >>
>> >> ... after a reboot:
>> >>
>> >> hostname
>> >> x800.mydomain.local * * * * * * < OK
>> >>
>> >> hostname -f
>> >> hostname: Unknown host * * * < NOT OK
>> >>
>> >> dnsdomainname
>> >> dnsdomainname: Unknown host * * *< NOT OK
>> >>
>> >> If I set the hostname manually:
>> >>
>> >> hostname x800.mydomain.local
>> >>
>> >> hostname -f
>> >> x800.mydomain.local * *< OK
>> >>
>> >> dnsdomainname
>> >> mydomain.local * *< OK
>> >>
>> >> Everything is okay ...
>> >>
>> >> Something I've never experienced before. Does anyone have an idea?
>> >>
>> >> thx
>> >>
>> >> --
>> >> Chris
>> >
>> > When I strace hostname -f *I see it checking with my name server.
>> > Are your 2 systems set up differently with respect to name resolution
>> and/or DNS?
>>
>> I have 5 systems with the same DNS configuration. (name servers in
>> /etc/resolv.conf)
>>
>> It seems that /etc/hosts is ignored.. on this system only. But I do
>> not know why
>>
>> --
>> Chris
>> _______________________________________________
>> CentOS mailing list
>> CentOS@centos.org
>> http://lists.centos.org/mailman/listinfo/centos
>>
>
> Chris,
>
> verify the config in your /etc/nsswitch.conf

Yes, default config. Without any changes...

--
Chris
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 09:46 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org