前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >关于listener无法启动的问题解决

关于listener无法启动的问题解决

作者头像
jeanron100
发布2018-03-13 17:35:40
1.6K0
发布2018-03-13 17:35:40
举报
文章被收录于专栏:杨建荣的学习笔记

今天照例开始学习oracle,实例启动了,但是listener却突然很奇怪,怎么都起不来。

我检查了下listener配置,网络配置,ssh服务,一切都正常,最后看防火墙开着,关了以后,问题还是照旧。

代码语言:javascript
复制
[oracle@oel log]$ lsnrctl
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 02-MAY-2013 12:11:38
Copyright (c) 1991, 2005, Oracle.  All rights reserved.
sWelcome to LSNRCTL, type "help" for information.
LSNRCTL> tatus
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=oel.oracle.com)(PORT=1521))
TNS-12541: TNS:no listener
 TNS-12560: TNS:protocol adapter error
  TNS-00511: No listener
   Linux Error: 111: Connection refused
Connecting to (ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY))
start
TNS-12541: TNS:no listener
 TNS-12560: TNS:protocol adapter error
  TNS-00511: No listener
   Linux Error: 111: Connection refused
LSNRCTL> Starting /u01/app/ora10g/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/ora10g/product/10.2.0/db_1/network/admin/listener.ora
Log messages written to /u01/app/ora10g/product/10.2.0/db_1/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oel.oracle.com)(PORT=1521)))
Error listening on: (ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY))
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...

最后各处查找,总算找到了问题根源。在 /var/tmp下的 .oracle权限有问题

代码语言:javascript
复制
[root@oel tmp]# ll -a
total 24
drwxrwxrwt  4 root   root 4096 May  2 12:10 .
drwxr-xr-x 24 root   root 4096 Jun 16  2012 ..
drwxrwxrwt  2 root   root 4096 May  2 12:11 .oracle
drwx------  2 oracle dba  4096 May  1 12:36 yum-oracle-n3UNcY
[root@oel tmp]# cd .oracle
[root@oel .oracle]# ll
total 0
srwxrwxrwx 1 oracle dba 0 Apr  1 16:44 s#16480.1
srwxrwxrwx 1 oracle dba 0 Apr  1 16:44 s#16480.2
srwxrwxrwx 1 ora11g dba 0 Apr 21 16:59 s#2171.1
srwxrwxrwx 1 ora11g dba 0 Apr 21 16:59 s#2171.2
srwxrwxrwx 1 ora11g dba 0 Apr 21 16:59 sPNPKEY
[root@oel .oracle]# 

改正一下,应该是上次启动的时候用root来启动,之后再用oracle用户就启动不了了。

代码语言:javascript
复制
[root@oel tmp]# chown oracle:dba .oracle
[root@oel tmp]# ll
total 4
drwx------ 2 oracle dba 4096 May  1 12:36 yum-oracle-n3UNcY
[root@oel tmp]# ll -a
total 24
drwxrwxrwt  4 root   root 4096 May  2 12:10 .
drwxr-xr-x 24 root   root 4096 Jun 16  2012 ..
drwxrwxrwt  2 oracle dba  4096 May  2 12:11 .oracle
drwx------  2 oracle dba  4096 May  1 12:36 yum-oracle-n3UNcY

修改以后,再启动一次试试。成功了。

代码语言:javascript
复制
LSNRCTL> status
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=oel.oracle.com)(PORT=1521))
TNS-12541: TNS:no listener
 TNS-12560: TNS:protocol adapter error
  TNS-00511: No listener
   Linux Error: 111: Connection refused
Connecting to (ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY))
startTNS-12541: TNS:no listener
 TNS-12560: TNS:protocol adapter error
  TNS-00511: No listener
   Linux Error: 111: Connection refused
LSNRCTL> 
Starting /u01/app/ora10g/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/ora10g/product/10.2.0/db_1/network/admin/listener.ora
Log messages written to /u01/app/ora10g/product/10.2.0/db_1/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oel.oracle.com)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY)))
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=oel.oracle.com)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date                02-MAY-2013 12:15:07
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/ora10g/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File         /u01/app/ora10g/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oel.oracle.com)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY)))
Services Summary...
Service "CUST01" has 1 instance(s).
  Instance "CUST01", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
LSNRCTL> 
本文参与 腾讯云自媒体同步曝光计划,分享自微信公众号。
原始发表:2014-03-11,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 杨建荣的学习笔记 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
相关产品与服务
数据库
云数据库为企业提供了完善的关系型数据库、非关系型数据库、分析型数据库和数据库生态工具。您可以通过产品选择和组合搭建,轻松实现高可靠、高可用性、高性能等数据库需求。云数据库服务也可大幅减少您的运维工作量,更专注于业务发展,让企业一站式享受数据上云及分布式架构的技术红利!
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档