/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,如需转载请自行联系原作者
相关文章
|
8月前
|
网络协议 应用服务中间件 nginx
解决 nginx 启动错误host not found in upstream "XXXX.com“
在前置机上利用nginx进行反向代理的时候,我们会配置proxy_pass。在启动nginx的会报如下错误:host not found in upstream "XXXX.com“
4125 0
真正解决办法:FTP 执行命令时500 Illegal PORT command
真正解决办法:FTP 执行命令时500 Illegal PORT command
3060 0
|
23天前
|
网络协议 Ubuntu Linux
解决ssh: connect to host IP port 22: Connection timed out报错(scp传文件指定端口)
解决 `ssh: connect to host IP port 22: Connection timed out` 报错涉及检查 SSH 服务状态、防火墙配置、网络连通性和主机名解析等多个方面。通过逐步排查上述问题,并在 `scp` 命令中正确指定端口,可以有效解决连接超时的问题,确保文件传输的顺利进行。希望本文提供的解决方案能帮助您快速定位并解决该错误。
60 3
|
7月前
|
存储 Ubuntu 网络协议
Linux命令hostname:探索你的主机名
`hostname`命令在Linux中用于显示或设置主机名,它是系统管理和网络配置的关键工具。简单易用,可查看(`hostname`)或通过参数如`-s`设置短主机名,`-F`指定主机名文件。示例:查看主机名、使用`hostnamectl`或直接`hostname`命令设置新主机名,以及将新名写入`/etc/hostname`。注意,更改可能需管理员权限,并影响网络配置。
|
7月前
|
关系型数据库 MySQL 数据库连接
mysql报错:Host‘IP地址‘ isblocked because of many connection errors;unblock with ‘mysqladmin flush-hosts‘
mysql报错:Host‘IP地址‘ isblocked because of many connection errors;unblock with ‘mysqladmin flush-hosts‘
214 1
|
弹性计算 测试技术 数据库
MogDB修改服务器IP
MogDB修改服务器IP
207 0
MogDB修改服务器IP
|
关系型数据库 MySQL C#
Unable to connect to any of the specified MySQL hosts.
c#连接Mysql数据建立连接时提示:Unable to connect to any of the specified MySQL hosts. 出现此错误的原因是Server(数据库服务器IP地址填写错误) 当Server配置值是“(local)”或者是"(localhost)"时都会产生...
3186 0
|
分布式计算 Hadoop 网络安全
三十一、 master: ssh: connect to host master port 22: No route to host
三十一、 master: ssh: connect to host master port 22: No route to host
1035 0
三十一、 master: ssh: connect to host master port 22: No route to host