oracle 监听的主机名出现异常时候,排查放向

oracle创建监听有多种方式:
1、手动编写$ORACLE_HOME/network/admin/listener.ora配置文件
2、通过netmgr或者netca创建
3、通过netca静默创建

当前环境是:
1、/etc/hosts文件中没有对主机名进行解析
2、在oracle的.bash_profile中增加了环境变量export ORACLE_HOSTNAME=centos7

本次操作采用静默安装,在安装完成后,报错
静默安装完成后会有自己启动的过程,报错信息

Parsing command line arguments:
    Parameter "silent" = true
    Parameter "responsefile" = /home/oracle/netca.rsp
Done parsing command line arguments.
Oracle Net Services Configuration:
Profile configuration complete.
Oracle Net Listener Startup:
    Running Listener Control: 
      /u01/app/oracle/product/19.0.0/dbhome_1/bin/lsnrctl start LISTENER
    Listener Control complete.
    Listener start failed.
Check the trace file for details: /u01/app/oracle/cfgtoollogs/netca/trace_OraDB19Home1-2401314PM3846.log
Oracle Net Services configuration failed.  The exit code is 1

启动监听时候报错:

TNSLSNR for Linux: Version 19.0.0.0.0 - Production
System parameter file is /u01/app/oracle/product/19.0.0/dbhome_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/datax1/listener/alert/log.xml
Error listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=centos7)(PORT=1539)))
TNS-12545: Connect failed because target host or object does not exist
 TNS-12560: TNS:protocol adapter error
  TNS-00515: Connect failed because target host or object does not exist
   Linux Error: 2: No such file or directory

Listener failed to start. See the error message(s) above...

问题的原因:
在监听文件中HOST值确定规则如下:
当没有ORACLE_HOSTNAME变量的时候,就是HOSTNAME变量的值,通常这个值就是主机名的值。
也就是说,在/etc/hosts中添加这个主机名的解析与否,都不影响。

你可能感兴趣的:(oracle,数据库)