solaris系统故障现象:
The semaphore timeout period has expired.
# Jan 25 15:53:47 ams9230 sendmail[362]: [ID 702911 mail.alert] unable to qualify my own domain name (ams9230) -- using short name
Jan 25 15:53:47 ams9230 sendmail[372]: [ID 702911 mail.alert] unable to qualify my own domain name (ams9230) -- using short name
查看:
bash-3.00# cat /etc/hosts
#
# Internet host table
#
::1 localhost
127.0.0.1 localhost
135.251.214.24 ams9230 loghost
sendmail默认是先查找“
qualified hostname
”,但从hosts文件中看出本机的hostname为ams9230,sendmail无法得到完整的主机名,故出现上面的日志告警。所以我们将主机名修改为完整主机名即可解决故障
修改前检查:
bash-3.00# /usr/lib/sendmail -d0.1 -bt < /dev/null
Version 8.13.8+Sun
Compiled with: DNSMAP LDAPMAP LOG MAP_REGEX MATCHGECOS MILTER MIME7TO8
MIME8TO7 NAMED_BIND NDBM NETINET NETINET6 NETUNIX NEWDB NIS
NISPLUS PIPELINING SCANF STARTTLS TCPWRAPPERS USERDB
USE_LDAP_INIT XDEBUG
Jan 25 15:59:13 ams9230 sendmail[9753]: [ID 702911 mail.alert] unable to qualify my own domain name (ams9230) -- using short name
============ SYSTEM IDENTITY (after readcf) ============
(short domain name) $w = ams9230
(canonical domain name) $j = ams9230
(subdomain name) $m = <null>
(node name) $k = ams9230
========================================================
WARNING: local host name (ams9230) is not qualified; see cf/README: WHO AM I?
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
> bash-3.00#
bash-3.00# cat /etc/hosts
#
# Internet host table
#
::1 localhost
127.0.0.1 localhost
135.251.214.24 ams9230 loghost
bash-3.00# ls -l /etc/hosts
lrwxrwxrwx 1 root root 12 Jan 22 16:35 /etc/hosts -> ./inet/hosts
bash-3.00# ls -l /etc/inet/hosts
-r--r--r-- 1 root sys 93 Jan 22 16:41 /etc/inet/hosts
给修改权限
bash-3.00# chmod u+w /etc/inet/hosts
bash-3.00# ls -l /etc/inet/hosts
-rw-r--r-- 1 root sys 93 Jan 22 16:41 /etc/inet/hosts
修改后的状态:
bash-3.00# vi /etc/inet/hosts
linux: Unknown terminal type
I don't know what kind of terminal you are on - all I have is 'linux'.
[Using open mode]
"/etc/inet/hosts" 6 lines, 97 characters
#
# Internet host table
#
::1 localhost
127.0.0.1 localhost
135.251.214.24 ams9230
ams9230.com loghost
:wq
"/etc/inet/hosts" 6 lines, 105 characters
bash-3.00# cat /etc/hosts
#
# Internet host table
#
::1 localhost
127.0.0.1 localhost
135.251.214.24 ams9230
ams9230.com loghost
修改后检查:
bash-3.00# /usr/lib/sendmail -d0.1 -bt < /dev/null
Version 8.13.8+Sun
Compiled with: DNSMAP LDAPMAP LOG MAP_REGEX MATCHGECOS MILTER MIME7TO8
MIME8TO7 NAMED_BIND NDBM NETINET NETINET6 NETUNIX NEWDB NIS
NISPLUS PIPELINING SCANF STARTTLS TCPWRAPPERS USERDB
USE_LDAP_INIT XDEBUG
============ SYSTEM IDENTITY (after readcf) ============
(short domain name) $w = ams9230
(canonical domain name) $j =
ams9230.com
(subdomain name) $m = com
(node name) $k = ams9230
========================================================
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
> bash-3.00# /usr/lib/mail/sh/check-hostname
Hostname ams9230 OK: fully qualified as
ams9230.com
$
$
$
$
$
$
$
$
$
$
$
$
$
$
$
$
$
$
$
$
$