红联Linux门户
Linux帮助

linux下oracle启动listener失败--TNS-12555:permission denied

发布时间:2017-03-25 09:31:06来源:linux网站作者:CC_Arturia
1.启动监听器 
[root@localhost ~]# lsnrctl start  //启动监听 
 
2.出现以下代码:
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 29-DEC-2010 22:46:51  
Copyright (c) 1991, 2005, Oracle.  All rights reserved.  
Welcome to LSNRCTL, type "help" for information.  
LSNRCTL> start  
Starting /u01/app/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait...  
TNSLSNR for Linux: Version 10.2.0.1.0 - Production  
System parameter file is /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora  
Log messages written to /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log  
Error listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))  
TNS-12555: TNS:permission denied  
TNS-12560: TNS:protocol adapter error  
TNS-00525: Insufficient privilege for operation  
Linux Error: 1: Operation not permitted  
Listener failed to start. See the error message(s) above...
根据大意提示没有权限。
 
3.The listener must be started using the same account you used to install Oracle. Typically, this account is named 'oracle'.
Using sudo, the command line should be:
sudo -H -u oracle /u01/app/oracle/product/10.2.0/db_1/bin/lsnrctl start
(btw, I don't think that using Ubuntu to run an Oracle database is supported by Oracle)
从国外某网站找的的答案,大意是启动listener 必须是安装oracle的用户,不是root用户。
 
4.切回oracle用户
[root@localhost ~]# exit  //退出root用户
[oracle@localhost ~]$ lsnrctl start  
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 23-MAR-2017 05:38:13  
Copyright (c) 1991, 2009, Oracle.  All rights reserved.  
Starting /home/oracle/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...  
TNSLSNR for Linux: Version 11.2.0.1.0 - Production  
System parameter file is /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora  
Log messages written to /home/oracle/app/diag/tnslsnr/localhost/listener/alert/log.xml  
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)))  
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))
STATUS of the LISTENER  
------------------------
Alias                     LISTENER  
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production  
Start Date                23-MAR-2017 05:38:14  
Uptime                    0 days 0 hr. 0 min. 2 sec  
Trace Level               off  
Security                  ON: Local OS Authentication  
SNMP                      OFF  
Listener Parameter File   /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora  
Listener Log File         /home/oracle/app/diag/tnslsnr/localhost/listener/alert/log.xml  
Listening Endpoints Summary...  
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)))  
The listener supports no services  
The command completed successfully  
[oracle@localhost ~]$   
可以看到listner已经启动成功。 
 
国外回答问题的参考:
linux下oracle启动listener失败--TNS-12555:permission denied
 
本文永久更新地址:http://www.linuxdiyf.com/linux/29456.html