• 软件测试技术
  • 软件测试博客
  • 软件测试视频
  • 开源软件测试技术
  • 软件测试论坛
  • 软件测试沙龙
  • 软件测试资料下载
  • 软件测试杂志
  • 软件测试人才招聘
    暂时没有公告

字号: | 推荐给好友 上一篇 | 下一篇

每天还在报这些信息???

发布: 2007-6-08 22:43 | 作者: seanhe | 来源: | 查看: 23次 | 进入软件测试论坛讨论

领测软件测试网
每天console上或/var/adm/mail.log里仍报这种信息:
Feb 11 21:02:46 hpaps sendmail[10632]: My unqualified host name (hpaps) unknown;
 sleeping for retry
Feb 11 21:02:46 hpaps sendmail[10632]: unable to qualify my own domain name (hpaps) -- using short name

本机主机名:hpaps(10.85.17.10)

我上次按照大哥们的提示也改了些东西:
1)/etc/hosts:
10.85.17.10     hpaps hpaps1
127.0.0.1       localhost       loopback
10.85.15.5      aps-hp
10.82.15.5      api-hp1
10.85.17.5      hpastp
2)#vi /etc/mail/sendmail.cf 
、、、、、、、、、、
# #Dj$w.Foo.COM
Dj$w.hpaps
#/sbin/init.d/sendmail stop
#/sbin/init.d/sendmail start
、、、、、、、、、、
3)#vi /etc/nsswitch.conf 
#hosts:         dns nis files
hosts:          files nis dns
services:       nis files
protocols:      nis files
networks:       nis files
rpc:            nis files
netgroup:       nis files
automount:      nis files


可反复试还是报这些信息在屏幕上,真不知道怎么回事??

 hpux 回复于:2003-02-12 11:57:46
#mv /etc/resolf.conf /etc/resolv.conf.bak
重启系统,就不信!

 小叶子sy 回复于:2003-02-12 12:09:57
可是大哥,在/etc下就没有这个文件:resolf.conf ,怎么办???
如:
hpaps@/etc -# ll resolf.conf
resolf.conf not found
hpaps@/etc -#

 hpux 回复于:2003-02-12 12:11:00
不好意思是:/etc/resolv.conf

 albert 回复于:2003-02-12 12:11:55
hpux不小心打错了,是/etc/resolv.conf

 yikaikai 回复于:2003-02-12 12:13:14
resolv.conf

 小叶子sy 回复于:2003-02-12 12:16:04
可是也没有呀,如下:都没有,那怎么回事?要从那里COPY吗????
hpaps@/etc -# ll resolv.conf
resolv.conf not found
hpaps@/etc -#hpaps@/etc -# ll re*
lrwxr-xr-t   1 root       sys             16 Feb 26  2000 reboot > /usr/sbin/re
boot
lr-xr-xr-t   1 root       sys             18 Feb 26  2000 repquota -> /usr/sbin/
repquota
lrwxr-xr-t   1 root       sys             17 Feb 26  2000 restore -> /usr/sbin/r
estore
hpaps@/etc -#

 albert 回复于:2003-02-12 12:28:17
由于你没有用到域名,所以/etc/mail/sendmail.cf中“Dj$w.hpaps”  这一行应该注释掉,否则系统sendmail时会把hpaps 作为域名加到主机名后组成完整的长名 hpaps.hpaps来访问,系统当然就会报“unable to qualify my own domain name (hpaps)” ,因为此时根据你的配置,hpaps还是你的域名,系统肯定找不到。

 hpux 回复于:2003-02-12 13:07:25
[quote:f87e0a347a="albert"]由于你没有用到域名,所以/etc/mail/sendmail.cf中“Dj$w.hpaps”  这一行应该注释掉,否则系统sendmail时会把hpaps 作为域名加到主机名后组成完整的长名 hpaps.hpaps来访问,系统当然就会报“unable to qualify my o..........[/quote:f87e0a347a]
Dj$w就是为了没有域名的时候,在Dj$w.后面加上自己的域名用的!
所以,若不用FQDN域名(一般用/etc/hosts)做名字解析的时候,要把这行的注释去掉!
=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-====-=-=-=-=-=-=-=
#  My official domain name or Fully Qualified Domain Name - FQDN (Dj):         #
#                                                                              #
#      This is required only if sendmail cannot automatically determine your   #
#      domain.  If you are not using DNS, and the official host name (ie,      #
#      the first entry in /etc/hosts following your IP address) is not a       #
#      fully-qualified host name, then sendmail will have difficulty resolving #
#      your domain name.  You MUST modify the $j macro by replacing .Foo.COM   #
#      with your actual domain name.  If you do not, you will see a warning    #
#      message in your syslog, that might even get echo'd to your console      #
#      when sendmail starts up.                                                #
#                                                                              #
#      For example, if you see this warning:                                   #
#                                                                              #
#      WARNING: local host name (sys1) is not qualified; fix $j in config file #
#                                                                              #
#      then you need to uncomment the Dj macro and add your domain.            #
#                                                                              #
#      Change the line:                                                        #
#      #Dj$w.Foo.COM                                                           #
#       to                                                                     #
#      Dj$w.hp.com                                                             #
#                                                                              #
#      where hp.com would be the name of your domain. Then that warning        #
#      message will go away.                                                   #

 小叶子sy 回复于:2003-02-12 13:15:40
是不是这样就会好了:但Dj$w没有了,会不会有问题???

#vi /etc/mail/sendmail.cf
、、、、、、、、
# #Dj$w.Foo.COM这还要不要??
#Dj$w.hpaps
#/sbin/init.d/sendmail stop
#/sbin/init.d/sendmail start
、、、、、、、、、、、

 hpux 回复于:2003-02-12 13:22:45
[quote:811b365f20="小叶子sy"]是不是这样就会好了:但Dj$w没有了,会不会有问题???

#vi /etc/mail/sendmail.cf
、、、、、、、、
# #Dj$w.Foo.COM这还要不要??
#Dj$w.hpaps
#/sbin/init.d/sendmail stop
#/sbin/init.d/sendmail sta..........[/quote:811b365f20]
我想确认一下小叶子sy  ,你是不是把:
#/sbin/init.d/sendmail stop
#/sbin/init.d/sendmail start
当成/etc/mail/sendmail.cf的内容了?
如果是,请再试试:
1、把#Dj$w.hpaps的注释去掉(#Dj$w.Foo.COM注释掉);
2、在命令行执行:
#/sbin/init.d/sendmail stop
#/sbin/init.d/sendmail start

 小叶子sy 回复于:2003-02-12 13:31:38
我现在重新做了:是这样吧!!我再看看还报不报信息?
1)#vi /etc/mail/sendmail
、、、
# #Dj$w.Foo.COM
Dj$w.hpaps
、、、
2)hpaps@/etc/mail -# /sbin/init.d/sendmail stop
Sendmail pid is 15024
Killing sendmail...
Sendmail killed.
hpaps@/etc/mail -# /sbin/init.d/sendmail start
Feb 12 00:05:16 hpaps sendmail[15147]: unable to qualify my own domain name (hpaps) -- using short name
hash map "Alias0": unsafe map file /etc/mail/aliases
/etc/mail/aliases: 7 aliases, longest 15 bytes, 99 bytes total
Feb 12 00:05:16 hpaps sendmail[15152]: unable to qualify my own domain name (hpa
ps) -- using short name
sendmail
hpaps@/etc/mail -#

 albert 回复于:2003-02-12 13:33:16
# your domain name. You MUST modify the $j macro by replacing .Foo.COM # 
# with your actual domain name. If you do not, you will see a warning # 

但是actual domain name 在小叶子的这种情况下并不存在啊,Dj$w.hpaps 这句话就相当于将hpaps作为域名来识别,
Feb 11 21:02:46 hpaps sendmail[10632]: unable to qualify my own domain name (hpaps) -- using short name 
这个Warning则表示hpaps这个域名无效。

Feb 11 21:02:46 hpaps sendmail[10632]: My unqualified host name (hpaps) unknown; 
sleeping for retry 
而这个信息则表示一开始系统认为没有用到FQDN域名而是用了/etc/hosts做名字解析,此时由于Dj$w.hpaps这句话没有注释掉,所以系统则以hpaps作为域名,这样就会报上一条Warning.
所以我认为将这行注释掉,系统则会使用短名来访问。
不知道我这样理解是否有错,Anyway,小叶子你可以试试看。

 hpux 回复于:2003-02-12 13:36:54
[quote:806cdd55ae="小叶子sy"]unable to qualify my own domain name (hpaps) -- using short name

本机主机名:hpaps(10.85.17.10)

我上次按照大哥们的提示也改了些东西:
1)/etc/hosts:
10.85.17.10     hpaps hpaps1
127.0.0.1       l..........[/quote:806cdd55ae]
可不可以把10.85.17.10 hpaps hpaps1改成
10.85.17.10 hpaps hpaps
再试试?

 hpux 回复于:2003-02-12 13:43:29
[quote:b19ed0229f="albert"]My unqualified host name (hpaps) unknown; 
sleeping for retry 
而这个信息则表示一开始系统认为没有用到FQDN域名而是用了/etc/hosts做名字解析,此时由于Dj$w.hpaps这句话没有注释掉,所以系统则以hpaps作为域?.........[/quote:b19ed0229f]
hpaps是个虚拟的域,实际上存在与否没什么关系,只是发邮件的时候默认会在发信人地址上自动加上这个域!
比如我的sendmail.cf就是这样:
Dj$w.sysinfo
其实这个sysinfo并不是什么域名,也和任何主机名没有关系,但是我收到主机发来的信息的时候,会显示root@host.sysinfo!

 albert 回复于:2003-02-12 13:48:56
但在我的环境中,这一行就备我注释掉了,名字解析为/etc/hosts,没有什么报错啊。

 hpux 回复于:2003-02-12 13:52:55
BTW,可不可以把/etc/mail/sendmail.cw非注释部分的内容贴出来?

 hpux 回复于:2003-02-12 14:00:37
[quote:28549d50b3="albert"]但在我的环境中,这一行就备我注释掉了,名字解析为/etc/hosts,没有什么报错啊。[/quote:28549d50b3]
对,我测试了一下,注释掉这行以后,用/sbin/init.d/sendmail stop/start重启mail服务,也没报什么错!!!
然后:
#hostname hpoo
#/sbin/init.d/sendmail stop
#/sbin/init.d/sendmail start
WARNING: local host name (hpoo) is not qualified; fix $j in config file
/etc/mail/aliases: 6 aliases, longest 9 bytes, 76 bytes total
WARNING: /etc/mail/sendmail.cw not configured, configuring...
Adding localhost to sendmail.cw
Adding  hpoo  to sendmail.cw

 小叶子sy 回复于:2003-02-12 14:06:56
我这样试:
1)我开始/etc/mail/sendmail.cf里是没有Dj$w.hpaps,是后来加上去的,
现在我去掉它,和下面执行的一样结果,不知道怎么回事??
2)#vi /etc/hosts,变成:
10.85.17.10     hpaps hpaps
127.0.0.1       localhost       loopback
10.85.15.5      aps-hp
10.82.15.5      api-hp1
10.85.17.5      hpastp
然后
#/etc/mail/sendmail.cf是这样:
、、、、、、、、、、、
# Change the following line:
# Dj$w.Foo.COM
Dj$w.hpaps
# to
# Dj$w.hp.com
#
# where hp.com would be the name of your domain.
# Then that warning message goes away.
#
# Dj$w.Foo.COM
CP.
# "Smart" relay host (may be null)
DS
、、、、、、、、、
 hpaps@/etc/mail -#  /sbin/init.d/sendmail stop
Sendmail pid is 15938
Killing sendmail...
Sendmail killed.
hpaps@/etc/mail -# /sbin/init.d/sendmail start
Feb 12 00:29:24 hpaps sendmail[15967]: unable to qualify my own domain name (hpa
ps) -- using short name
hash map "Alias0": unsafe map file /etc/mail/aliases
/etc/mail/aliases: 7 aliases, longest 15 bytes, 99 bytes total
Feb 12 00:29:24 hpaps sendmail[15972]: unable to qualify my own domain name (hpaps) -- using short namesendmail
还是这样的?

 小叶子sy 回复于:2003-02-12 14:32:54
我试过好久,还是这样,我不知道还有哪里要改,能把你们的
/etc/mail/sendmail.cf
和/etc/hosts放上来看看吗???

 hpux 回复于:2003-02-12 15:39:19
我模拟了一下你的环境,通过以下步骤解决问题(注意点号哦):
1、确保原版的sendmail.cf:
#cp /usr/newconfig/etc/mail/sendmail.cf /etc/mail
2、修改/etc/mail/sendmail.cf文件:
1)在# Dj$w.Foo.COM这一行下面加一行:
Dj$w.
2)找到含有字符串“check_local”的这行,把注释去掉;
3、修改/etc/mail/sendmail.cw文件:
确保文件里含有这些行(如果没有就追加):
localhost
hpaps
hpaps.
4、修改/etc/hosts文件:
10.85.17.10 hpaps hpaps.  
5、修改文件/etc/nsswitch.conf
...
hosts: files
...
6、麻烦你试试看:
#/sbin/init.d/sendmai. stop
#/sbin/init.d/sendmail start

 小叶子sy 回复于:2003-02-12 16:13:34
我试了,确实没有那些信息,但有警告要紧吗?
而且无论我是否在/etc/mail/sendmail.cf中加“Dj$w."都会有这种警告信息出现,就是不动/etc/mail/sendmail.cf文件还是有,
如下:
hpaps@/etc/mail -#  /sbin/init.d/sendmail stop
Sendmail pid is 22657
Killing sendmail...
Sendmail killed.
hpaps@/etc/mail -# /sbin/init.d/sendmail start
/etc/mail/sendmail.cf: WARNING: dangerous write permissions
hash map "Alias0": unsafe map file /etc/mail/aliases
/etc/mail/aliases: 7 aliases, longest 15 bytes, 99 bytes total
/etc/mail/sendmail.cf: WARNING: dangerous write permissions
sendmail
hpaps@/etc/mail -#

 hpux 回复于:2003-02-12 16:24:40
可能是/etc/mail/sendmail.cf的权限问题吧!
我这里的都是Readonly的,就是-r--r--r--,所以没有那些Warning!
你改改看看;另外我觉得这些Warning应该没什么要紧的。

 小叶子sy 回复于:2003-02-12 16:48:04
真的是呀!我改成可读就好了,非常感谢,但你能不能帮我到底,
我都不清楚,
这些什么含义?为什么要这样改呀???

 hpux 回复于:2003-02-12 17:03:55
[quote:12d28275d9="小叶子sy"]真的是呀!我改成可读就好了,非常感谢,但你能不能帮我到底,
我都不清楚,
这些什么含义?为什么要这样改呀???[/quote:12d28275d9]
说来话长,光sendmail.cf就要讲一本书!改天在厦门搞一个HP-UX高级系统管理培训算了,大伙交流交流! 

 albert 回复于:2003-02-12 18:11:45
哇,hpux兄终于解决了这个问题啦,唉,我原来真是一知半解啊。

 uman 回复于:2003-02-13 06:48:47
我上次就是加了一个. 好的
其他什么也没有动,缺省就可以了吧(?,,不能肯定,不过那些文件我没改过).
想想起因可能(只是可能)还是上次我参考HPUX的那篇LOG到邮件(短信)时动的,也不知道改了什么了,呵呵!
我不会象小叶子(好象别人也有过的)出现在CONSLE上,至于MAIL.LOG,呵呵,我是重来不看的.发现还是由于重新启动的,起SENDMAIL服务时很慢,真的很慢,后来就报了这个错误,由于我可能经常重新启动,所以坚决不能忍受
,所以,我就想办法找资料(网上)解决了.这个其实可以算是一个FAQ了.当时我加.的时候还出现了意外,我随手注释掉了一行NFS client用的地址,再加上我把. 加到主机名后了(开始我机子没有别名),sigh ,重起就出问题了,cde
居然不出现了,命令行居然会死(后来发现不是死,就是很慢,可能老是想起CDE而不行),幸好我反映及时,迅速登陆改过hosts文件,居然CDE又立即可以登陆了,看来HPUX尝试起同一服务要很多次,这里问问,有谁能够帮帮忙啊,我不太清楚.
我可以肯定,加了.就好.而且
“check_local”的这行缺省就是注释的; 文件/etc/nsswitch.conf 中确实是先查询files,这个就是上次改过的一个,呵呵,不过按照我的理解,先查哪个后查哪个无所谓,因为nof found时会继续下一个查询;至于这个
# Dj$w.Foo.COM这一行下面加一行: 
Dj$w. 
好象没有必要啊!我的也是如此.
感觉应该是按照nsswitch.conf查询,查不到就由sendmail.cf自动配置.既然可以查到,那么sendmail.cf中配不配应该没什么关系吧(好象有个优先级问题吧)
不写了,回去我在努力想想.

 小叶子sy 回复于:2003-02-13 07:58:51
我也要好好想想,你们为什么都这么厉害呢???平时干什么了呀??/

 hpux 回复于:2003-02-13 08:31:22
[quote:0851cc3288="uman"]# Dj$w.Foo.COM这一行下面加一行: 
Dj$w. 
[/quote:0851cc3288]
我几年前原来也是碰到过系统启动的时候在Sendmail服务过不去的问题,结果HP的人给我一个FAQ文档,解决了!后来不知怎的这个文档找不到了,幸好几年前有认真做过这个笔记,翻开老笔记本还有这些解决的步骤。
其实很多为什么要这么设我也不是很理解,但是象Dj$w.等比较简单的我是知道的,如果不清楚可以详细研究sendmail.cf注释的部分!

 yikaikai 回复于:2003-02-14 15:10:37
http://e-support.hp.com.cn/e-delivery/forum/messages/topic.asp?CAT_ID=20&CAT_NAME=HP%2DUX&FORUM_ID=70&FORUM_NAME=%CF%B5%CD%B3%B9%DC%C0%ED&TOPIC_ID=118086&SUBJECT=9000%C0%CF%CA%C7%B1%A8%D5%E2%B8%F6%B4%ED%A3%AC%B4%F3%CF%C0%B0%EF%C3%A6%BF%B4%BF%B4%B0%C9%A1%A3

这个是你吗小叶子

 hpux 回复于:2003-02-14 15:29:33
[quote="yikaikai"]这个是你吗小叶子quote]
yikaikai难道想出手了?呵呵~~~

 小叶子sy 回复于:2003-02-14 16:08:54
不是我,我在哪里都叫"小叶子",因为我喜欢呀!!!

真的不是我呀!!!我在HP论坛上也注册过,也叫"小叶子"呀!!!

 guard_wei 回复于:2003-03-18 20:44:45
在/etc/hosts/文件中如此修改一下就不会报错了!
例如:192。168。0。1  hpunix   hpunix1
修改成这样
192。168。0。1  hpunix   hpunix1.
即可! 

延伸阅读

文章来源于领测软件测试网 https://www.ltesting.net/


关于领测软件测试网 | 领测软件测试网合作伙伴 | 广告服务 | 投稿指南 | 联系我们 | 网站地图 | 友情链接
版权所有(C) 2003-2010 TestAge(领测软件测试网)|领测国际科技(北京)有限公司|软件测试工程师培训网 All Rights Reserved
北京市海淀区中关村南大街9号北京理工科技大厦1402室 京ICP备2023014753号-2
技术支持和业务联系:info@testage.com.cn 电话:010-51297073

软件测试 | 领测国际ISTQBISTQB官网TMMiTMMi认证国际软件测试工程师认证领测软件测试网