免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2336 | 回复: 0
打印 上一主题 下一主题

SYSLOG: Warning Loghost Could Not be Resolved [复制链接]

论坛徽章:
2
双鱼座
日期:2014-02-23 12:10:03操作系统版块每日发帖之星
日期:2015-12-17 06:20:00
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-01-09 11:48 |只看该作者 |倒序浏览

Problem Statement:
At reboot, the following error message is seen on the console and also in
/var/adm/messages:
        SYSLOG: Warning loghost could not be resolved
Resolution:



This message means that syslogd cannot resolve the hostname for the
loghost.
There are several possible reasons for this.
Problem 1) The hosts line in /etc/nsswitch.conf
Problem 2) syslog is commented out of /etc/services
Problem 3) A comment (#) in front of the word loghost in /etc/hosts
Problem 1) The hosts line in /etc/nsswitch.conf
Solution 1) To see what hostname "loghost" is being resolved as use the
command:
        # getent hosts loghost
If this command does not return the hostname of the expected loghost and
just returns the prompt with no data, this indicates that the hostname
cannot be resolved.
Here is the output if it is able to resolve which hostname is defined as
loghost:
        # getent hosts loghost
        129.147.45.104  zotz loghost
By default, the format of the hosts line in the /etc/nsswitch.
files is
        hosts:       [NOTFOUND=return] files
This line means that the name service will be queried first and if the
hostname for loghost is not found, it will stop looking.  
The local /etc/hosts file will not be queried at all for the hostname.
To solve, check the hosts line in /etc/nsswitch.conf and verify that the
word files is in the line for hosts.
Note: It is preferable to have files first, however it can also work as in
the second example.
Examples:
        hosts:      files nis dns
       
        hosts:      nis files dns
In this way, the entry for loghost will be found locally in /etc/hosts
after querying the nameservice (and failing to find the hostname for
loghost in the nameservice maps).
Note: the steps above do not apply if loghost is defined in a name
service map rather than locally in /etc/hosts.
Problem 2) syslog is commented out of /etc/services
Example:
# syslog          514/udp
Solution 2) Enable syslog by removing comment from the beginning of the
line.
Example:
syslog          514/udp
After editing /etc/services, it may be necessary to kill and restart inetd:
# ps -ef | grep syslog
# kill -9
# /usr/sbin/inetd -s -t
or reboot the system.
Problem 3) A comment (#) in front of the word loghost in /etc/hosts
        127.0.0.1        localhost
        129.147.44.10   persia # bad comment line loghost
        129.148.11.21   ib-sf4800-admin
This poorly placed comment line causes the work loghost to be seen as part
of the comment.
Solution 3) Move the word 'loghost' in front of the comment sign (#) in
order for it to
be read.
        129.147.44.10   persia loghost  # better comment line


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/524/showart_66361.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP