/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
 


本文转自zylhsy 51CTO博客,原文链接:http://blog.51cto.com/yunlongzheng/971641,如需转载请自行联系原作者
相关文章
|
3月前
|
网络协议 应用服务中间件 nginx
解决 nginx 启动错误host not found in upstream "XXXX.com“
在前置机上利用nginx进行反向代理的时候,我们会配置proxy_pass。在启动nginx的会报如下错误:host not found in upstream "XXXX.com“
563 0
|
域名解析 网络协议 Linux
Linux系统修改DNS配置文件/etc/resolv.conf 出现Operation not permitted解决方法
Linux系统修改DNS配置文件/etc/resolv.conf 出现Operation not permitted解决方法
4984 0
|
网络协议 Unix Linux
Symantec Backup Exec Agent For Linux防火墙问题
如果在Unix或Linux安装配置好了Symantec Backup Exec Agent For Linux,但是在Symantec Backup Exec服务端无法访问Symantec Backup Exec Agent,那么此时你首先应该检查Unix或Linux上的Symantec Backup Exec Agent服务是否启动。
941 0