在系统里装了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-x19 root root 4096
Jun4 09:45 ..
drwxr-xr-x2 root root 4096
Jun 14 06:57 .oracle
drwxr-xr-x3 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-x19 rootroot 4096 Jun4 09:45 ..
drwxr-xr-x2 oracle dba4096 Jun 14 06:57 .oracle
drwxr-xr-x3 rootroot 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
------------------------
AliasLISTENER
VersionTNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date27-JUL-2011 23:37:45
Uptime0
days 0 hr. 0 min. 0 sec
Trace Leveloff
SecurityON:
Local OS Authentication
SNMPOFF
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
srwxrwxrwx1 oracle dba 0
Jul 27 23:46 sEXTPROC0
srwxrwxrwx1 oracle dba 0
Jul 27 23:46 s#9902.2
srwxrwxrwx1 oracle dba 0
Jul 27 23:46 s#9902.1
可以推断当执行lsnrctl
start命令时,需要往/var/tmp/.oracle里面写入这些临时文件,当该目录权限被修改后,写入文件失败,最终导致listener启动失败。