Re: [CentOS] fqdn hostname fails after reboot
On 02/09/2012 01:28 AM, Chris wrote: 2012/2/9 Stephen Harrisli...@spuddy.org: On Thu, Feb 09, 2012 at 01:00:33AM +0100, Chris wrote: Feb 9 00:49:57 x800 postfix[1387]: warning: valid_hostname: invalid character 13(decimal): x800.mydomain.local? 13 is control-M. One of your config files is in DOS format and has an embedded control-M in it. Check /etc/sysconfig/network. If you vi it, does it show ^M at the end, or does the bottom line say [dos] ? When you find the file, dos2unix will fix it. Thank you very very much !! After converting... [root@x800 sysconfig]# dos2unix network dos2unix: converting file network to UNIX format ... Everything works fine :) But I do not understand why it was in DOS format? Because someone edited it from Windows, like using WinSCP to access it. -- Ljubomir Ljubojevic (Love is in the Air) PL Computers Serbia, Europe Google is the Mother, Google is the Father, and traceroute is your trusty Spiderman... StarOS, Mikrotik and CentOS/RHEL/Linux consultant ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
[CentOS] fqdn hostname fails after reboot
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 hostNOT 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 ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] 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 hostNOT 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
Re: [CentOS] fqdn hostname fails after reboot
2012/2/8 Tony Schreiner anthony.schrei...@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
Re: [CentOS] fqdn hostname fails after reboot
On Wed, Feb 8, 2012 at 5:52 PM, Chris xchris...@googlemail.com wrote: 2012/2/8 Tony Schreiner anthony.schrei...@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 hostNOT 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
Re: [CentOS] fqdn hostname fails after reboot
Chris wrote: 2012/2/8 Tony Schreiner anthony.schrei...@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
Re: [CentOS] fqdn hostname fails after reboot
2012/2/8 Earl Ramirez earlarami...@gmail.com: On Wed, Feb 8, 2012 at 5:52 PM, Chris xchris...@googlemail.com wrote: 2012/2/8 Tony Schreiner anthony.schrei...@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
Re: [CentOS] fqdn hostname fails after reboot
2012/2/8 Chris xchris...@googlemail.com: 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 Another thing about this, postfix fails on startup: Feb 9 00:49:57 x800 postfix[1387]: warning: valid_hostname: invalid character 13(decimal): x800.mydomain.local? Feb 9 00:49:57 x800 postfix[1387]: fatal: unable to use my own hostname Feb 9 00:49:59 x800 postfix/sendmail[1471]: warning: valid_hostname: invalid character 13(decimal): x800.mydomain.local? Feb 9 00:49:59 x800 postfix/sendmail[1471]: fatal: unable to use my own hostname Because some CentOS system file is corrupted? After setting hostname x800.mydomain.local postfix starts normally. -- Chris ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] fqdn hostname fails after reboot
On Thu, Feb 09, 2012 at 01:00:33AM +0100, Chris wrote: Feb 9 00:49:57 x800 postfix[1387]: warning: valid_hostname: invalid character 13(decimal): x800.mydomain.local? 13 is control-M. One of your config files is in DOS format and has an embedded control-M in it. Check /etc/sysconfig/network. If you vi it, does it show ^M at the end, or does the bottom line say [dos] ? When you find the file, dos2unix will fix it. -- rgds Stephen ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] fqdn hostname fails after reboot
2012/2/9 Stephen Harris li...@spuddy.org: On Thu, Feb 09, 2012 at 01:00:33AM +0100, Chris wrote: Feb 9 00:49:57 x800 postfix[1387]: warning: valid_hostname: invalid character 13(decimal): x800.mydomain.local? 13 is control-M. One of your config files is in DOS format and has an embedded control-M in it. Check /etc/sysconfig/network. If you vi it, does it show ^M at the end, or does the bottom line say [dos] ? When you find the file, dos2unix will fix it. Thank you very very much !! After converting... [root@x800 sysconfig]# dos2unix network dos2unix: converting file network to UNIX format ... Everything works fine :) But I do not understand why it was in DOS format? -- Chris ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos