/tmp檔案系統無許可權導致監聽listener啟動失敗

2008081036發表於2016-02-23
啟動監聽失敗:
cli19-hx8uat<*tpi3hx8*/orahome/app/oracle/network/admin>$lsnrctl start TPI3HX8                       

LSNRCTL for IBM/AIX RISC System/6000: Version 10.2.0.4.0 - Production on 23-FEB-2016 11:41:10

Copyright (c) 1991, 2007, Oracle.  All rights reserved.

Starting /orahome/app/oracle/bin/tnslsnr: please wait...

TNSLSNR for IBM/AIX RISC System/6000: Version 10.2.0.4.0 - Production
System parameter file is /orahome/app/oracle/network/admin/listener.ora
Log messages written to /orahome/app/oracle/network/log/tpi3hx8.log
Error listening on: (ADDRESS=(PROTOCOL=ipc)(PARTIAL=yes)(QUEUESIZE=1))
No longer listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.0.104.119)(PORT=3526)))
TNS-12557: TNS:protocol adapter not loadable
TNS-12560: TNS:protocol adapter error
  TNS-00527: Protocol Adapter not loadable


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

cli19-hx8uat<*tpi3hx8*/orahome/app/oracle/network/admin>$

檢視日誌:
TNSLSNR for IBM/AIX RISC System/6000: Version 10.2.0.4.0 - Production on 23-FEB-2016 10:32:45

Copyright (c) 1991, 2007, Oracle.  All rights reserved.

System parameter file is /orahome/app/oracle/network/admin/listener.ora
Log messages written to /orahome/app/oracle/network/log/tpi3ww8.log
Trace information written to /orahome/app/oracle/network/trace/tpi3ww8.trc
Trace level is currently 0

Started with pid=5963812
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.0.104.119)(PORT=3525)))
Error listening on: (ADDRESS=(PROTOCOL=ipc)(PARTIAL=yes)(QUEUESIZE=1))
No longer listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.0.104.119)(PORT=3525)))
TNS-12557: TNS:protocol adapter not loadable
TNS-12560: TNS:protocol adapter error
  TNS-00527: Protocol Adapter not loadable

沒有有效資訊,檢視trc檔案/orahome/app/oracle/network/trace/tpi3ww8.trc提示不存在。
從網上查到,可能是缺少目錄: /var/tmp/.oracle
經查,此目錄是存在的:
cli19-hx8uat<*tpi3hx8*/home/oracle>$ls -al /var/tmp
total 360
drwxrwxrwt    3 bin      bin            4096 Feb 23 12:34 .
drwxr-xr-x   36 bin      bin            4096 Mar 30 2015  ..
drwxrwxrwt    2 root     system          256 Aug 12 2014  .oracle

於是,想trace一下監聽啟動過程,listener.ora增加引數:
TRACE_LEVEL_LISTENER=16

但啟動還是報錯,且trace level還是保持為0,並沒有設定為16,奇怪.

這時,我想檢視一下作業系統版本,卻發現:
cli19-hx8uat<*tpi3hx8*/orahome/app/oracle/network/admin>$oslevel
/usr/bin/oslevel[627]: /tmp/sh7012526.13: 0403-005 Cannot create the specified file.

原來是/tmp路徑下無許可權!
找系統管理員授予許可權後,監聽啟動正常。

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/25465866/viewspace-1993067/,如需轉載,請註明出處,否則將追究法律責任。

相關文章