/etc/hosts/中HOSTNAME错误导致lsnrctl启动错误

系统环境: REDHAT LINUX5.4 + ORACLE10.2.0.4,是通过虚拟机复制另外一台数据库系统环境后安装ORACLE获得。
故障现象: ORACLE安装正常,本地服务正常,本地数据通过IMP可以正常导入,但是LSNRCTL能够启动,但我们要的port服务未能正常监听。
[oracle@L-DB-100-27 ~]$ lsnrctl start
 
LSNRCTL for Linux: Version 10.2.0.4.0 - Production on 24-8月 -2012 10:45:15
 
Copyright (c) 1991, 2007, Oracle.  All rights reserved.
 
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 10.2.0.4.0 - Production
Start Date                24-8月 -2012 10:45:00
Uptime                    0 days 0 hr. 0 min. 15 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File         /u01/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
 (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
 (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.16.100.27)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
 Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

查看listener.ora和tnsnames.ora设置中的设置,未见异常。但当尝试把HOST从IP修改成HOSTNAME时却出现监听无法启动的现象。
# listener.ora Network Configuration File: /home/oracle/product/10.2.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
 (SID_LIST =
(SID_DESC =
 (SID_NAME = PLSExtProc)
 (ORACLE_HOME = /u01/product/10.2.0/db_1)
 (PROGRAM = extproc)
)
 )

LISTENER =
 (DESCRIPTION_LIST =
(DESCRIPTION =
 (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
 (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.100.27)(PORT = 1521))
)
 )



# tnsnames.ora Network Configuration File: /home/oracle/product/10.2.0/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
ZJPORT =
 (DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.100.27)(PORT = 1521))
(CONNECT_DATA =
 (SERVER = DEDICATED)
 (SERVICE_NAME = zjport)
)
 )

EXTPROC_CONNECTION_DATA =
 (DESCRIPTION =
(ADDRESS_LIST =
 (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
)
(CONNECT_DATA =
 (SID = PLSExtProc)
 (PRESENTATION = RO)
)
 )

查看HOSTNAME,发现正常
[oracle@L-DB-100-27 ~]$ hostname
L-DB-100-27

但查看/etc/hosts配置,发现了问题,显然L-DB-100-17并不是本机的HOSTNAME
[oracle@L-DB-100-27 ~]$ more /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
#172.16.100.17  L-DB-100-17     localhost.localdomain   localhost
127.0.0.1 L-DB-100-17     localhost.localdomain   localhost
::1             localhost6.localdomain6 localhost6

通过VI修改HOSTNAME为L-DB-100-27,尝试重启lsnrctl,发现启动不了(提示已经启动)。
明明已经lsnrctl stop过, 通过ps -ef|grep lsnrctl也未发现相关进程

重启操作系统
shutdown -r now

启动ORACLE服务(正常)
 
启动监听(正常--问题解决)
[oracle@L-DB-100-27 ~]$ lsnrctl stat
 
LSNRCTL for Linux: Version 10.2.0.4.0 - Production on 24-8月 -2012 10:46:16
 
Copyright (c) 1991, 2007, Oracle.  All rights reserved.
 
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 10.2.0.4.0 - Production
Start Date                24-8月 -2012 10:45:00
Uptime                    0 days 0 hr. 1 min. 15 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File         /u01/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=L-DB-100-27)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "port" has 1 instance(s).
  Instance "port", status READY, has 1 handler(s) for this service...
Service "portXDB" has 1 instance(s).
  Instance "port", status READY, has 1 handler(s) for this service...
Service "port_XPT" has 1 instance(s).
  Instance "port", status READY, has 1 handler(s) for this service...
The command completed successfully
 

你可能感兴趣的:(错误,/etc/hosts/)