在系统里装了weblogic之后,把/var目录下的一些权限改了,导致启动listener失败:
-bash-3.00$ lsnrctl start
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 27-JUL-2011 23:32:25
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Starting /home/db/oracle/product/10.2.0//bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 10.2.0.1.0 - Production
System parameter file is /home/db/oracle/product/10.2.0/network/admin/listener.ora
Log messages written to /home/db/oracle/product/10.2.0/network/log/listener.log
Error listening on: (ADDRESS=(PROTOCOL=ipc)(PARTIAL=yes)(QUEUESIZE=1))
No longer listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.72.128)(PORT=1522)))
TNS-12546: TNS:permission denied
TNS-12560: TNS:protocol adapter error
TNS-00516: Permission denied
Linux Error: 13: Permission denied
Listener failed to start. See the error message(s) above...
网上 查了一下,与/var/tmp/下的隐藏目录.oracle权限有关:
[root@localhost tmp]# cd /var/tmp
[root@localhost tmp]# ls -ltra
total 24
drwxr-xr-x 19 root root 4096 Jun 4 09:45 ..
drwxr-xr-x 2 root root 4096 Jun 14 06:57 .oracle
drwxr-xr-x 3 root root 4096 Jul 17 19:50 .
将其属主改为oracle:dba
[root@localhost tmp]# chown -R oracle:dba .oracle
[root@localhost tmp]# ls -ltra
total 24
drwxr-xr-x 19 root root 4096 Jun 4 09:45 ..
drwxr-xr-x 2 oracle dba 4096 Jun 14 06:57 .oracle
drwxr-xr-x 3 root root 4096 Jul 17 19:50 .
再次启动listener,启动成功:
-bash-3.00$ lsnrctl start
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 27-JUL-2011 23:37:43
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Starting /home/db/oracle/product/10.2.0//bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 10.2.0.1.0 - Production
System parameter file is /home/db/oracle/product/10.2.0/network/admin/listener.ora
Log messages written to /home/db/oracle/product/10.2.0/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.72.128)(PORT=1522)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.72.128)(PORT=1522)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 27-JUL-2011 23:37:45
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /home/db/oracle/product/10.2.0/network/admin/listener.ora
Listener Log File /home/db/oracle/product/10.2.0/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.72.128)(PORT=1522)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
检查.oracle目录的内容,发现如下内容:
[root@localhost .oracle]# ls -ltr
total 12
srwxrwxrwx 1 oracle dba 0 Jul 27 23:46 sEXTPROC0
srwxrwxrwx 1 oracle dba 0 Jul 27 23:46 s#9902.2
srwxrwxrwx 1 oracle dba 0 Jul 27 23:46 s#9902.1
可以推断当执行lsnrctl start命令时,需要往/var/tmp/.oracle里面写入这些临时文件,当该目录权限被修改后,写入文件失败,最终导致listener启动失败。
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10972173/viewspace-703331/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/10972173/viewspace-703331/