Oracle-启动监听服务失败问题处理

Errors: TNS-12557,TNS-12560,TNS-00527

现象

启动监听服务时抛出以下错误信息

TNS-12557: TNS: Protocol adapter not loadable
TNS-12560: TNS: Protocol adapter error
TNS-00527: Protocol Adapter not loadable

分析

开启 level 16监听跟踪日志

$ lsnrctl
LSNRCTL> set current_listener listener_adg
LSNRCTL> set trc_level 16
LSNRCTL> status
LSNRCTL> show trc_file
输出trace
2018-09-19 15:01:03.744586 : nsc2addr:entry
2018-09-19 15:01:03.744604 : nsc2addr:(ADDRESS=(PROTOCOL=ipc)(PARTIAL=yes)(QUEUESIZE=1))
2018-09-19 15:01:03.744626 : sntuscrt:entry
2018-09-19 15:01:03.744644 : sntuscrt:failed to create dir /var/tmp/.oracle --!!!
2018-09-19 15:01:03.744655 : sntuscrt:exit
2018-09-19 15:01:03.744668 : snlsodx_lookup:entry
2018-09-19 15:01:03.744765 : snlsodx_lookup:Can‘t open shared object library
2018-09-19 15:01:03.744789 : nserror:entry
2018-09-19 15:01:03.744803 : nserror:nsres: id=0, op=78, ns=12557, ns2=12560; nt[0]=527, nt[1]=515, nt[2]=-1; ora[0]=0, ora[1]=0, ora[2]=0
2018-09-19 15:01:03.744814 : nsc2addr:error exit
2018-09-19 15:01:03.744825 : nslisten:error exit
格式化监听trace文件

trcasst是oracle自带的格式化trace工具

Usage : trcasst [options] <filename> 
      [options]  default values are -odt -e0 -s
      <filename>  always last argument
    -o[c|d][u|t][q]  Net Services and TTC information
      [c]  Summary of Net Services information
      [d]  Detailed Net Services information
      [u]  Summary of TTC information
      [t]  Detailed TTC information
      [q]  SQL commands (used together with u)
    -s  Statistics 
    -e[0|1|2]  Error information, default is 0
      [0]  Translate NS error numbers
      [1]  Error translation
      [2]  Error numbers without translation
    -l[a|i <connection_id>]  Connection information
      [a]  List all connections in a trace file
      [i <connection_id>]  Decode a specified connection

检查/var/tmp/.oracle目录信息

发现/var文件系统空间不足无法创建/var/tmp/.oracle目录,从而导致监听服务启动失败

解决方案

清理/var文件系统空间后启动监听器

参考文档

UNIX: Lsnrctl Start Fails with the Following Errors: TNS-12557,TNS-12560,TNS-00527 (Doc ID 2506564.1)

Oracle-启动监听服务失败问题处理

上一篇:Oracle 12C RAC环境搭建


下一篇:Oracle 对表的基本CURD操作